summaryrefslogtreecommitdiffstats
path: root/main/linux-headers/APKBUILD
blob: 12fe9818400ea9c1e25f6d9e51dee6b4379b97d9 (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=3.18.5
_kernver=${pkgver%.*}
pkgrel=0
pkgdesc="Linux system headers"
url="http://kernel.org"
arch="all"
license='GPL-2'
makedepends="perl"
options="!strip !tracedeps"
source="http://www.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz
	http://www.kernel.org/pub/linux/kernel/v3.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
		bunzip2 -c < "$srcdir"/patch-$pkgver.bz2 | 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="9e854df51ca3fef8bfe566dbd7b89241  linux-3.18.tar.xz
e8563b2feaa6c33d20d23ac7add9d385  patch-3.18.5.xz
e67087052d36eeb372d3da38a5c9486e  1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
c26b88cbf5389c2033d404a0fb58d8d2  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="becc413cc9e6d7f5cc52a3ce66d65c3725bc1d1cc1001f4ce6c32b69eb188cbd  linux-3.18.tar.xz
9e261632e11f629705c3f1b2f07c611284e5f9972c42f6740131e8e2471c349a  patch-3.18.5.xz
eea3758ded887b84e3b15031e590975b4f94dbf7b03e7b135611339bcb8ca81c  1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
9dc049392ba3b79453baa809f0aafb47283293046b84511b5ae8519a86716048  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="2f0b72466e9bc538a675738aa416573d41bbbd7e3e2ffd5b5b127afde609ebc278cec5a3c37e73479607e957c13f1b4ed9782a3795e0dcc2cf8e550228594009  linux-3.18.tar.xz
273b5e4917bcd8520d8c81869f41572275a181ae4cb2c3d7309507d47da29903eb2104703e4402f07f6c20477665a82ef57d8a1c34e19ecc10b0e1a4c0f8fd14  patch-3.18.5.xz
8ff3af26ac01d402641d6c775ad54922a73e5eaf1e41efe842448d08c59f51ab9290104008283fafbdacd9eb1b8e48e9d2507210a8531d05a852c6ba84d2b60e  1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
6d6107974dcf9671dd0f1a747160adf85a22c27216b1200ce40fd410f6fc5fd47956b8b5b51055cfda4b97cc9f172cd3850ccb4daa73e4eda449e6e77c0840ca  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"