aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/gnu-units.rb
blob: c3dadcc36c3906381a2ecea68ce239d6f82d3192 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'formula'

class GnuUnits < Formula
  url 'http://ftpmirror.gnu.org/units/units-1.88.tar.gz'
  mirror 'http://ftp.gnu.org/gnu/units/units-1.88.tar.gz'
  homepage 'http://www.gnu.org/software/units/'
  md5 '9b2ee6e7e0e9c62741944cf33fc8a656'

  def options
    [['--default-names', "Do NOT prepend 'g' to the binary; will override system utils."]]
  end

  def install
    args = ["--prefix=#{prefix}"]
    args << "--program-prefix=g" unless ARGV.include? '--default-names'

    system "./configure", *args
    system "make install"
  end
end