2025-02-13 20:07:55 +01:00

57 lines
1.9 KiB
Plaintext

# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=linux-headers
pkgver=6.12.6 # Follow the latest Linux stable
_kernver=${pkgver%.*}
pkgrel=0
pkgdesc="Linux system headers"
url="https://kernel.org/"
arch="all" # Headers are architecture specific
license="GPL-2.0-only"
makedepends="perl"
options="!check !dbg !strip !tracedeps !archcheck"
source="https://kernel.org/pub/linux/kernel/v6.x/linux-$_kernver.tar.xz
revert-broken-uapi.patch
0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
"
if [ "${pkgver%.0}" = "$pkgver" ]; then
source="
patch-$pkgver.patch.xz::https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/patch-$pkgver.xz
$source
"
fi
builddir="$srcdir/linux-$_kernver"
_carch="$CARCH"
case "$_carch" in
aarch64*) _carch="arm64" ;;
arm*) _carch="arm" ;;
mips*) _carch="mips" ;;
s390*) _carch="s390" ;;
ppc*) _carch="powerpc" ;;
riscv*) _carch="riscv" ;;
loongarch*) _carch="loongarch" ;;
# not sure about this -- ppc64*) _carch="powerpc64" ;;
esac
build() {
make headers ARCH="$_carch"
}
package() {
mkdir -p "$pkgdir"/usr/
cp -a usr/include/ "$pkgdir"/usr/include/
msg "purging non header files.."
find "$pkgdir"/usr/include/ ! -iname "*.h" -type f -exec rm -v {} \+
# provided by libdrm
rm -rf "$pkgdir"/usr/include/drm
}
sha512sums="
a37b1823df7b4f72542f689b65882634740ba0401a42fdcf6601d9efd2e132e5a7650e70450ba76f6cd1f13ca31180f2ccee9d54fe4df89bc0000ade4380a548 linux-6.12.tar.xz
c1fc9a8a0b42dacad51ceb13785f54dfce89369fe082e6457b80a1f75b02704415d397b5df48ca3fdf361ec8c1b72c196b5033bca0325e39d026bcc357d89452 revert-broken-uapi.patch
607c074d72aca88fea9ecdbd62198d8f7857daca75e5d027966e0a9997338d6ac8ce0a1e9114b19232b390751d05acca09e28b0cfad2a12d5942f5575a9f4684 0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
53fb0d7f44d92a6088fea05308ed86fcd7cdb1470c65175b7fd3df37b401b7b1b1e86b9e026cea9f1d07a19c8cd6564a29378976aa472a6d043ff662ee2c8526 patch-6.12.6.patch.xz
"