summaryrefslogtreecommitdiff
path: root/user/wireguard-module/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'user/wireguard-module/APKBUILD')
-rw-r--r--user/wireguard-module/APKBUILD40
1 files changed, 25 insertions, 15 deletions
diff --git a/user/wireguard-module/APKBUILD b/user/wireguard-module/APKBUILD
index cd6580ef8..4088a7817 100644
--- a/user/wireguard-module/APKBUILD
+++ b/user/wireguard-module/APKBUILD
@@ -1,32 +1,42 @@
# Contributor: Luis Ressel <aranea@aixah.de>
# Maintainer: Luis Ressel <aranea@aixah.de>
-# KEEP THIS IN SYNC with the other wireguard-module packages.
-_kflavour=""
-_kver="4.14.138-mc15"
-pkgver=0.0.20190913
+_kver="5.4.5-mc0"
+pkgver=0.0.20200121
pkgrel=0
-_pkgname="wireguard-module$_kflavour"
+_pkgname="wireguard-module"
pkgname="$_pkgname-$_kver"
-_pkgreal="WireGuard"
+_pkgreal="wireguard-linux-compat"
pkgdesc="Kernel module for the WireGuard VPN, built for easy-kernel"
url="https://www.wireguard.com/"
arch="all"
-options="!check !dbg !strip" # no test suite
+options="!check !dbg !strip" # No test suite.
license="GPL-2.0-only"
+depends="easy-kernel-modules-$_kver"
+makedepends="easy-kernel-src-$_kver"
provides="$_pkgname=$pkgver"
-depends="easy-kernel$_kflavour-modules-$_kver"
-makedepends="easy-kernel$_kflavour-src-$_kver"
-source="https://git.zx2c4.com/WireGuard/snapshot/$_pkgreal-$pkgver.tar.xz"
+subpackages="wireguard-patch:_patch:noarch"
+source="https://git.zx2c4.com/$_pkgreal/snapshot/$_pkgreal-$pkgver.tar.xz"
builddir="$srcdir/$_pkgreal-$pkgver"
build() {
- cd "$builddir"
- make -C src LDFLAGS="" KERNELDIR="/usr/src/linux-$_kver$_kflavour" module
+ make -C src LDFLAGS="" KERNELDIR="/usr/src/linux-$_kver" module
}
package() {
- cd "$builddir"
- make -C src DEPMOD=true KERNELDIR="/usr/src/linux-$_kver$_kflavour" INSTALL_MOD_PATH="$pkgdir" module-install
+ if [ -f $HOME/kernel_key.pem ]; then
+ /usr/src/linux-$_kver/scripts/sign-file sha512 \
+ $HOME/kernel_key.pem $HOME/kernel_key.pem \
+ "$builddir"/src/wireguard.ko
+ fi
+ make -C src DEPMOD=true KERNELDIR="/usr/src/linux-$_kver" INSTALL_MOD_PATH="$pkgdir" module-install
}
-sha512sums="0d6e754df2f919c288ffe46131df29624e9958d39220369558089218c386450733f2baf97eb5d14154aa17a8d6b01bb0c34e3a1c4587830ed0d792d6ef06aa05 WireGuard-0.0.20190913.tar.xz"
+_patch() {
+ depends=""
+ pkgdesc="Kernel patch for the WireGuard VPN"
+
+ mkdir -p "$subpkgdir/usr/share/wireguard"
+ "$builddir"/kernel-tree-scripts/create-patch.sh > "$subpkgdir/usr/share/wireguard/wireguard-$pkgver.patch"
+}
+
+sha512sums="fde9ef09032ad2e2ce69814d42cc0abb3b353d5aa95debd39122b3eb25324c8e707dd9f298f8ee276575d932b1f1bd559b3430da6b8c0a5057911937ed85c726 wireguard-linux-compat-0.0.20200121.tar.xz"