47 lines
1.3 KiB
Ruby
47 lines
1.3 KiB
Ruby
class DeviceMapper < Formula
|
|
desc "Userspace library and tools for logical volume management"
|
|
homepage "https://sourceware.org/dm"
|
|
url "https://sourceware.org/git/lvm2.git",
|
|
tag: "v2_03_18",
|
|
revision: "2772d299174c25f054b4e5ceb0e86aec661b12f6"
|
|
license "LGPL-2.1-only"
|
|
|
|
livecheck do
|
|
url :stable
|
|
strategy :page_match
|
|
regex(/href=.*?;a=tag;.*?>Release (\d+(?:\.\d+)+)</i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "53cb702e6f0997505eda86d4629b4e289b4e12b5df6218032c54325ba03e6ffa"
|
|
end
|
|
|
|
depends_on "libaio"
|
|
depends_on :linux
|
|
|
|
def install
|
|
# https://github.com/NixOS/nixpkgs/pull/52597
|
|
ENV.deparallelize
|
|
system "./configure", "--disable-debug",
|
|
"--disable-dependency-tracking",
|
|
"--disable-silent-rules",
|
|
"--prefix=#{prefix}",
|
|
"--enable-pkgconfig"
|
|
system "make", "device-mapper"
|
|
system "make", "install_device-mapper"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
#include <libdevmapper.h>
|
|
|
|
int main() {
|
|
if (DM_STATS_REGIONS_ALL != UINT64_MAX)
|
|
exit(1);
|
|
}
|
|
EOS
|
|
system ENV.cc, "-I#{include}", "-L#{lib}", "-ldevmapper", "test.c", "-o", "test"
|
|
system testpath/"test"
|
|
end
|
|
end
|