2014-03-14 09:46:55 +00:00
|
|
|
class Lz4 < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Lossless compression algorithm"
|
2015-06-14 08:07:06 +00:00
|
|
|
homepage "http://www.lz4.info/"
|
2015-07-19 15:08:22 +00:00
|
|
|
url "https://github.com/Cyan4973/lz4/archive/r131.tar.gz"
|
|
|
|
version "r131"
|
2015-07-22 13:34:01 +00:00
|
|
|
sha256 "9d4d00614d6b9dec3114b33d1224b6262b99ace24434c53487a0c8fd0b18cfed"
|
|
|
|
head "https://github.com/Cyan4973/lz4.git"
|
2014-03-14 09:46:55 +00:00
|
|
|
|
2014-03-17 10:44:37 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-09-21 18:49:30 +00:00
|
|
|
sha256 "cc8e425ec43dc5dd3132af0d9138f75510c2e15c612dff8d6276f8e701e44c66" => :el_capitan
|
2015-07-19 16:59:54 +00:00
|
|
|
sha256 "246808b1662baa862812fb15923f997e40329bcb0c0ebd4595af5eb90d9c5ff9" => :yosemite
|
|
|
|
sha256 "c38d6b8d0d0c65580e422b3baa3f19cb051e9c02f05ee02ea1fbb5721959a764" => :mavericks
|
|
|
|
sha256 "549d8bdae519e3315ecfab95ffd3a657d6991f72571c9720dc7d976d7445bd24" => :mountain_lion
|
2014-03-17 10:44:37 +00:00
|
|
|
end
|
|
|
|
|
2014-03-14 09:46:55 +00:00
|
|
|
def install
|
|
|
|
system "make", "install", "PREFIX=#{prefix}"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
input = "testing compression and decompression"
|
|
|
|
input_file = testpath/"in"
|
|
|
|
input_file.write input
|
|
|
|
output_file = testpath/"out"
|
2014-05-21 21:34:20 +00:00
|
|
|
system "sh", "-c", "cat #{input_file} | #{bin}/lz4 | #{bin}/lz4 -d > #{output_file}"
|
|
|
|
assert_equal output_file.read, input
|
2014-03-14 09:46:55 +00:00
|
|
|
end
|
|
|
|
end
|