59 lines
2.2 KiB
Plaintext

# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=linux-headers
pkgver=5.10.41
_kernver=${pkgver%.*}
pkgrel=0
pkgdesc="Linux system headers"
url="http://kernel.org"
arch="all"
license="GPL-2.0-only"
makedepends="perl rsync"
options="!check !dbg !strip !tracedeps"
source="https://kernel.org/pub/linux/kernel/v5.x/linux-$_kernver.tar.xz
https://kernel.org/pub/linux/kernel/v5.x/patch-$pkgver.xz
revert-broken-uapi.patch
0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch
add-btf-float-uapi.patch
"
builddir="$srcdir/linux-$_kernver"
prepare() {
if [ "$_kernver" != "$pkgver" ]; then
unxz -c < "$srcdir"/patch-$pkgver.xz | patch -p1
fi
default_prepare
}
package() {
local _carch=$CARCH
case "$_carch" in
aarch64*) _carch="arm64" ;;
arm*) _carch="arm" ;;
mips*) _carch="mips" ;;
s390*) _carch="s390" ;;
ppc*) _carch="powerpc" ;;
riscv*) _carch="riscv" ;;
# not sure about this -- ppc64*) _carch="powerpc64" ;;
esac
mkdir -p "$pkgdir/usr"
make headers_install ARCH="$_carch" INSTALL_HDR_PATH="$pkgdir/usr"
find "$pkgdir/usr" \( -name .install -o -name ..install.cmd \) -exec \
rm -f {} \;
# provided by libdrm
rm -rf "$pkgdir"/usr/include/drm
}
sha512sums="
95bc137d0cf9148da6a9d1f1a878698dc27b40f68e22c597544010a6c591ce1b256f083489d3ff45ff77753289b535135590194d88ef9f007d0ddab3d74de70e linux-5.10.tar.xz
58164cd7a7f75b5de01affc61795f3f9386f9e4adfcc71ea8a4f03ffe34c1ec33e48f9c537a456a06afad2cdd9af672485c51ecff0fa495ef7f72f5ee2b5fa6f patch-5.10.41.xz
32597f2672d1ec365a936d15041a7cf219ef9353241d4a5c378244cf2fc155610443a19bbcd391c86099a0b08486c45e042ec7c90b0d04fe675c3ad0ffc36b53 revert-broken-uapi.patch
607c074d72aca88fea9ecdbd62198d8f7857daca75e5d027966e0a9997338d6ac8ce0a1e9114b19232b390751d05acca09e28b0cfad2a12d5942f5575a9f4684 0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
7cfa786144009c52d682e307bb512156e4812d7abe03b3fed99651a02d80567d47ee6f347f88d083c1b9805e0c09625fc3df08a8d0ae96b169d24eb5b83917b7 include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch
256993af76a95ef87cd0882808d5099d55ac0c240e8558851d3c1d5b83228a3c903196e9fe54251d5e3196ba2bef72e1460ddb4aa129a823804b05b5f7581dbd add-btf-float-uapi.patch
"