diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2019-11-09 11:12:49 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2019-11-09 11:17:23 +0100 |
commit | 50c112ac9569dfb5ddd6437fd752f68a93cde1c9 (patch) | |
tree | 06966e4db72e369ca24ce8c8b3cffcb6229ef761 /community | |
parent | 116c1dc9241a72e95722f33819b4b12d71262830 (diff) | |
download | aports-50c112ac9569dfb5ddd6437fd752f68a93cde1c9.tar.bz2 aports-50c112ac9569dfb5ddd6437fd752f68a93cde1c9.tar.xz |
community/jool-modules-vanilla: move from testing
Diffstat (limited to 'community')
-rw-r--r-- | community/jool-modules-vanilla/APKBUILD | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/community/jool-modules-vanilla/APKBUILD b/community/jool-modules-vanilla/APKBUILD new file mode 100644 index 0000000000..9269118be7 --- /dev/null +++ b/community/jool-modules-vanilla/APKBUILD @@ -0,0 +1,95 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> + +# Jool version +# Keep _ver in sync with community/jool-tools! +# When changing _ver we *must* bump _rel! +_name=jool-modules +_ver=4.0.6 +_rel=0 + +# For custom kernels set $FLAVOR. +_flavor="$FLAVOR" +_extra_flavors="" +if [ -z "$FLAVOR" ]; then + _flavor=vanilla + case $CARCH in + x86 | x86_64) _extra_flavors="virt";; + esac +fi + +# Kernel version +# Keep in sync with main/linux-vanilla! +_kpkg=linux-$_flavor +_kver=4.19.80 +_krel=0 +_kpkgver="$_kver-r$_krel" + +pkgname=$_name-$_flavor +pkgver=$_kver +pkgrel=$(( $_krel + $_rel )) +pkgdesc="SIIT and NAT64 for Linux (kernel modules for linux-$_flavor)" +url="https://jool.mx" +arch="all" +license="GPL-2.0-or-later" +depends="$_kpkg=$_kpkgver" +makedepends="$_kpkg-dev=$_kpkgver linux-headers" +install_if="$_kpkg=$_kpkgver jool-tools" +subpackages="" +source="https://github.com/NICMx/Jool/releases/download/v$_ver/jool-$_ver.tar.gz" +builddir="$srcdir/jool-$_ver" +options="!check" # no tests provided + +for _f in $_extra_flavors; do + makedepends="$makedepends linux-$_f-dev=$_kpkgver" + subpackages="$subpackages $_name-$_f:_extra" +done + +prepare() { + default_prepare + + if [ -z "$FLAVOR" ]; then + ( . "$startdir"/../../main/linux-$_flavor/APKBUILD + [ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver" + [ "$_krel" != "$pkgrel" ] && die "please update _krel to $pkgrel" + return 0 + ) + fi + + local flavor; for flavor in $_flavor $_extra_flavors; do + cp -r "$builddir" "$srcdir"/$flavor + done +} + +build() { + unset LDFLAGS + + local flavor; for flavor in $_flavor $_extra_flavors; do + make -C "$srcdir"/"$flavor"/src/mod \ + MODULES_DIR="/lib/modules/$_kver-$_krel-$flavor" + done +} + +package() { + _modules_install "$_flavor" "$pkgdir" +} + +_extra() { + local flavor=${subpkgname##*-} + depends="linux-$flavor=$_kpkgver" + install_if="linux-$flavor=$_kpkgver jool-tools" + pkgdesc="SIIT and NAT64 for Linux (kernel modules for linux-$flavor)" + + _modules_install "$flavor" "$subpkgdir" +} + +_modules_install() { + local flavor="$1" + local destdir="$2" + + make -C "$srcdir"/$flavor/src/mod modules_install \ + MODULES_DIR=/lib/modules/$_kver-$_krel-$flavor \ + INSTALL_MOD_PATH="$destdir" +} + +sha512sums="8648cc876d801b34c4bc9616da642727d1e49ed2937daa7fdca58c0fd80dbd1c432018af410c44c1d24224aba5289f726f43adc259cdf8193832d39a86d0f6a6 jool-4.0.6.tar.gz" |