diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/nagios-plugins.rb | 16 | ||||
| -rw-r--r-- | Library/Formula/nrpe.rb | 28 |
2 files changed, 17 insertions, 27 deletions
diff --git a/Library/Formula/nagios-plugins.rb b/Library/Formula/nagios-plugins.rb index 344d4fa6d..4fc0aae1b 100644 --- a/Library/Formula/nagios-plugins.rb +++ b/Library/Formula/nagios-plugins.rb @@ -1,5 +1,3 @@ -require "formula" - class NagiosPlugins < Formula homepage "https://www.nagios-plugins.org/" url "https://www.nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz" @@ -11,8 +9,7 @@ class NagiosPlugins < Formula sha1 "0f3bb80908ff0cdfaae651c2100b48a048d69257" => :mountain_lion end - depends_on "openssl" => :optional - depends_on "gnutls" => :optional + depends_on "openssl" depends_on "postgresql" => :optional depends_on :mysql => :optional @@ -21,16 +18,11 @@ class NagiosPlugins < Formula --disable-dependency-tracking --prefix=#{libexec} --libexecdir=#{libexec}/sbin + --with-openssl=#{Formula["openssl"].opt_prefix} ] args << "--with-pgsql=#{Formula["postgresql"].opt_prefix}" if build.with? "postgresql" - if build.with? "gnutls" - args << "--with-gnutls=#{Formula["gnutls"].opt_prefix}" - else - args << "--with-openssl=#{Formula["openssl"].opt_prefix}" - end - system "./configure", *args system "make", "install" system "make", "install-root" # Do we still want to support root-install Jack? @@ -43,8 +35,4 @@ class NagiosPlugins < Formula #{HOMEBREW_PREFIX}/sbin EOS end - - test do - system "#{sbin}/check_ntp_time", "-H", "pool.ntp.org" - end end diff --git a/Library/Formula/nrpe.rb b/Library/Formula/nrpe.rb index 4ac0a3d76..3f21e931c 100644 --- a/Library/Formula/nrpe.rb +++ b/Library/Formula/nrpe.rb @@ -1,31 +1,33 @@ -require 'formula' - class Nrpe < Formula - homepage 'http://www.nagios.org/' - url 'https://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz' - sha1 '45f434758c547c0af516e8b3324717f8dcd100a3' + homepage "http://www.nagios.org/" + url "https://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz" + sha1 "45f434758c547c0af516e8b3324717f8dcd100a3" + revision 1 - depends_on 'nagios-plugins' + depends_on "nagios-plugins" + depends_on "openssl" def install user = `id -un`.chomp group = `id -gn`.chomp - inreplace 'sample-config/nrpe.cfg.in', '/var/run/nrpe.pid', var+'run/nrpe.pid' - system "./configure", "--disable-debug", - "--disable-dependency-tracking", + inreplace "sample-config/nrpe.cfg.in", "/var/run/nrpe.pid", var+"run/nrpe.pid" + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--libexecdir=#{sbin}", "--with-nrpe-user=#{user}", "--with-nrpe-group=#{group}", "--with-nagios-user=#{user}", "--with-nagios-group=#{group}", + "--with-ssl=#{Formula["openssl"].opt_prefix}", + # Set both or it still looks for /usr/lib + "--with-ssl-lib=#{Formula["openssl"].opt_lib}", "--enable-ssl", "--enable-command-args" - system "make all" - system "make install" - system "make install-daemon-config" - (var+'run').mkpath + system "make", "all" + system "make", "install" + system "make", "install-daemon-config" + (var+"run").mkpath end def plist; <<-EOS.undent |
