void-packages/srcpkgs/dkms/template
Piraty ae715228a2 dkms: build 'prepare0' instead of 'scripts'
to ensure modpost is built on the host else modules don't build
on crossbuilt kernels >= 5.0 since
    linux/60df1aee2aecb53efb4218b4dfdf7d6c80a5a3de
moved modpost from target 'scripts' to 'prepare0'.

The same has been applied to xbps-triggers/dkms
2020-11-08 23:46:24 +01:00

34 lines
1.1 KiB
Bash

# Template file for 'dkms'
pkgname=dkms
version=2.8.3
revision=3
conf_files="/etc/dkms/framework.conf"
depends="bash kmod gcc make coreutils"
short_desc="Dynamic Kernel Modules System"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://github.com/dell/dkms"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=0fcbb2691aa8231927b000edf3594d2798211c3944fd4a2a8b1864aa1c06eaaf
case "$XBPS_TARGET_MACHINE" in
# Too many competing kernels for arm* to depend on linux-headers
arm*) ;;
*) depends+=" linux-headers" ;;
esac
if [ "$CROSS_BUILD" ]; then
depends+=" libressl-devel gmp-devel libada-devel libmpc-devel flex"
fi
do_install() {
# We are only interested in the bare minimum.
vbin dkms
vman dkms.8
vinstall dkms_dbversion 644 var/lib/dkms
vinstall dkms.bash-completion 644 usr/share/bash-completion/completions dkms
vinstall dkms_framework.conf 644 etc/dkms framework.conf
# Kernel hooks.
vinstall ${FILESDIR}/kernel.d/dkms.postinst 754 etc/kernel.d/post-install 10-dkms
vinstall ${FILESDIR}/kernel.d/dkms.prerm 754 etc/kernel.d/pre-remove 10-dkms
}