diff options
| author | Dominyk Tiller | 2014-12-16 15:05:09 +0000 | 
|---|---|---|
| committer | Jack Nagel | 2014-12-17 20:55:36 -0500 | 
| commit | 2c7f534061a0eb37bd08942c78eff2a62ab9c1d3 (patch) | |
| tree | 439662c9b7835fc5f850c1df653542e09c24bb9a /Library/Formula/nagios-plugins.rb | |
| parent | 2016c7fbb78cfc4fac5dd798d55ba5ce004957b9 (diff) | |
| download | homebrew-2c7f534061a0eb37bd08942c78eff2a62ab9c1d3.tar.bz2 | |
nagios-plugins 2.0.3
Version bump, OpenSSL fix, additional optional dependencies, new test,
and fixes audit red-flags.
Closes #35033.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/nagios-plugins.rb')
| -rw-r--r-- | Library/Formula/nagios-plugins.rb | 41 | 
1 files changed, 31 insertions, 10 deletions
| diff --git a/Library/Formula/nagios-plugins.rb b/Library/Formula/nagios-plugins.rb index 926353c9c..344d4fa6d 100644 --- a/Library/Formula/nagios-plugins.rb +++ b/Library/Formula/nagios-plugins.rb @@ -1,9 +1,9 @@ -require 'formula' +require "formula"  class NagiosPlugins < Formula -  homepage 'https://www.nagios-plugins.org/' -  url 'https://www.nagios-plugins.org/download/nagios-plugins-2.0.tar.gz' -  sha1 '9b9be0dfb7026d30da0e3a5bbf4040211648ee39' +  homepage "https://www.nagios-plugins.org/" +  url "https://www.nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz" +  sha1 "29b6183ab9d796299dc17c395eef493415d1e9d6"    bottle do      sha1 "78fbc5df2f4426e7fc435ea9d597d14180d9e950" => :yosemite @@ -11,13 +11,30 @@ class NagiosPlugins < Formula      sha1 "0f3bb80908ff0cdfaae651c2100b48a048d69257" => :mountain_lion    end +  depends_on "openssl" => :optional +  depends_on "gnutls" => :optional +  depends_on "postgresql" => :optional +  depends_on :mysql => :optional +    def install -    system "./configure", "--disable-debug", -                          "--disable-dependency-tracking", -                          "--prefix=#{prefix}", -                          "--libexecdir=#{sbin}" -    system "make install" -    system "make install-root" +    args = %W[ +      --disable-dependency-tracking +      --prefix=#{libexec} +      --libexecdir=#{libexec}/sbin +    ] + +    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? +    sbin.write_exec_script Dir["#{libexec}/sbin/*"]    end    def caveats @@ -26,4 +43,8 @@ class NagiosPlugins < Formula        #{HOMEBREW_PREFIX}/sbin      EOS    end + +  test do +    system "#{sbin}/check_ntp_time", "-H", "pool.ntp.org" +  end  end | 
