brotli 0.2.0 (new formula)

Closes Homebrew/homebrew#47603.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
master
Jonny Barnes 2016-01-02 14:32:23 +00:00 committed by Baptiste Fontaine
parent 05ad913970
commit 9fd6ec76b3
1 changed files with 24 additions and 0 deletions

24
Formula/brotli.rb Normal file
View File

@ -0,0 +1,24 @@
class Brotli < Formula
desc "Generic-purpose lossless compression algorithm by Google."
homepage "https://github.com/google/brotli"
url "https://github.com/google/brotli/archive/v0.2.0.tar.gz"
sha256 "634d1089ee21b35e0ec5066cb5e44dd097e04e679e1e8c50bffa2b0dc77c2c29"
head "https://github.com/google/brotli.git"
depends_on :python if MacOS.version <= :snow_leopard
conflicts_with "bro", :because => "Both install a `bro` binary"
def install
system "make", "-C", "tools"
bin.install "tools/bro" => "bro"
end
test do
(testpath/"file.txt").write("Hello, World!")
system "#{bin}/bro", "--input", "file.txt", "--output", "file.txt.br"
system "#{bin}/bro", "--input", "file.txt.br", "--output", "out.txt", "--decompress"
assert_equal (testpath/"file.txt").read, (testpath/"out.txt").read
end
end