From 720d662f29ea2f05d9e7f342ca45775c8d80a6aa Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 5 Mar 2018 11:22:41 +0000 Subject: testing/*-vanilla: check kernel in prepare --- testing/wireguard-vanilla/APKBUILD | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'testing/wireguard-vanilla') diff --git a/testing/wireguard-vanilla/APKBUILD b/testing/wireguard-vanilla/APKBUILD index 0a776c2459..1aada2ac7e 100644 --- a/testing/wireguard-vanilla/APKBUILD +++ b/testing/wireguard-vanilla/APKBUILD @@ -16,17 +16,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 )) @@ -42,6 +31,20 @@ options="!check" source="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$_ver.tar.xz" builddir="$srcdir"/WireGuard-$_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" # only building module: see wireguard-tools for userspace -- cgit v1.2.3