void-packages/srcpkgs/dracut/template

71 lines
2.3 KiB
Bash

# Template file for 'dracut'
pkgname=dracut
version=056
revision=1
build_style=configure
configure_args="--prefix=/usr --sysconfdir=/etc"
conf_files="/etc/dracut.conf"
hostmakedepends="pkg-config"
makedepends="libkmod-devel"
depends="bash coreutils cpio eudev gzip kmod>=3.7 kpartx util-linux"
short_desc="Low-level tool for generating an initramfs/initrd image"
maintainer="Orphaned <orphan@voidlinux.org>"
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=e025bbdce9d1209640fb3f5f674f059c7e1f441537ba421703fe56055502421d
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"
make_check=no # tests require root
make_dirs="
/etc/dracut.conf.d 0755 root root
/usr/lib/dracut/dracut.conf.d 0755 root root"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-fts-devel"
fi
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) # archs supported by dracut for EFI bundle
subpackages+=" dracut-uefi"
;;
esac
post_install() {
# kernel hooks.
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*
rm -f ${DESTDIR}/usr/share/man/man8/*.service.*
rm -rf ${DESTDIR}/usr/lib/kernel
}
dracut-network_package() {
depends="dhclient ${sourcepkg}-${version}_${revision}"
short_desc+=" - network modules"
pkg_install() {
for f in 40network 90livenet 95fcoe 95iscsi \
95nbd 95nfs 95zfcp 95znet; do
vmove usr/lib/dracut/modules.d/${f}
done
}
}
dracut-uefi_package() {
depends="binutils gummiboot-efistub ${sourcepkg}>=${version}_${revision}"
short_desc+=" - UEFI bundle hook"
conf_files="/etc/default/dracut-uefi-hook"
pkg_install() {
vinstall ${FILESDIR}/dracut-uefi-hook.confd 644 etc/default dracut-uefi-hook
vinstall ${FILESDIR}/kernel-uefi-hook-postinst 755 etc/kernel.d/post-install 20-dracut-uefi
vinstall ${FILESDIR}/kernel-uefi-hook-postrm 755 etc/kernel.d/post-remove 20-dracut-uefi
}
}