37 lines
1.1 KiB
Ruby
37 lines
1.1 KiB
Ruby
class Attr < Formula
|
|
desc "Manipulate filesystem extended attributes"
|
|
homepage "https://savannah.nongnu.org/projects/attr"
|
|
url "https://download.savannah.nongnu.org/releases/attr/attr-2.5.1.tar.gz"
|
|
mirror "https://mirror.csclub.uwaterloo.ca/nongnu/attr/attr-2.5.1.tar.gz"
|
|
sha256 "bae1c6949b258a0d68001367ce0c741cebdacdd3b62965d17e5eb23cd78adaf8"
|
|
license "GPL-2.0-or-later"
|
|
|
|
livecheck do
|
|
url "https://download.savannah.nongnu.org/releases/attr/"
|
|
regex(/href=.*?attr[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 x86_64_linux: "a05ee49c7e8fcf992d4cc1cf6f1a9f72a6800ddcfa11f70dbf6ab957ed847ff3"
|
|
end
|
|
|
|
depends_on "gettext" => :build
|
|
depends_on :linux
|
|
|
|
def install
|
|
system "./configure",
|
|
"--disable-debug",
|
|
"--disable-dependency-tracking",
|
|
"--disable-silent-rules",
|
|
"--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.txt").write("Hello World!\n")
|
|
system bin/"attr", "-s", "name", "test.txt"
|
|
assert_match 'Attribute "name" has a 0 byte value for test.txt',
|
|
shell_output(bin/"attr -l test.txt")
|
|
end
|
|
end
|