2012-05-03 16:18:22 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class HtopOsx < Formula
|
|
|
|
homepage 'https://github.com/max-horvath/htop-osx'
|
2013-03-31 12:32:42 +00:00
|
|
|
url 'https://github.com/max-horvath/htop-osx/archive/0.8.2.1-2013-03-31.tar.gz'
|
|
|
|
sha1 '9c4bbe8517b59ca2ead8fedd4b8b24452f2ec55e'
|
2013-03-29 11:55:58 +00:00
|
|
|
version '0.8.2.1'
|
2012-05-03 16:18:22 +00:00
|
|
|
|
2012-09-25 17:22:59 +00:00
|
|
|
depends_on :autoconf
|
2012-07-07 18:08:22 +00:00
|
|
|
depends_on :automake
|
2012-09-25 17:22:59 +00:00
|
|
|
depends_on :libtool
|
2012-05-03 16:18:22 +00:00
|
|
|
|
|
|
|
def install
|
2012-05-16 04:11:39 +00:00
|
|
|
# Otherwise htop will segfault when resizing the terminal
|
|
|
|
ENV.no_optimization if ENV.compiler == :clang
|
|
|
|
|
2013-01-08 17:47:23 +00:00
|
|
|
(buildpath/'m4').mkpath # or autogen fails
|
2012-05-03 16:18:22 +00:00
|
|
|
system "./autogen.sh"
|
|
|
|
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
|
|
|
system "make", "install", "DEFAULT_INCLUDES='-iquote .'"
|
|
|
|
end
|
2012-05-03 02:49:45 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
htop-osx requires root privileges to correctly display all running processes.
|
|
|
|
You can either run the program via `sudo` or set the setuid bit:
|
|
|
|
|
|
|
|
sudo chown root:wheel #{bin}/htop
|
|
|
|
sudo chmod u+s #{bin}/htop
|
|
|
|
|
2012-05-03 15:09:33 +00:00
|
|
|
You should be certain that you trust any software you grant root privileges.
|
2012-05-03 02:49:45 +00:00
|
|
|
EOS
|
|
|
|
end
|
2012-05-03 16:18:22 +00:00
|
|
|
end
|