APKBUILD 2.08 KB
Newer Older
1
2
3
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

_flavor=grsec
4
_kpkg=linux-$_flavor
5
_kver=3.18.11
6
_kpkgrel=1
7
8

# when chaning _ver we *must* bump _mypkgrel
9
_ver=4.2.12
10
_mypkgrel=0
11
_name=virtualbox-additions
12
13
14
15
16
17
18
19
20
21
22

# verify the kernel version before entering chroot
_kapkbuild=../../linux-${_flavor}/APKBUILD
if [ -f $_kapkbuild ]; then
	. $_kapkbuild
	pkgname=$_name-$_flavor
	[ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver"
	[ "$_kpkgrel" != "$pkgrel" ] && die "please update _kpkgrel to $pkgrel"
fi

_kpkgver="$_kver-r$_kpkgrel"
23
_abi_release=${_kver}-${_kpkgrel}-${_flavor}
24
25
26

pkgname=${_name}-${_flavor}
pkgver=$_kver
27
pkgrel=$(($_kpkgrel + $_mypkgrel))
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
pkgdesc="Virtual box addtions kernel modules for $_flavor "
arch="x86"
url='http://virtualbox.org'
license="GPL custom"
makedepends="linux-grsec-dev"
source="http://dev.gentoo.org/~polynomial-c/virtualbox/vbox-kernel-module-src-$_ver.tar.xz
	virtualbox-modules-4.1.4-pax-const.patch
	"

_builddir="$srcdir"/

prepare() {
	cd "$_builddir"
	local i
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"

	export KERN_DIR=/usr/src/linux-headers-${_abi_release}
	make
}

package() {
	local module=
	cd "$_builddir"
	for module in *.ko; do
		install -D -m644 $module \
			"$pkgdir/lib/modules/${_abi_release}/misc/$module" \
			|| return 1
	done
}

66
md5sums="05ed16f79999dab40ca78f08f23c0a7c  vbox-kernel-module-src-4.2.12.tar.xz
67
4bbbce6902722a7439f6fac4d17c6051  virtualbox-modules-4.1.4-pax-const.patch"
68
sha256sums="f68078b9cdb4c76972b4e39421a6e5ced370b6159a38826c8acabe27f0231eb9  vbox-kernel-module-src-4.2.12.tar.xz
69
bd7586074db6dabee3b49cb9152c85e07a316069761df8369479297c592eb240  virtualbox-modules-4.1.4-pax-const.patch"
70
sha512sums="b0f37d8b5454ffb4588eb60c667aec58e349b62253366bb3e89d8995dd5fc6ddf4fc8d8c2bd5054b9bf3ef5602428a2cd66f1d5aeaefb34255d7726f60fa9906  vbox-kernel-module-src-4.2.12.tar.xz
71
9a9a982defed6d4453bc6d9388c3a71169bba85568cfd36d0d2588dda8e213a0d759c983a337a150d17c55bb6206e43738dfd2559fedeb85e132363936a48574  virtualbox-modules-4.1.4-pax-const.patch"