diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-05 11:22:41 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-05 11:23:33 +0000 |
commit | 720d662f29ea2f05d9e7f342ca45775c8d80a6aa (patch) | |
tree | ae77a3780714431318c2d48ffdb5e812875bac5a /testing/wireguard-vanilla | |
parent | c93cb784c174f65f3ac408a0a0450e516cbc4f58 (diff) | |
download | aports-720d662f29ea2f05d9e7f342ca45775c8d80a6aa.tar.bz2 aports-720d662f29ea2f05d9e7f342ca45775c8d80a6aa.tar.xz |
testing/*-vanilla: check kernel in prepare
Diffstat (limited to 'testing/wireguard-vanilla')
-rw-r--r-- | testing/wireguard-vanilla/APKBUILD | 25 |
1 files changed, 14 insertions, 11 deletions
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 |