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/drbd9-vanilla | |
parent | 7a01b7f1e63a066dceec480a976291d27f5ce1c8 (diff) | |
download | aports-9d66e4011864a3a40a8ccd5aa8fd8870cad1ef2d.tar.bz2 aports-9d66e4011864a3a40a8ccd5aa8fd8870cad1ef2d.tar.xz |
main/*-vanilla: check kernel version in prepare
Diffstat (limited to 'main/drbd9-vanilla')
-rw-r--r-- | main/drbd9-vanilla/APKBUILD | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/main/drbd9-vanilla/APKBUILD b/main/drbd9-vanilla/APKBUILD index abbc2ca08e..a977983163 100644 --- a/main/drbd9-vanilla/APKBUILD +++ b/main/drbd9-vanilla/APKBUILD @@ -13,17 +13,6 @@ _krel=0 _kabi="$_kver-$_krel-$_flavor" _kpkgver="$_kver-r$_krel" -# 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 )) @@ -38,6 +27,20 @@ source="https://links.linbit.com/sources/$_name/${_ver%.*}/$_name-$_ver-$_rel.ta builddir=$srcdir/$_name-$_ver-$_rel +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 "$builddir" unset LDFLAGS |