aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-headers/APKBUILD
blob: 443da1e9f2e69bee73906b483e9742f4a37bf089 (plain)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=linux-headers
pkgver=4.1.12
_kernver=${pkgver%.*}
pkgrel=0
pkgdesc="Linux system headers"
url="http://kernel.org"
arch="all"
license='GPL2'
makedepends="perl"
options="!strip !tracedeps"
source="http://www.kernel.org/pub/linux/kernel/v4.x/linux-$_kernver.tar.xz
	http://www.kernel.org/pub/linux/kernel/v4.x/patch-$pkgver.xz
	1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
	3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
	4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.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
	arm*) _carch="arm" ;;
	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
}

md5sums="fe9dc0f6729f36400ea81aa41d614c37  linux-4.1.tar.xz
e790ae84e0109a3d95cc617be448171b  patch-4.1.12.xz
e67087052d36eeb372d3da38a5c9486e  1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
c4297d8072a3b01d665b1b65b6595421  3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
81247cedb2fe3337edb946d9e8a812c2  4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch"
sha256sums="caf51f085aac1e1cea4d00dbbf3093ead07b551fc07b31b2a989c05f8ea72d9f  linux-4.1.tar.xz
f3520b06e6a2b9929173c680de75f11cde9f0a380e04195d538b5de820a549ae  patch-4.1.12.xz
eea3758ded887b84e3b15031e590975b4f94dbf7b03e7b135611339bcb8ca81c  1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
3c6208bd19ec6c4bd4f2d579c4d1668edb7e5f1f659ddcb76a693217cac27a2d  3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
3297454dd7bdc3417d36f448ca2091e39a6acf475e22c6eb67ee5819d7b73c8f  4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch"
sha512sums="168ef84a4e67619f9f53f3574e438542a5747f9b43443363cb83597fcdac9f40d201625c66e375a23226745eaada9176eb006ca023613cec089349e91751f3c0  linux-4.1.tar.xz
164f216faa8fef6a28fe03bdb69c7bee5ff99cf560271264b52e62aec63c1d4d6475d4a6f2b4b4c02d235568ebe8bafd3b36be75c8a505cde8edbb70136d89b4  patch-4.1.12.xz
8ff3af26ac01d402641d6c775ad54922a73e5eaf1e41efe842448d08c59f51ab9290104008283fafbdacd9eb1b8e48e9d2507210a8531d05a852c6ba84d2b60e  1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
6c56153110eb090039b7ff011c48f610bef1cc849d6bfc959ead938e938f8efc603c5f023379318dfa66dc41df68a38239337979ef4ab9a3d05e45abbca29839  3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
895e23a36d0736ff624ad960e8a26e221d990e50910cc96b1a151789f97b94288f3e801ad76d141e421901e66422c480e511b2e20798e91a15b9e298c72533d6  4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch"