90 lines
3.3 KiB
Bash
90 lines
3.3 KiB
Bash
# Template file for 'lvm2'
|
|
pkgname=lvm2
|
|
version=2.02.120
|
|
revision=4
|
|
wrksrc=LVM2.${version}
|
|
build_style=gnu-configure
|
|
configure_args="--disable-selinux --enable-readline --enable-pkgconfig
|
|
--enable-fsadm --enable-applib --sbindir=/usr/bin --libdir=/usr/lib
|
|
--enable-dmeventd --enable-cmdlib --enable-udev_sync --enable-udev_rules
|
|
--with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
|
|
--with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
|
|
--with-default-locking-dir=/run/lock/lvm --enable-lvmetad
|
|
$(vopt_if systemd --with-systemdsystemunitdir=/usr/lib/systemd/system)"
|
|
hostmakedepends="pkg-config"
|
|
# By using eudev we avoid a cyclic dependency:
|
|
# device-mapper -> systemd -> cryptsetup -> device-mapper
|
|
makedepends="libblkid-devel readline-devel eudev-libudev-devel"
|
|
make_dirs="
|
|
/etc/lvm/archive 0755 root root
|
|
/etc/lvm/backup 0755 root root"
|
|
conf_files="/etc/lvm/lvm.conf"
|
|
build_options="systemd"
|
|
short_desc="Logical Volume Manager 2 utilities"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
homepage="http://sourceware.org/lvm2/"
|
|
license="GPL-2, LGPL-2.1"
|
|
distfiles="ftp://sources.redhat.com/pub/lvm2/LVM2.${version}.tgz"
|
|
checksum=8d6bd02f7d00315482538ece3e831cd81709c29d74ce71229c60192fb166081a
|
|
|
|
post_install() {
|
|
if [ "$build_option_systemd" ]; then
|
|
vinstall ${FILESDIR}/lvm2.tmpfiles 644 usr/lib/tmpfiles.d lvm2.conf
|
|
vinstall ${FILESDIR}/lvm-monitoring.service 644 usr/lib/systemd/system
|
|
vinstall ${FILESDIR}/lvmetad.service 644 usr/lib/systemd/system
|
|
vinstall ${FILESDIR}/lvmetad.socket 644 usr/lib/systemd/system
|
|
vinstall ${FILESDIR}/lvm-on-crypt.service 644 usr/lib/systemd/system
|
|
fi
|
|
sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
|
|
vsv lvmetad
|
|
}
|
|
|
|
device-mapper-devel_package() {
|
|
depends="readline-devel>=6.3 ncurses-devel device-mapper>=${version}_${revision}"
|
|
short_desc="Device Mapper userspace library - development files"
|
|
pkg_install() {
|
|
vmove usr/lib/pkgconfig/devmapper.pc
|
|
vmove usr/lib/pkgconfig/devmapper-event.pc
|
|
vmove usr/include/libdevmapper.h
|
|
vmove usr/include/libdevmapper-event.h
|
|
vmove usr/include/lvm2cmd.h
|
|
vmove usr/lib/liblvm2cmd.so
|
|
vmove "usr/lib/libdevmapper*.so"
|
|
}
|
|
}
|
|
device-mapper_package() {
|
|
short_desc="Device Mapper userspace library and tools"
|
|
pkg_install() {
|
|
vmove "usr/bin/dm*"
|
|
vmove "usr/lib/libdevmapper*.so.*"
|
|
vmove "usr/lib/liblvm2cmd.so.*"
|
|
vmove "usr/share/man/man8/dm*"
|
|
vmove usr/lib/device-mapper
|
|
for f in 10-dm 13-dm-disk 95-dm-notify; do
|
|
vmove usr/lib/udev/rules.d/${f}.rules
|
|
done
|
|
if [ "$build_option_systemd" ]; then
|
|
vmkdir usr/lib/systemd/system/sockets.target.wants
|
|
vinstall ${FILESDIR}/dmeventd.service 644 usr/lib/systemd/system
|
|
vinstall ${FILESDIR}/dmeventd.socket 644 usr/lib/systemd/system
|
|
ln -sf /usr/lib/systemd/system/dmeventd.socket \
|
|
${PKGDESTDIR}/usr/lib/systemd/system/sockets.target.wants/dmeventd.socket
|
|
fi
|
|
vsv dmeventd
|
|
}
|
|
}
|
|
liblvm2app-devel_package() {
|
|
depends="device-mapper-devel>=${version}_${revision} libblkid-devel liblvm2app>=${version}_${revision}"
|
|
short_desc="LVM2 application library - development files"
|
|
pkg_install() {
|
|
vmove usr/include/lvm2app.h
|
|
vmove "usr/lib/pkgconfig/lvm2app*"
|
|
vmove usr/lib/liblvm2app.so
|
|
}
|
|
}
|
|
liblvm2app_package() {
|
|
short_desc="LVM2 application library"
|
|
pkg_install() {
|
|
vmove "usr/lib/liblvm2app.so.*"
|
|
}
|
|
}
|