gnu-units: use options DSL

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-08-13 09:57:00 -05:00
parent ecabf4fd8b
commit fe23e41397

View file

@ -6,13 +6,11 @@ class GnuUnits < Formula
mirror 'http://ftp.gnu.org/gnu/units/units-2.00.tar.gz'
sha1 '6da9ea78ff0dc21bc43cf1809c530e61d9394ce0'
def options
[['--default-names', "Do NOT prepend 'g' to the binary; will override system utils."]]
end
option 'default-names', "Do not prepend 'g' to the binary"
def install
args = ["--prefix=#{prefix}"]
args << "--program-prefix=g" unless ARGV.include? '--default-names'
args << "--program-prefix=g" unless build.include? 'default-names'
system "./configure", *args
system "make install"