lvm2: added systemd build option.
This commit is contained in:
parent
ab3f9f89ef
commit
7a61d2deba
1 changed files with 20 additions and 12 deletions
|
@ -1,14 +1,13 @@
|
||||||
# Template file for 'lvm2'
|
# Template file for 'lvm2'
|
||||||
pkgname=lvm2
|
pkgname=lvm2
|
||||||
version=2.02.109
|
version=2.02.109
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc=LVM2.${version}
|
wrksrc=LVM2.${version}
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--disable-selinux --enable-readline --enable-pkgconfig
|
configure_args="--disable-selinux --enable-readline --enable-pkgconfig
|
||||||
--enable-fsadm --enable-applib --sbindir=/usr/sbin --libdir=/usr/lib
|
--enable-fsadm --enable-applib --sbindir=/usr/sbin --libdir=/usr/lib
|
||||||
--enable-dmeventd --enable-cmdlib --enable-udev_sync --enable-udev_rules
|
--enable-dmeventd --enable-cmdlib --enable-udev_sync --enable-udev_rules
|
||||||
--with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
|
--with-udevdir=/usr/lib/udev/rules.d --with-default-pid-dir=/run
|
||||||
--with-systemdsystemunitdir=/usr/lib/systemd/system
|
|
||||||
--with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
|
--with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
|
||||||
--with-default-locking-dir=/run/lock/lvm --enable-lvmetad"
|
--with-default-locking-dir=/run/lock/lvm --enable-lvmetad"
|
||||||
hostmakedepends="pkg-config"
|
hostmakedepends="pkg-config"
|
||||||
|
@ -26,12 +25,19 @@ license="GPL-2, LGPL-2.1"
|
||||||
distfiles="ftp://sources.redhat.com/pub/lvm2/LVM2.${version}.tgz"
|
distfiles="ftp://sources.redhat.com/pub/lvm2/LVM2.${version}.tgz"
|
||||||
checksum=7bc95ba5209c8aa5bd492167b2e2797f156852ed11cfc63fb783070ade8e65e7
|
checksum=7bc95ba5209c8aa5bd492167b2e2797f156852ed11cfc63fb783070ade8e65e7
|
||||||
|
|
||||||
|
build_options="systemd"
|
||||||
|
if [ "$build_option_systemd" ]; then
|
||||||
|
configure_args+=" --with-systemdsystemunitdir=/usr/lib/systemd/system"
|
||||||
|
fi
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
if [ "$build_option_systemd" ]; then
|
||||||
vinstall ${FILESDIR}/lvm2.tmpfiles 644 usr/lib/tmpfiles.d lvm2.conf
|
vinstall ${FILESDIR}/lvm2.tmpfiles 644 usr/lib/tmpfiles.d lvm2.conf
|
||||||
vinstall ${FILESDIR}/lvm-monitoring.service 644 usr/lib/systemd/system
|
vinstall ${FILESDIR}/lvm-monitoring.service 644 usr/lib/systemd/system
|
||||||
vinstall ${FILESDIR}/lvmetad.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}/lvmetad.socket 644 usr/lib/systemd/system
|
||||||
vinstall ${FILESDIR}/lvm-on-crypt.service 644 usr/lib/systemd/system
|
vinstall ${FILESDIR}/lvm-on-crypt.service 644 usr/lib/systemd/system
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
device-mapper-devel_package() {
|
device-mapper-devel_package() {
|
||||||
|
@ -60,11 +66,13 @@ device-mapper_package() {
|
||||||
for f in 10-dm 13-dm-disk 95-dm-notify; do
|
for f in 10-dm 13-dm-disk 95-dm-notify; do
|
||||||
vmove usr/lib/udev/rules.d/${f}.rules
|
vmove usr/lib/udev/rules.d/${f}.rules
|
||||||
done
|
done
|
||||||
install -d ${PKGDESTDIR}/usr/lib/systemd/system/sockets.target.wants
|
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.service 644 usr/lib/systemd/system
|
||||||
vinstall ${FILESDIR}/dmeventd.socket 644 usr/lib/systemd/system
|
vinstall ${FILESDIR}/dmeventd.socket 644 usr/lib/systemd/system
|
||||||
ln -sf /usr/lib/systemd/system/dmeventd.socket \
|
ln -sf /usr/lib/systemd/system/dmeventd.socket \
|
||||||
${PKGDESTDIR}/usr/lib/systemd/system/sockets.target.wants/dmeventd.socket
|
${PKGDESTDIR}/usr/lib/systemd/system/sockets.target.wants/dmeventd.socket
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue