# Maintainer: Natanael Copa _flavor=grsec _kpkg=linux-$_flavor _kver=4.4.10 _kpkgrel=0 # when chaning _ver we *must* bump _mypkgrel _ver=5.0.16 _mypkgrel=0 _name=virtualbox-additions # 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" _abi_release=${_kver}-${_kpkgrel}-${_flavor} pkgname=${_name}-${_flavor} pkgver=$_kver pkgrel=$(($_kpkgrel + $_mypkgrel)) pkgdesc="Virtual box addtions kernel modules for $_flavor " arch="x86 x86_64" 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 } md5sums="723e0e1b4a42ec0cc1b32e72a3e41ea1 vbox-kernel-module-src-5.0.16.tar.xz 4bbbce6902722a7439f6fac4d17c6051 virtualbox-modules-4.1.4-pax-const.patch" sha256sums="8905e174069a6caf0200808fda6726704a947ab56fc48c3b6ebbf8831dde4123 vbox-kernel-module-src-5.0.16.tar.xz bd7586074db6dabee3b49cb9152c85e07a316069761df8369479297c592eb240 virtualbox-modules-4.1.4-pax-const.patch" sha512sums="5311f6cfd917c04bcb51182ad414c0930fb85a73a90d81156f08640cdb4e4d442ed46a10b62b5d07ed81aa1ad65430d5186e95cc64293502c9b84937a6470bb4 vbox-kernel-module-src-5.0.16.tar.xz 9a9a982defed6d4453bc6d9388c3a71169bba85568cfd36d0d2588dda8e213a0d759c983a337a150d17c55bb6206e43738dfd2559fedeb85e132363936a48574 virtualbox-modules-4.1.4-pax-const.patch"