# Contributor: Luis Ressel # Maintainer: Luis Ressel pkgname=wireguard-tools _pkgreal=WireGuard pkgver=0.0.20190227 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="0c27353f27d7ae758cab84a02f63863681baa5eab2b64aa494be30c411b4dccc3af030b410dbfb72342fb5ea34be04f2d3b36ad0bb6a418d9f389ac34384eca3 WireGuard-0.0.20190227.tar.xz"