aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorRaphael Cohn2014-09-25 20:44:43 +0100
committerMike McQuaid2014-10-06 11:37:12 +0100
commit91c6c6a9c170a4806d49b7734487b5d70397583c (patch)
tree49e28f4f2f62318ff073bca00380725d22f398e6 /Library/Formula
parentefe2711f7ba5780f0de4e18d65608704028104cd (diff)
downloadhomebrew-91c6c6a9c170a4806d49b7734487b5d70397583c.tar.bz2
powerman 2.30.20 (new formula)
powerman is a set of tools for inspecting and controlling PDUs (power distribution units) over HTTP, SNMP and serial lines.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/powerman.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/Library/Formula/powerman.rb b/Library/Formula/powerman.rb
new file mode 100644
index 000000000..0f794242e
--- /dev/null
+++ b/Library/Formula/powerman.rb
@@ -0,0 +1,43 @@
+require "formula"
+
+class Powerman < Formula
+ homepage "http://code.google.com/p/powerman/"
+ url "https://github.com/chaos/powerman/releases/download/2.3.20/powerman-2.3.20.tar.gz"
+ sha256 "a4b0858d1214aab18e2673596b00ac9bad976cb7b777209e10732467c3551b88"
+
+ head do
+ url "https://github.com/chaos/powerman.git"
+
+ depends_on "autoconf" => :build
+ depends_on "automake" => :build
+ depends_on "libtool" => :build
+ end
+
+ option "without-curl", "Omits httppower"
+ option "with-net-snmp", "Builds snmppower"
+
+ depends_on "curl" => :recommended
+ depends_on "net-snmp" => :optional
+ depends_on "genders" => :optional
+
+ def install
+ args = ["--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--localstatedir=#{HOMEBREW_PREFIX}/var"
+ ]
+
+ args << (build.with?("curl") ? "--with-httppower" : "--without-httppower")
+ args << (build.with?("net-snmp") ? "--with-snmppower" : "--without-snmppower")
+ args << (build.with?("genders") ? "--with-genders" : "--without-genders")
+ args << "--with-ncurses"
+ args << "--without-tcp-wrappers"
+
+ system "./autogen.sh" if build.head?
+ system "./configure", *args
+ system "make", "install"
+ end
+
+ test do
+ system "#{sbin}/powermand", "-h"
+ end
+end