2009-10-25 12:14:22 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Base64 < Formula
|
2009-10-25 12:14:22 +00:00
|
|
|
homepage 'http://www.fourmilab.ch/webtools/base64/'
|
2013-01-27 01:46:24 +00:00
|
|
|
url 'http://www.fourmilab.ch/webtools/base64/base64-1.5.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '25b5ae71c2818c7a489065ca1637806cd5109524'
|
2009-10-25 12:14:22 +00:00
|
|
|
|
|
|
|
def install
|
2013-06-20 19:56:28 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking"
|
2009-10-25 12:14:22 +00:00
|
|
|
system "make"
|
|
|
|
bin.install "base64"
|
2013-06-20 19:56:28 +00:00
|
|
|
man1.install "base64.1"
|
2009-10-25 12:14:22 +00:00
|
|
|
end
|
2014-02-04 21:13:35 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
path = testpath/"a.txt"
|
|
|
|
path.write "hello"
|
|
|
|
|
|
|
|
output = `#{bin}/base64 #{path}`.strip
|
|
|
|
assert_equal "aGVsbG8=", output
|
|
|
|
assert_equal 0, $?.exitstatus
|
|
|
|
end
|
2009-10-25 12:14:22 +00:00
|
|
|
end
|