void-packages/srcpkgs/kernel-libc-headers/template

39 lines
958 B
Bash

# Template file for 'kernel-libc-headers'
pkgname=kernel-libc-headers
version=5.10.4
revision=1
bootstrap=yes
wrksrc=linux-${version}
short_desc="Linux API headers for userland development"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="GPL-2.0-only"
homepage="http://www.kernel.org"
distfiles="$KERNEL_SITE/kernel/v${version%%.*}.x/linux-${version}.tar.xz"
checksum=904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
patch_args=-Np0
if [ "$CHROOT_READY" ]; then
hostmakedepends="perl"
fi
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) _arch="x86";;
arm*) _arch="arm";;
aarch64*) _arch="arm64";;
mips*) _arch="mips";;
ppc*) _arch="powerpc";;
*) msg_error "$pkgname: unknown architecture.\n";;
esac
do_build() {
make mrproper
make ARCH=${_arch} headers
# remove extra files and drm headers
find usr/include -name '.*' -delete
rm usr/include/Makefile
rm -rf usr/include/drm
}
do_install() {
vcopy usr/include usr
}