summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2019-02-16 14:17:49 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2019-02-16 14:17:49 +0000
commite0af0d73c2d344338bed830d56358276e4b2cb8c (patch)
treef7327a8857ce6c2ff6e2fb136868b02ee6ffb231
parentd672d6570b1a138a8722e1a7903b033d15e81414 (diff)
parenta364a474728e3936b413bcbf4176d8b1ac90c616 (diff)
downloadpackages-e0af0d73c2d344338bed830d56358276e4b2cb8c.tar.gz
packages-e0af0d73c2d344338bed830d56358276e4b2cb8c.tar.bz2
packages-e0af0d73c2d344338bed830d56358276e4b2cb8c.tar.xz
packages-e0af0d73c2d344338bed830d56358276e4b2cb8c.zip
Merge branch 'wireguard' into 'master'
user/wireguard: New package Userland only, though it also has a subpkg which drops the kernel patch in /usr/share/wireguard. See merge request !151
-rw-r--r--user/wireguard-tools/APKBUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/user/wireguard-tools/APKBUILD b/user/wireguard-tools/APKBUILD
new file mode 100644
index 000000000..95a0dd067
--- /dev/null
+++ b/user/wireguard-tools/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Luis Ressel <aranea@aixah.de>
+# Maintainer: Luis Ressel <aranea@aixah.de>
+pkgname=wireguard-tools
+_pkgreal=WireGuard
+pkgver=0.0.20190123
+pkgrel=0
+pkgdesc="Userland tools for the WireGuard VPN"
+url="https://www.wireguard.com/"
+arch="all"
+options="!check" # no test suite
+license="GPL-2.0-only"
+depends="bash iproute2"
+makedepends="libmnl-dev"
+subpackages="$pkgname-bash-completion:bashcomp:noarch $pkgname-doc wireguard-patch:_patch:noarch"
+source="https://git.zx2c4.com/WireGuard/snapshot/$_pkgreal-$pkgver.tar.xz"
+builddir="$srcdir/$_pkgreal-$pkgver"
+
+build() {
+ cd "$builddir"
+ make RUNSTATEDIR=/run -C src/tools
+}
+
+package() {
+ cd "$builddir"
+ make WITH_BASHCOMPLETION=yes WITH_WGQUICK=yes DESTDIR="$pkgdir" -C src/tools install
+}
+
+bashcomp() {
+ depends="$pkgname"
+ pkgdesc="$pkgdesc (Bash completion)"
+
+ mkdir -p "$subpkgdir/usr/share"
+ mv "$pkgdir/usr/share/bash-completion" "$subpkgdir/usr/share/"
+}
+
+_patch() {
+ depends=""
+ pkgdesc="Kernel patch for the WireGuard VPN"
+
+ cd "$builddir"
+ mkdir -p "$subpkgdir/usr/share/wireguard"
+ contrib/kernel-tree/create-patch.sh > "$subpkgdir/usr/share/wireguard/wireguard-$pkgver.patch"
+
+}
+
+sha512sums="8be40cebabca2a40f98ee10d6fa93708b12b17c6b0eab9aa8b7fab353d78fbd5b280b7b90cb2973cf74a1b9d47c3d250bf3ede6d1318129a45d57e21329b7f59 WireGuard-0.0.20190123.tar.xz"