aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/htop.rb
blob: 85dd3c27250718296cfb8743e29917798c8a304e (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
require 'formula'

class Htop < Formula
  head 'https://github.com/cynthia/htop-osx.git'
  homepage 'http://htop.sourceforge.net/'

  def install
    system "./autogen.sh"
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    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.undent
    For htop to display correctly all running processes, it needs to run as root.
    If you don't want to `sudo htop` every time, change the owner and permissions:
        cd #{bin}
        chmod 6555 htop
        sudo chown root htop
    EOS
  end
end