aboutsummaryrefslogtreecommitdiffstats
path: root/main/spl-vanilla
diff options
context:
space:
mode:
authorxentec <xentec@aix0.eu>2018-02-21 00:40:24 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-05 11:23:32 +0000
commit39b040c6827e4273e82bd4dc78529d71e3a73264 (patch)
treec8e5487a47c4ea877218265f7f92f64293fd1db7 /main/spl-vanilla
parent810493476f47d2d1f3bfdb1f1d5bdedf8ce9d86a (diff)
downloadaports-39b040c6827e4273e82bd4dc78529d71e3a73264.tar.bz2
aports-39b040c6827e4273e82bd4dc78529d71e3a73264.tar.xz
[kmodule]-vanilla: clean up, streamline, modernize
Diffstat (limited to 'main/spl-vanilla')
-rw-r--r--main/spl-vanilla/APKBUILD64
1 files changed, 33 insertions, 31 deletions
diff --git a/main/spl-vanilla/APKBUILD b/main/spl-vanilla/APKBUILD
index 801262cbb0..670eab2b10 100644
--- a/main/spl-vanilla/APKBUILD
+++ b/main/spl-vanilla/APKBUILD
@@ -1,53 +1,55 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-_flavor=${FLAVOR:-vanilla}
-_realname=spl
-_name=$_realname-$_flavor
+
+# when changing _ver we *must* bump _rel
+_name=spl
+_ver=0.7.5
+_rel=0
_kpkg=linux-$_flavor
_kver=4.14.20
-_kpkgrel=0
+_krel=0
-_realver=0.7.5
-_mypkgrel=0
+_flavor=${FLAVOR:-vanilla}
+_kpkg=linux-$_flavor
+_kver=4.14.20
+_krel=0
+_kpkgver="$_kver-r$_krel"
+_kabi="$_kver-$_krel-$_flavor"
-_kernelver=$_kver-r$_kpkgrel
-_abi_release=${_kver}-${_kpkgrel}-${_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
+pkgname=$_name-$_flavor
pkgver=$_kver
-pkgrel=$(($_kpkgrel + $_mypkgrel))
+pkgrel=$(( $_krel + $_rel ))
+
pkgdesc="Solaris Porting Layer"
url="http://zfsonlinux.org"
arch="x86 x86_64 aarch64"
-license="GPL"
-depends="linux-${_flavor}=${_kernelver}"
-depends_dev="linux-vanilla-dev=$_kernelver"
+license="GPL-2.0"
+depends="$_kpkg=$_kpkgver"
+depends_dev="$_kpkg-dev=$_kpkgver"
makedepends="$depends_dev linux-headers file"
-install=""
subpackages="$pkgname-dev"
-source="https://github.com/zfsonlinux/zfs/releases/download/zfs-$_realver/spl-$_realver.tar.gz"
+source="https://github.com/zfsonlinux/zfs/releases/download/zfs-$_ver/spl-$_ver.tar.gz"
-builddir="$srcdir"/spl-$_realver
+builddir="$srcdir/$_name-$_ver"
prepare() {
# do not remove as it sources other prepare
default_prepare
update_config_sub
update_config_guess
- # source the kernel version
- (
- if [ -f "$startdir"/../../main/linux-$_flavor/APKBUILD ]; then
- . "$startdir"/../../main/linux-$_flavor/APKBUILD
- if [ "$_kver" != "$pkgver" ]; then
- die "$_name: Please update _kver to $pkgver"
- fi
- if [ "$_kpkgrel" != "$pkgrel" ]; then
- die "$_name: Please update _kpkgrel to $pkgrel"
- fi
- fi
- )
}
build() {
@@ -58,13 +60,13 @@ build() {
--infodir=/usr/share/info \
--localstatedir=/var \
--with-config=kernel \
- --with-linux=/usr/src/linux-headers-${_abi_release}
+ --with-linux=/usr/src/linux-headers-$_kabi
make
}
package() {
- cd "$builddir"
- make DESTDIR="$pkgdir" install
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
}
dev() {