diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-05 10:11:31 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-05 11:23:32 +0000 |
commit | 9d66e4011864a3a40a8ccd5aa8fd8870cad1ef2d (patch) | |
tree | 627135cb7673aab3c01d335a765822212cf48e30 /main/dahdi-linux-vanilla | |
parent | 7a01b7f1e63a066dceec480a976291d27f5ce1c8 (diff) | |
download | aports-9d66e4011864a3a40a8ccd5aa8fd8870cad1ef2d.tar.bz2 aports-9d66e4011864a3a40a8ccd5aa8fd8870cad1ef2d.tar.xz |
main/*-vanilla: check kernel version in prepare
Diffstat (limited to 'main/dahdi-linux-vanilla')
-rw-r--r-- | main/dahdi-linux-vanilla/APKBUILD | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/main/dahdi-linux-vanilla/APKBUILD b/main/dahdi-linux-vanilla/APKBUILD index 6c49306855..d9c89d631d 100644 --- a/main/dahdi-linux-vanilla/APKBUILD +++ b/main/dahdi-linux-vanilla/APKBUILD @@ -14,17 +14,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 )) @@ -59,6 +48,20 @@ builddir="$srcdir/$_name-$_ver" # grsec legacy [ "$_flavor" = "hardened" ] && provides="$_name-grsec=$pkgver-r$pkgrel" +prepare() { + default_prepare + # verify the kernel version + local _kapkbuild=../../main/linux-$_flavor/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 "$srcdir/$_name-$_ver" make KVERS="${_kabi}" DYNFS="yes" MODULES_EXTRA="zaphfc" |