device-mapper (new formula) (#63014)
parent
d696ac2a46
commit
e9b6374f04
|
@ -3,6 +3,7 @@ on:
|
|||
pull_request:
|
||||
paths:
|
||||
- "Formula/alsa-lib.rb"
|
||||
- "Formula/device-mapper.rb"
|
||||
- "Formula/libaio.rb"
|
||||
- "Formula/ladspa-sdk.rb"
|
||||
- "Formula/libdrm.rb"
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
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_10",
|
||||
revision: "4d9f0606beb0acb329794909560433c08b50875d"
|
||||
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
|
Loading…
Reference in New Issue