aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openswan-grsec
diff options
context:
space:
mode:
Diffstat (limited to 'testing/openswan-grsec')
-rw-r--r--testing/openswan-grsec/APKBUILD34
1 files changed, 27 insertions, 7 deletions
diff --git a/testing/openswan-grsec/APKBUILD b/testing/openswan-grsec/APKBUILD
index 79539ea3bc..bb224fb537 100644
--- a/testing/openswan-grsec/APKBUILD
+++ b/testing/openswan-grsec/APKBUILD
@@ -1,21 +1,38 @@
# Contributor: Danilo Godec <danilo.godec@agenda.si>
# Maintainer:
_flavor=grsec
+
+# source the kernel version
+if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then
+ . ../../main/linux-${_flavor}/APKBUILD
+fi
+
+_kernelver="$pkgver-r$pkgrel"
+_abi_release=${pkgver}-${_flavor}
+_kpkgrel=$pkgrel
_realname=openswan
+# version of openswan module
+_realver=2.6.35
+# _mypkgrel can be reset to 0 when kernel pkgver increases
+_mypkgrel=0
+
pkgname="$_realname-$_flavor"
-pkgver=2.6.35
-pkgrel=0
+pkgver=$pkgver
+pkgrel=$(( $_kpkgrel + $_mypkgrel ))
pkgdesc="IPsec Implementation which Allows Building of VPNs"
url="http://www.openswan.org/"
arch="all"
license="GPL"
depends=""
-depends_dev="gmp-dev bison flex linux-grsec-dev"
+depends_dev="gmp-dev bison flex linux-$_flavor-dev=$_kernelver"
makedepends="$depends_dev"
install=""
-source="http://www.openswan.org/download/$_realname-$pkgver.tar.gz"
+subpackages=""
+source="http://www.openswan.org/download/$_realname-$_realver.tar.gz"
+
+_ksrc=/usr/src/linux-headers-${_abi_release}
-_builddir="$srcdir"/$_realname-$pkgver
+_builddir="$srcdir"/$_realname-$_realver
prepare() {
local i
cd "$_builddir"
@@ -32,12 +49,15 @@ build() {
export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
export INSTALL_MOD_PATH="$pkgdir"
export INSTALL_MOD_DIR=misc
- make KERNELSRC=/lib/modules/`uname -r`/build module || return 1
+ make KERNELSRC="$_ksrc" module || return 1
}
package() {
cd "$_builddir"
- make INC_RCDEFAULT=/etc/init.d INC_USRLOCAL=/usr DESTDIR="$pkgdir" minstall
+ make INC_RCDEFAULT=/etc/init.d \
+ INC_USRLOCAL=/usr \
+ KERNELSRC="$_ksrc" \
+ DESTDIR="$pkgdir" minstall
}
md5sums="7909a251fbbb807914545b7f42437013 openswan-2.6.35.tar.gz"