# Contributor: Stuart Cardall # Maintainer: Stuart Cardall pkgname=wireguard-tools pkgver=0.0.20180718 pkgrel=0 pkgdesc="Next generation secure network tunnel: userspace tools" arch='all' url='https://www.wireguard.com' license="GPL-2.0" 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 } package() { cd "$builddir" mkdir -p "$pkgdir/usr/share/doc/$pkgname" make -C src/tools \ DESTDIR="$pkgdir" \ WITH_BASHCOMPLETION=yes \ WITH_WGQUICK=yes \ WITH_SYSTEMDUNITS=no \ install find "$builddir"/contrib/examples -name '.gitignore' -delete cp -rf "$builddir"/contrib/examples "$pkgdir/usr/share/doc/$pkgname/" } bashcomp() { depends="bash" pkgdesc="WireGuard bash completions" mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/share "$subpkgdir"/usr } sha512sums="38d7fa90ab7528c0f29e93c4b37c357e51f33061353c180044c50fe05a37874652b3cb179c80f17b8fe9dddbcb224253723ad730e2ad5649cb17ec9d32e8f9ca WireGuard-0.0.20180718.tar.xz"