aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/htop.rb
blob: 75af28bc80984978391aa1fe4a74e73a9ef3c98d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'formula'

class Htop <Formula
  head 'git://github.com/AndyA/htop-osx.git', :branch => 'osx'
  homepage 'http://htop.sourceforge.net/'

  def install
    system "./autogen.sh"
    system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
    system "make", "install", "DEFAULT_INCLUDES='-iquote .'"
    rm_rf "#{share}/applications" # Don't need Gnome support on OS X
    rm_rf "#{share}/pixmaps"
  end

  def caveats; <<-EOS
In order for htop to display correctly all the running processes, it needs to be ran as root.

However, if you do not want to type `sudo htop` every time, you can change the owner and permissions for the executable binary:

$ cd #{prefix}/bin/
$ chmod 6555 htop
$ sudo chown root htop
    EOS
  end

end