aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-headers/APKBUILD
blob: b723ab151a3c9a814768d153080da77787fd63c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=linux-headers
pkgver=5.10.27
_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
	"
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
fb18bbd9cfac84e438ea00e3a1a8e9e2a74ea91da57c3ed0f87c0028ffaa7be88be9b5c2f382ac4be06ff468b187480f719eed4df7b38bf9f7beaeddb352c0eb  patch-5.10.27.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"