APKBUILD 1.59 KB
Newer Older
1
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Natanael Copa's avatar
Natanael Copa committed
2
pkgname=linux-headers
3 4
pkgver=3.8.7
_kernver=3.8
5
pkgrel=1
Natanael Copa's avatar
Natanael Copa committed
6 7
pkgdesc="Linux system headers"
url="http://kernel.org"
8
arch="all"
Natanael Copa's avatar
Natanael Copa committed
9
license='GPL-2'
10
makedepends="perl"
11 12 13 14 15
if [ "$ALPINE_LIBC" = "eglibc" ]; then
        replaces="eglibc-dev"
else
        replaces="uclibc-dev"
fi
16
options="!strip !tracedeps"
17 18
source="ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.bz2
	ftp://ftp.kernel.org/pub/linux/kernel/v3.x/patch-$pkgver.bz2
19
	"
Natanael Copa's avatar
Natanael Copa committed
20

21 22
prepare() {
	cd "$srcdir"/linux-$_kernver
23
	if [ "$_kernver" != "$pkgver" ]; then
24
		bunzip2 -c < "$srcdir"/patch-$pkgver.bz2 | patch -p1 || return 1
25
	fi
26 27 28 29 30 31 32
}

build() {
	return 0
}

package() {
33 34 35 36 37 38
	local _carch=$CARCH

	case "$_carch" in
	arm*) _carch="arm" ;;
	esac

39
	cd "$srcdir"/linux-$_kernver
Natanael Copa's avatar
Natanael Copa committed
40
	mkdir -p "$pkgdir/usr"
41
	make headers_install ARCH="${_carch}" INSTALL_HDR_PATH="$pkgdir/usr" || return 1
Natanael Copa's avatar
Natanael Copa committed
42 43 44

	find "$pkgdir/usr" \( -name .install -o -name ..install.cmd \) -exec \
		rm -f {} \;
45 46 47

	# provided by libdrm
	rm -rf "$pkgdir"/usr/include/drm
Natanael Copa's avatar
Natanael Copa committed
48 49
}

50 51 52 53 54 55
md5sums="fcd1d2e60e1033c935a13ef81c89ea2d  linux-3.8.tar.bz2
411bfdadfb9b5ae82580d574416d3235  patch-3.8.7.bz2"
sha256sums="fce774b5313e73949cb35f128e91e7b2ccd7fa2438abc5cff69267e504395a45  linux-3.8.tar.bz2
bff6ec3f5726d34614cc6ff7bfb28c88195d047cf6a87cb2fdfe1da205007e45  patch-3.8.7.bz2"
sha512sums="966a3b08aecc4b135a48ea73ba3326e1710c455e6da29693479e9d1a56663fc10f569e2342fa861486d39d4ea5c2af406d1bd40613c15555acffdba160ef7ba9  linux-3.8.tar.bz2
431873c446089220d17bc98685066f7ea95c8dd1125b6d19063c293e7e7816cbfc320cfcc802b50e76d99a93ebbe03157660d5ed27a95c18ecb46d324bbf9e4d  patch-3.8.7.bz2"