2010-05-20 17:41:02 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Ganglia < Formula
|
2010-05-20 17:41:02 +00:00
|
|
|
homepage 'http://ganglia.sourceforge.net/'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/ganglia/ganglia%20monitoring%20core/3.6.0/ganglia-3.6.0.tar.gz'
|
2013-11-10 08:29:07 +00:00
|
|
|
sha1 'b06529ac49deb1f1c65c6215b8d2d13c3f3fa23f'
|
2010-05-20 17:41:02 +00:00
|
|
|
|
2013-11-12 15:12:03 +00:00
|
|
|
conflicts_with 'coreutils', :because => 'both install `gstat` binaries'
|
|
|
|
|
2013-11-10 08:29:07 +00:00
|
|
|
depends_on 'pkg-config' => :build # to find APR
|
2010-09-08 12:34:11 +00:00
|
|
|
depends_on 'confuse'
|
|
|
|
depends_on 'pcre'
|
|
|
|
depends_on 'rrdtool'
|
|
|
|
|
2014-03-17 00:35:07 +00:00
|
|
|
# fixes build on Leopard and newer, which lack kvm.h and its corresponding /dev/ node
|
|
|
|
patch :p0 do
|
|
|
|
url "https://trac.macports.org/export/105820/trunk/dports/net/ganglia/files/patch-libmetrics-darwin-metrics.c.diff"
|
|
|
|
sha1 "71a864d46ac963fec3709cd5eea61856b1eb0c93"
|
2010-05-20 17:41:02 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2010-09-08 12:34:11 +00:00
|
|
|
# ENV var needed to confirm putting the config in the prefix until 3.2
|
|
|
|
ENV['GANGLIA_ACK_SYSCONFDIR'] = '1'
|
|
|
|
|
2012-02-24 22:51:33 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
2010-09-08 15:16:12 +00:00
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--sbindir=#{bin}",
|
|
|
|
"--sysconfdir=#{etc}",
|
2012-02-24 22:51:33 +00:00
|
|
|
"--with-gmetad",
|
|
|
|
"--with-libpcre=#{HOMEBREW_PREFIX}"
|
2010-05-20 17:41:02 +00:00
|
|
|
system "make install"
|
2010-09-08 12:34:11 +00:00
|
|
|
|
|
|
|
# Generate the default config file
|
2013-12-09 19:44:45 +00:00
|
|
|
system "#{bin}/gmond -t > #{etc}/gmond.conf" unless File.exist? "#{etc}/gmond.conf"
|
2010-09-08 12:34:11 +00:00
|
|
|
|
|
|
|
# Install man pages
|
2010-05-20 17:41:02 +00:00
|
|
|
man1.install Dir['mans/*']
|
|
|
|
end
|
|
|
|
|
2010-09-08 12:34:11 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2010-09-08 15:16:12 +00:00
|
|
|
If you didn't have a default config file, one was created here:
|
|
|
|
#{etc}/gmond.conf
|
2010-09-08 12:34:11 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|