2010-06-21 08:55:24 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Rzip < Formula
|
2010-06-21 08:55:24 +00:00
|
|
|
homepage 'http://rzip.samba.org/'
|
2013-01-28 05:24:13 +00:00
|
|
|
url 'http://rzip.samba.org/ftp/rzip/rzip-2.1.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'efeafc7a5bdd7daa0cea8d797ff21aa28bdfc8d9'
|
2010-06-21 08:55:24 +00:00
|
|
|
|
|
|
|
def install
|
2014-03-25 17:50:33 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
2013-01-28 05:24:13 +00:00
|
|
|
"--prefix=#{prefix}"
|
2010-06-21 08:55:24 +00:00
|
|
|
|
2014-03-25 17:50:33 +00:00
|
|
|
system "make", "install", "INSTALL_MAN=#{man}"
|
2010-06-21 08:55:24 +00:00
|
|
|
|
2014-03-25 17:50:33 +00:00
|
|
|
bin.install_symlink "rzip" => "runzip"
|
|
|
|
man1.install_symlink "rzip.1" => "runzip.1"
|
2010-06-21 08:55:24 +00:00
|
|
|
end
|
2014-04-13 19:28:30 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
path = testpath/"data.txt"
|
|
|
|
original_contents = "." * 1000
|
|
|
|
path.write original_contents
|
|
|
|
|
|
|
|
# compress: data.txt -> data.txt.rz
|
|
|
|
system bin/"rzip", path
|
|
|
|
assert !path.exist?
|
|
|
|
|
|
|
|
# decompress: data.txt.rz -> data.txt
|
|
|
|
system bin/"rzip", "-d", "#{path}.rz"
|
|
|
|
assert_equal original_contents, path.read
|
|
|
|
end
|
2010-06-21 08:55:24 +00:00
|
|
|
end
|