homebrew-core/Formula/deark.rb
2018-08-24 04:05:37 +01:00

29 lines
960 B
Ruby

require "base64"
class Deark < Formula
desc "File conversion utility for older formats"
homepage "http://entropymine.com/deark/"
url "http://entropymine.com/deark/releases/deark-1.4.7.tar.gz"
sha256 "f26441f7f361e9f4bf584866d46995e35441ea88f269cb6c024881a5d17c11ff"
bottle do
cellar :any_skip_relocation
sha256 "08b71c8e1e78027c5a2803ce561460c61a7b85a0d9ee1b5853d388032b6c3549" => :high_sierra
sha256 "68c9616ad4a90b7b364e1918ac6938a8b2b8bc407a97fd72b437dac6aa0d6230" => :sierra
sha256 "0927ea0354c7f6da3d71dda9cb060a407d4325eba2e6c37da62118666936fcb6" => :el_capitan
end
def install
system "make"
bin.install "deark"
end
test do
(testpath/"test.gz").write ::Base64.decode64 <<~EOS
H4sICKU51VoAA3Rlc3QudHh0APNIzcnJ11HwyM9NTSpKLVfkAgBuKJNJEQAAAA==
EOS
system "#{bin}/deark", "test.gz"
file = (testpath/"output.000.test.txt").readlines.first
assert_match "Hello, Homebrew!", file
end
end