mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-08 18:33:54 +00:00
31 lines
1.0 KiB
Ruby
31 lines
1.0 KiB
Ruby
require File.expand_path("../Abstract/abstract-osquery-formula", __FILE__)
|
|
|
|
class Lz4 < AbstractOsqueryFormula
|
|
desc "Lossless compression algorithm"
|
|
homepage "http://www.lz4.info/"
|
|
url "https://github.com/Cyan4973/lz4/archive/r131.tar.gz"
|
|
version "r131"
|
|
sha256 "9d4d00614d6b9dec3114b33d1224b6262b99ace24434c53487a0c8fd0b18cfed"
|
|
head "https://github.com/Cyan4973/lz4.git"
|
|
|
|
bottle do
|
|
root_url "https://osquery-packages.s3.amazonaws.com/bottles"
|
|
cellar :any_skip_relocation
|
|
sha256 "3e76610faa04e0ba81a8b58de3421be77f7e226db6d78bab88eac0df82a947bf" => :el_capitan
|
|
sha256 "684e6c315fa4a4ada277771559f5504c57363d5192c9252bffc6085dee9e04ec" => :x86_64_linux
|
|
end
|
|
|
|
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"
|
|
system "sh", "-c", "cat #{input_file} | #{bin}/lz4 | #{bin}/lz4 -d > #{output_file}"
|
|
assert_equal output_file.read, input
|
|
end
|
|
end
|