# Maintainer: Natanael Copa _flavor=grsec _kpkg=linux-$_flavor _kver=3.6.11 _kpkgrel=0 # when chaning _ver we *must* bump _mypkgrel _ver=4.1.20 _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}-${_flavor} pkgname=${_name}-${_flavor} pkgver=$_kver 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} export GCC_SPECS=/usr/share/gcc/hardenednopie.specs 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="df055d44c71a96250131536497fe32f2 vbox-kernel-module-src-4.1.20.tar.xz 4bbbce6902722a7439f6fac4d17c6051 virtualbox-modules-4.1.4-pax-const.patch"