# Contributor: Stuart Cardall # Maintainer: Stuart Cardall pkgname=wireguard-tools pkgver=0.0.20170531 pkgrel=0 pkgdesc="Next generation secure network tunnel: userspace tools" arch='all' url='https://www.wireguard.io' license="GPLv2" makedepends="libmnl-dev" subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch" options="!check" source="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$pkgver.tar.xz" builddir="$srcdir"/WireGuard-$pkgver build() { cd "$builddir" make -C src/tools || return 1 } package() { cd "$builddir" mkdir -p "$pkgdir"/usr/share/doc/$_name make -C src/tools \ DESTDIR="$pkgdir" \ WITH_BASHCOMPLETION=yes \ WITH_WGQUICK=yes \ WITH_SYSTEMDUNITS=no \ install || return 1 find "$builddir"/contrib/examples -name '.gitignore' -delete cp -rf "$builddir"/contrib/examples "$pkgdir"/usr/share/doc/$_name/ } bashcomp() { depends="bash" pkgdesc="WireGuard bash completions" mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/share "$subpkgdir"/usr } sha512sums="82ad68e61ccd2844837f817065f7576839cb19e278d28c140d168620fe257f41f201de069105f3b4e2a104d9390460409e831581f2dc02a1bfda18c13c410bed WireGuard-0.0.20170531.tar.xz"