summaryrefslogtreecommitdiff
path: root/pcr/wireguard/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/wireguard/PKGBUILD')
-rw-r--r--pcr/wireguard/PKGBUILD42
1 files changed, 42 insertions, 0 deletions
diff --git a/pcr/wireguard/PKGBUILD b/pcr/wireguard/PKGBUILD
new file mode 100644
index 000000000..7ca02336f
--- /dev/null
+++ b/pcr/wireguard/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer (Arch): Christian Hesse <mail@eworm.de>
+# Contributor: Andreas Grapentin <andreas@grapentin.org>
+
+_basekernel=5.4.12-1
+
+pkgname=wireguard
+_pkgver_x86_64=0.0.20200128
+_pkgver_i686=0.0.20200105
+_pkgver_armv7h=0.0.20200128
+eval "pkgver=\$_pkgver_${CARCH}"
+pkgrel=2
+pkgrel+=.parabola1.basekernel${_basekernel%-*}
+pkgdesc='Wireguard module for Linux Kernel'
+pkgdesc+=' (built for the linux-libre kernel package)'
+url='https://www.wireguard.com/'
+arch=('x86_64')
+arch+=('i686' 'armv7h')
+license=('GPL')
+makedepends=(linux-libre-headers=${_basekernel%-*} libelf "wireguard-dkms>=$pkgver")
+conflicts=('wireguard-dkms' 'wireguard-arch')
+replaces=('wireguard-arch')
+provides=('WIREGUARD-MODULE')
+
+build() {
+ _kernver=$(</usr/src/linux-libre/version)
+
+ dkms build --dkmstree "$srcdir" -m wireguard/$pkgver -k $_kernver
+}
+
+package() {
+ depends=(linux-libre=${_basekernel%-*})
+
+ _kernver="$(</usr/src/linux-libre/version)"
+
+ install -Dt "$pkgdir/usr/lib/modules/$_kernver/extramodules" -m0644 \
+ wireguard/${pkgver}/$_kernver/$CARCH/module/*
+
+ # compress each module individually
+ find "$pkgdir" -name '*.ko' -exec xz -T1 {} +
+}
+
+# vim:set sw=2 et: