diff options
| author | Raphael Cohn | 2014-10-17 13:04:53 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-10-17 14:20:23 +0100 |
| commit | b83a95f6774b460fd5641c5586902f3206a5d874 (patch) | |
| tree | 948c4759e2db289f2a8fd4fda3090ed17ab7696e /Library/Formula | |
| parent | c8561b1e6ad4e00ea72ace2b1c40a930fcee4062 (diff) | |
| download | homebrew-b83a95f6774b460fd5641c5586902f3206a5d874.tar.bz2 | |
nut 2.7.2 (new formula)
nut, also known as network UPS tools, is a set of tools for
communicating with UPSes, PDUs and solar power controllers. It provides
a daemon, logging and drivers. It communicated over serial lines, USB,
SNMP, IPMI and via HTTP. The name 'nut' is not particularly descriptive
and does not help users find UPS tools, but it matches the Debian
package nomenclature.
This pull request replaces #32651.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/nut.rb | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Library/Formula/nut.rb b/Library/Formula/nut.rb new file mode 100644 index 000000000..788d9e093 --- /dev/null +++ b/Library/Formula/nut.rb @@ -0,0 +1,66 @@ +require "formula" + +class Nut < Formula + homepage "http://www.networkupstools.org" + url "http://www.networkupstools.org/source/2.7/nut-2.7.2.tar.gz" + sha256 "4d5365359b059d96dfcb77458f361a114d26c84f1297ffcd0c6c166f7200376d" + + head do + url "https://github.com/networkupstools/nut.git" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + + option "without-serial", "Omits serial drivers" + option "without-libusb-compat", "Omits USB drivers" + option "with-dev", "Includes dev headers" + option "with-net-snmp", "Builds SNMP support" + option "with-neon", "Builds XML-HTTP support" + option "with-powerman", "Builds powerman PDU support" + option "with-freeipmi", "Builds IPMI PSU support" + option "with-cgi", "Builds CGI wrappers" + option "with-libltdl", "Adds dynamic loading support of plugins using libltdl" + + depends_on "pkg-config" => :build + depends_on "libusb-compat" => :recommended + depends_on "net-snmp" => :optional + depends_on "neon" => :optional + depends_on "powerman" => :optional + depends_on "freeipmi" => :optional + depends_on "openssl" + depends_on "libtool" => :build + depends_on "gd" if build.with? "cgi" + + def install + args = ["--disable-dependency-tracking", + "--prefix=#{prefix}", + "--localstatedir=#{HOMEBREW_PREFIX}/var", + "--without-doc", + "--without-avahi", + "--with-macosx_ups", + "--with-openssl", + "--without-nss", + "--without-wrap" + ] + args << (build.with?("serial") ? "--with-serial" : "--without-serial") + args << (build.with?("libusb") ? "--with-usb" : "--without-usb") + args << (build.with?("dev") ? "--with-dev" : "--without-dev") + args << (build.with?("snmp") ? "--with-snmp" : "--without-snmp") + args << (build.with?("neon") ? "--with-neon" : "--without-neon") + args << (build.with?("powerman") ? "--with-powerman" : "--without-powerman") + args << (build.with?("ipmi") ? "--with-ipmi" : "--without-ipmi") + args << "--with-freeipmi" if build.with? "ipmi" + args << (build.with?("libltdl") ? "--with-libltdl" : "--without-libltdl") + args << (build.with?("cgi") ? "--with-cgi" : "--without-cgi") + + system "./autogen.sh" if build.head? + system "./configure", *args + system "make", "install" + end + + test do + system "#{bin}/dummy-ups", "-L" + end +end |
