dracut: use alternatives for kernel hooks

This commit is contained in:
Andrew J. Hesford 2022-09-14 11:30:28 -04:00 committed by Andrew J. Hesford
parent 3287298a7b
commit f5bdafe7ee
1 changed files with 7 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'dracut'
pkgname=dracut
version=053
revision=3
revision=4
build_style=configure
configure_args="--prefix=/usr --sysconfdir=/etc"
conf_files="/etc/dracut.conf"
@ -14,6 +14,10 @@ license="GPL-2.0-or-later, LGPL-2.0-or-later"
homepage="http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html"
distfiles="${KERNEL_SITE}/utils/boot/dracut/dracut-${version}.tar.xz"
checksum=d5a1b47cdb07919d8225d5b5f538e6ae604988f3df0afbde99a8dc775277b726
alternatives="
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/dracut/kernel-hook-postinst
initramfs:/etc/kernel.d/post-remove/20-initramfs:/usr/libexec/dracut/kernel-hook-postrm
"
subpackages="dracut-network"
# Checks require distfiles come from a git repository
make_check=no
@ -34,8 +38,8 @@ esac
post_install() {
# kernel hooks.
vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-dracut
vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-dracut
vinstall ${FILESDIR}/kernel-hook-postinst 755 usr/libexec/dracut
vinstall ${FILESDIR}/kernel-hook-postrm 755 usr/libexec/dracut
# We don't need the systemd stuff.
rm -rf ${DESTDIR}/usr/lib/dracut/modules.d/*systemd*