void-packages/srcpkgs/dracut/template
2020-03-17 08:15:24 +01:00

59 lines
1.7 KiB
Bash

# Template file for 'dracut'
pkgname=dracut
version=050
revision=2
build_style=configure
configure_args="--prefix=/usr --sysconfdir=/etc"
conf_files="/etc/dracut.conf"
hostmakedepends="asciidoc 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="q66 <daniel@octaforge.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="https://github.com/dracutdevs/dracut/archive/${version}.tar.gz"
checksum=f9dbf18597e5929221365964293212c8c9ffb7d84529c5a338c834ecab06e333
make_dirs="
/etc/dracut.conf.d 0755 root root
/usr/lib/dracut/dracut.conf.d 0755 root root"
case "$XBPS_TARGET_MACHINE" in
*-musl) # Add musl-fts implementation
makedepends+=" musl-fts-devel"
;;
esac
do_build() {
case "$XBPS_TARGET_MACHINE" in
*-musl) make ${makejobs} LDLIBS="-lfts" ;;
esac
}
do_check() {
# Requires the distfile to be a git repository
:
}
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
# 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 dracut-${version}_${revision}"
short_desc+=" - network modules"
archs=noarch
pkg_install() {
for f in 40network 90livenet 95fcoe 95iscsi \
95nbd 95nfs 95zfcp 95znet; do
vmove usr/lib/dracut/modules.d/${f}
done
}
}