2014-09-25 19:44:43 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Powerman < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Control (remotely and in parallel) switched power distribution units"
|
2015-01-09 08:29:04 +00:00
|
|
|
homepage "https://code.google.com/p/powerman/"
|
2014-09-25 19:44:43 +00:00
|
|
|
url "https://github.com/chaos/powerman/releases/download/2.3.20/powerman-2.3.20.tar.gz"
|
|
|
|
sha256 "a4b0858d1214aab18e2673596b00ac9bad976cb7b777209e10732467c3551b88"
|
2014-12-12 03:46:09 +00:00
|
|
|
revision 1
|
2014-09-25 19:44:43 +00:00
|
|
|
|
2014-10-06 08:44:58 +00:00
|
|
|
bottle do
|
2015-01-09 08:23:48 +00:00
|
|
|
revision 1
|
|
|
|
sha1 "ec06181b96d551028f7d850af6d234b0ed10bdc8" => :yosemite
|
|
|
|
sha1 "1ce9ff3c11efed5f95e5dfb163e00112cddc3178" => :mavericks
|
|
|
|
sha1 "ad745e9cbf51ec189f1b7575ef6b426bb35e7686" => :mountain_lion
|
2014-10-06 08:44:58 +00:00
|
|
|
end
|
|
|
|
|
2014-09-25 19:44:43 +00:00
|
|
|
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
|
2014-12-12 03:46:09 +00:00
|
|
|
args = [
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--localstatedir=#{var}"
|
2014-09-25 19:44:43 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
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
|