2013-11-04 09:08:10 +00:00
|
|
|
class Afio < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Creates cpio-format archives"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "http://members.chello.nl/~k.holtman/afio.html"
|
|
|
|
url "http://members.chello.nl/~k.holtman/afio-2.5.1.tgz"
|
|
|
|
sha256 "363457a5d6ee422d9b704ef56d26369ca5ee671d7209cfe799cab6e30bf2b99a"
|
2015-10-07 08:43:31 +00:00
|
|
|
head "https://github.com/kholtman/afio.git"
|
2013-11-04 09:08:10 +00:00
|
|
|
|
2014-06-29 03:47:43 +00:00
|
|
|
bottle do
|
2016-04-09 08:55:55 +00:00
|
|
|
cellar :any_skip_relocation
|
2016-09-25 20:40:19 +00:00
|
|
|
sha256 "5863378152ea720ffb5614cceb27eabcd98a2e2734810830f7908af3262ee303" => :sierra
|
2016-04-09 08:55:55 +00:00
|
|
|
sha256 "4bbebea8c0ea4bc79d0614dcf04a12aa44282198a0af4d9fee40fa0b70abb745" => :el_capitan
|
2015-11-19 15:45:31 +00:00
|
|
|
sha256 "c729e81f3952e8475ec4fe1ed4dc5a870e550af781b877a610a09686e9fe8a71" => :mavericks
|
|
|
|
sha256 "74a74e153dda86a7d08ab9cf293c1ac8796f64d1f94f0f31590ee96de88b2c3d" => :mountain_lion
|
|
|
|
sha256 "7ff316d9e43e5a55b95d381f13f0429a87ff36d39425fb62ec2af2cb00fc22af" => :lion
|
2014-06-29 03:47:43 +00:00
|
|
|
end
|
|
|
|
|
2015-10-07 08:43:31 +00:00
|
|
|
# Note - The Freecode website is no longer being updated and alternative
|
|
|
|
# links should be found from now on.
|
2014-06-29 03:22:57 +00:00
|
|
|
|
2015-10-07 08:43:31 +00:00
|
|
|
option "with-bzip2", "Use bzip2(1) instead of gzip(1) for compression/decompression"
|
|
|
|
deprecated_option "bzip2" => "with-bzip2"
|
2013-11-04 09:08:10 +00:00
|
|
|
|
|
|
|
def install
|
2015-10-07 08:43:31 +00:00
|
|
|
if build.with? "bzip2"
|
2013-11-04 09:08:10 +00:00
|
|
|
inreplace "Makefile", "-DPRG_COMPRESS='\"gzip\"'", "-DPRG_COMPRESS='\"bzip2\"'"
|
|
|
|
inreplace "afio.c", "with -o: gzip files", "with -o: bzip2 files"
|
|
|
|
inreplace "afio.1", "gzip", "bzip2"
|
|
|
|
inreplace "afio.1", "bzip2, bzip2,", "gzip, bzip2,"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "make", "DESTDIR=#{prefix}"
|
|
|
|
bin.install "afio"
|
2015-08-03 12:55:31 +00:00
|
|
|
man1.install "afio.1"
|
2013-11-04 09:08:10 +00:00
|
|
|
|
2015-10-07 08:43:31 +00:00
|
|
|
prefix.install "ANNOUNCE-2.5.1" => "ANNOUNCE"
|
|
|
|
prefix.install %w[INSTALLATION SCRIPTS]
|
2013-11-04 09:08:10 +00:00
|
|
|
share.install Dir["script*"]
|
|
|
|
end
|
2015-10-07 08:43:31 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
path = testpath/"test"
|
|
|
|
path.write "homebrew"
|
|
|
|
pipe_output("#{bin}/afio -o archive", "test\n")
|
|
|
|
|
|
|
|
system "#{bin}/afio", "-r", "archive"
|
|
|
|
path.unlink
|
|
|
|
|
|
|
|
system "#{bin}/afio", "-t", "archive"
|
|
|
|
system "#{bin}/afio", "-i", "archive"
|
|
|
|
assert_equal "homebrew", path.read.chomp
|
|
|
|
end
|
2013-11-04 09:08:10 +00:00
|
|
|
end
|