File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ class Lz4 < Formula
2
+ desc "Extremely Fast Compression algorithm"
3
+ homepage "https://lz4.github.io/lz4/"
4
+ url "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz"
5
+ mirror "http://fresh-center.net/linux/misc/lz4-1.10.0.tar.gz"
6
+ mirror "http://fresh-center.net/linux/misc/legacy/lz4-1.10.0.tar.gz"
7
+ sha256 "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b"
8
+ license "BSD-2-Clause"
9
+ head "https://github.com/lz4/lz4.git" , branch : "dev"
10
+
11
+ livecheck do
12
+ url :stable
13
+ strategy :github_latest
14
+ end
15
+
16
+ bottle do
17
+ root_url "https://github.com/gromgit/homebrew-core-aarch64_linux/releases/download/lz4-1.10.0"
18
+ sha256 cellar : :any_skip_relocation , aarch64_linux : "fa354479718dd907fb13a2f8a47d7ad6d3ba669891f953948e50585adebca6c8"
19
+ end
20
+
21
+ def install
22
+ system "make" , "install" , "PREFIX=#{ prefix } "
23
+ # Prevent dependents from hardcoding Cellar paths.
24
+ inreplace lib /"pkgconfig/liblz4.pc" , prefix , opt_prefix
25
+ end
26
+
27
+ test do
28
+ input = "testing compression and decompression"
29
+ input_file = testpath /"in"
30
+ input_file . write input
31
+ output_file = testpath /"out"
32
+ system "sh" , "-c" , "cat #{ input_file } | #{ bin } /lz4 | #{ bin } /lz4 -d > #{ output_file } "
33
+ assert_equal output_file . read , input
34
+ end
35
+ end
You can’t perform that action at this time.
0 commit comments