# Maintainer: Natanael Copa pkgname=linux-headers pkgver=4.17.6 _kernver=${pkgver%.*} pkgrel=0 pkgdesc="Linux system headers" url="http://kernel.org" arch="all" license="GPL-2.0-only" makedepends="perl" options="!check !dbg !strip !tracedeps" source="https://kernel.org/pub/linux/kernel/v4.x/linux-$_kernver.tar.xz https://kernel.org/pub/linux/kernel/v4.x/patch-$pkgver.xz revert-broken-uapi.patch " prepare() { cd "$srcdir"/linux-$_kernver if [ "$_kernver" != "$pkgver" ]; then unxz -c < "$srcdir"/patch-$pkgver.xz | patch -p1 || return 1 fi for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { return 0 } package() { local _carch=$CARCH case "$_carch" in aarch64*) _carch="arm64" ;; arm*) _carch="arm" ;; mips*) _carch="mips" ;; s390*) _carch="s390" ;; ppc*) _carch="powerpc" ;; # not sure about this -- ppc64*) _carch="powerpc64" ;; esac cd "$srcdir"/linux-$_kernver mkdir -p "$pkgdir/usr" make headers_install ARCH="${_carch}" INSTALL_HDR_PATH="$pkgdir/usr" || return 1 find "$pkgdir/usr" \( -name .install -o -name ..install.cmd \) -exec \ rm -f {} \; # provided by libdrm rm -rf "$pkgdir"/usr/include/drm } sha512sums="4d9de340a26155a89ea8773131c76220cc2057f2b5d031b467b60e8b14c1842518e2d60a863d8c695f0f7640f3f18d43826201984a238dade857b6cef79837db linux-4.17.tar.xz 4b791d94db704cbbe3dbf6b340735fe7999957741f116ca14060ced836aece1d4b51d0c3f376af1564e7379fbb9c9132a8e4d021fc74599f3ab037237d718651 patch-4.17.6.xz 32597f2672d1ec365a936d15041a7cf219ef9353241d4a5c378244cf2fc155610443a19bbcd391c86099a0b08486c45e042ec7c90b0d04fe675c3ad0ffc36b53 revert-broken-uapi.patch"