lvm2: enable also static linking

This commit is contained in:
Andrea Brancaleoni 2018-01-11 12:06:04 +01:00 committed by Andrea Brancaleoni
parent 6a58c9ed61
commit d98ae1ca67

View file

@ -1,7 +1,7 @@
# Template file for 'lvm2'
pkgname=lvm2
version=2.02.177
revision=1
revision=2
wrksrc="LVM2.${version}"
build_style=gnu-configure
configure_args="--disable-selinux --enable-readline --enable-pkgconfig
@ -11,7 +11,7 @@ configure_args="--disable-selinux --enable-readline --enable-pkgconfig
--with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
--with-default-locking-dir=/run/lock/lvm"
hostmakedepends="pkg-config"
makedepends="libblkid-devel readline-devel eudev-libudev-devel"
makedepends="libblkid-devel libuuid-devel readline-devel eudev-libudev-devel"
depends="thin-provisioning-tools"
make_dirs="
/etc/lvm/archive 0755 root root
@ -24,11 +24,21 @@ license="GPL-2, LGPL-2.1"
distfiles="https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${version}.tgz"
checksum=4025a23ec9b15c2cb7486d151c29dc953b75efc4d452cfe9dbbc7c0fac8e80f2
case $XBPS_TARGET_MACHINE in
*-musl)
configure_args+=" --enable-static_link"
;;
esac
do_check() {
# requires opening /dev/kmsg which requires root
:
}
pre_configure() {
sed -i 's|@BLKID_LIBS@|-lblkid -luuid|g' make.tmpl.in
}
post_install() {
sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
case $XBPS_TARGET_MACHINE in
@ -37,6 +47,8 @@ post_install() {
;;
esac
vsv lvmetad
vmkdir usr/bin
mv -f ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin/ || true
}
device-mapper-devel_package() {
@ -50,6 +62,11 @@ device-mapper-devel_package() {
vmove usr/include/lvm2cmd.h
vmove usr/lib/liblvm2cmd.so
vmove "usr/lib/libdevmapper*.so"
case $XBPS_TARGET_MACHINE in
*-musl)
vmove "usr/lib/*.a"
;;
esac
}
}
device-mapper_package() {