aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ipt-netflow-vanilla
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-03-05 11:22:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-05 11:23:33 +0000
commit720d662f29ea2f05d9e7f342ca45775c8d80a6aa (patch)
treeae77a3780714431318c2d48ffdb5e812875bac5a /testing/ipt-netflow-vanilla
parentc93cb784c174f65f3ac408a0a0450e516cbc4f58 (diff)
downloadaports-720d662f29ea2f05d9e7f342ca45775c8d80a6aa.tar.bz2
aports-720d662f29ea2f05d9e7f342ca45775c8d80a6aa.tar.xz
testing/*-vanilla: check kernel in prepare
Diffstat (limited to 'testing/ipt-netflow-vanilla')
-rw-r--r--testing/ipt-netflow-vanilla/APKBUILD25
1 files changed, 14 insertions, 11 deletions
diff --git a/testing/ipt-netflow-vanilla/APKBUILD b/testing/ipt-netflow-vanilla/APKBUILD
index 8421da9e6b..91da07f7a4 100644
--- a/testing/ipt-netflow-vanilla/APKBUILD
+++ b/testing/ipt-netflow-vanilla/APKBUILD
@@ -13,17 +13,6 @@ _krel=0
_kpkgver="$_kver-r$_krel"
_kabi="$_kver-$_krel-$_flavor"
-# verify the kernel version before entering chroot
-_kapkbuild=../../main/linux-vanilla/APKBUILD
-if [ -f $_kapkbuild ]; then
- ( . $_kapkbuild
- pkgname=$_name-$_flavor
- [ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver"
- [ "$_krel" != "$pkgrel" ] && die "please update _krel to $pkgrel"
- return 0
- )
-fi
-
pkgname=$_name-$_flavor
pkgver=$_kver
pkgrel=$(( $_krel + $_rel ))
@@ -39,6 +28,20 @@ install_if="$_kpkg=$_kpkgver ipt-netflow"
source="ipt-netflow-$_ver.tar.xz::http://turtle.dereferenced.org/~kaniini/ipt-netflow-$_ver.tar.xz"
builddir="$srcdir/$_name-$_ver"
+prepare() {
+ default_prepare
+ # verify the kernel version
+ local _kapkbuild=../../main/linux-$_pkgver/APKBUILD
+ if [ -f $_kapkbuild ]; then
+ ( . $_kapkbuild
+ pkgname=$_name-$_flavor
+ [ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver"
+ [ "$_krel" != "$pkgrel" ] && die "please update _krel to $pkgrel"
+ return 0
+ )
+ fi
+}
+
build() {
cd "$builddir"
./configure --kver=$_kabi --ipt-inc=/usr/include/libiptc