summaryrefslogtreecommitdiff
path: root/repo/lvm2/lvm2.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-15 20:02:02 +0100
committerdavidovski <david@davidovski.xyz>2022-06-15 20:02:02 +0100
commitd2567bfbdf0e9fa6db0a6ed1534831ec859a3e03 (patch)
tree684a17eebf446aa1adab1097616f1882c8d51568 /repo/lvm2/lvm2.xibuild
parentd1fc3393cca72e8e432f827f7624e38734fad6dc (diff)
added deps for qemu
Diffstat (limited to 'repo/lvm2/lvm2.xibuild')
-rw-r--r--repo/lvm2/lvm2.xibuild65
1 files changed, 65 insertions, 0 deletions
diff --git a/repo/lvm2/lvm2.xibuild b/repo/lvm2/lvm2.xibuild
new file mode 100644
index 0000000..1d7f0bd
--- /dev/null
+++ b/repo/lvm2/lvm2.xibuild
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+NAME="lvm2"
+DESC="Logical Volume Manager 2 utilities"
+
+MAKEDEPS="linux-headers libaio util-linux"
+
+PKG_VER=2.02.187
+SOURCE="https://mirrors.kernel.org/sourceware/lvm2/LVM2.$PKG_VER.tgz"
+
+ADDITIONAL="
+dmeventd.initd
+fix-stdio-usage.patch
+library_dir-default-config.patch
+lvm.confd
+lvm.initd
+mallinfo.patch
+mlockall-default-config.patch
+"
+
+prepare() {
+ apply_patches
+ sed -i "s/fmt -1/fmt/" make.tmpl.in
+ sed -i "s/@MKDIR_P@/mkdir -p/" make.tmpl.in
+ sed -i "s/@INSTALL@/install/" make.tmpl.in
+ sed -i "s/\$(INSTALL) -p/\$(INSTALL)/" make.tmpl.in
+ autoreconf -vif
+}
+
+build() {
+ # during cross-compilation malloc test goes wrong
+ export ac_cv_func_malloc_0_nonnull=yes
+ export ac_cv_func_realloc_0_nonnull=yes
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/lib \
+ --sbindir=/sbin \
+ --localstatedir=/var \
+ --disable-nls \
+ --disable-readline \
+ --enable-pkgconfig \
+ --enable-applib \
+ --with-thin=internal \
+ --enable-dmeventd \
+ --enable-cmdlib \
+ --with-thin-check=/sbin/thin_check \
+ --with-thin-dump=/sbin/thin_dump \
+ --with-thin-repair=/sbin/thin_repair \
+ --with-dmeventd-path=/sbin/dmeventd \
+ --enable-udev_rules \
+ CLDFLAGS="$LDFLAGS" \
+ SHELL="/bin/bash"
+ make
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install || return 1
+ install -d "$PKG_DEST"/etc/lvm/archive "$PKG_DEST"/etc/lvm/backup
+ install -Dm755 "$BUILD_ROOT"/lvm.initd "$PKG_DEST"/etc/init.d/lvm
+ install -Dm644 "$BUILD_ROOT"/lvm.confd "$PKG_DEST"/etc/conf.d/lvm
+ install -Dm644 "$BUILD_ROOT"/lvm.confd "$PKG_DEST"/etc/conf.d/lvm
+ ln -s libdevmapper.so.1.02 "$PKG_DEST"/lib/libdevmapper.so
+}