43 lines
1.2 KiB
Ruby
43 lines
1.2 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_11",
|
|
revision: "3e8bd8d1bd70691f09a170785836aeb4f83154e6"
|
|
license "LGPL-2.1-only"
|
|
|
|
livecheck do
|
|
url :stable
|
|
strategy :page_match
|
|
regex(/href=.*?;a=tag;.*?>Release (\d+(?:\.\d+)+)</i)
|
|
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
|