mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 05:36:38 +02:00
This allows downstream (postmarketOS) to use wg-quick with systemd-resolved, which also provides a resolvconf tool that is compatible with wg-quick. There should be no impact to Alpine installs with this change, resolvconf in aports still comes from openresolv
70 lines
2 KiB
Text
70 lines
2 KiB
Text
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
|
|
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
|
|
pkgname=wireguard-tools
|
|
pkgver=1.0.20210914
|
|
pkgrel=7
|
|
pkgdesc="Next generation secure network tunnel: userspace tools"
|
|
arch="all"
|
|
url="https://www.wireguard.com"
|
|
# SPDX identifier headers tells us 'GPL-2.0' but considering it
|
|
# is a kernel project i think it is safe to assume it is GPL-2.0-only just
|
|
# like the kernel.
|
|
license="GPL-2.0-only"
|
|
_wg_quick_deps="
|
|
bash
|
|
cmd:resolvconf
|
|
iproute2
|
|
"
|
|
makedepends="libmnl-dev $_wg_quick_deps"
|
|
depends="$pkgname-wg $pkgname-wg-quick"
|
|
install="$pkgname-openrc.post-install"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-bash-completion
|
|
$pkgname-wg:_split
|
|
$pkgname-wg-quick:_split:noarch
|
|
$pkgname-openrc
|
|
"
|
|
options="!check"
|
|
source="
|
|
https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-$pkgver.tar.xz
|
|
wg-quick.initd
|
|
wg-quick-different-sudo.patch
|
|
"
|
|
|
|
build() {
|
|
make -C src
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
make -C src \
|
|
DESTDIR="$pkgdir" \
|
|
WITH_BASHCOMPLETION=yes \
|
|
WITH_WGQUICK=yes \
|
|
WITH_SYSTEMDUNITS=no \
|
|
install
|
|
|
|
find "$builddir"/contrib -name '.gitignore' -delete
|
|
cp -rf "$builddir"/contrib "$pkgdir/usr/share/doc/$pkgname/"
|
|
|
|
install -Dm755 "$srcdir"/wg-quick.initd "$pkgdir"/etc/init.d/wg-quick
|
|
}
|
|
|
|
_split() {
|
|
local cmd=${subpkgname/$pkgname-}
|
|
pkgdesc="$pkgdesc ($cmd)"
|
|
case $cmd in
|
|
wg-quick) depends="$pkgname-wg=$pkgver-r$pkgrel $_wg_quick_deps" ;;
|
|
*) depends= ;;
|
|
esac
|
|
mkdir -p "$subpkgdir"/usr/bin
|
|
mv "$pkgdir"/usr/bin/$cmd "$subpkgdir"/usr/bin/
|
|
}
|
|
|
|
sha512sums="
|
|
6727ea65551dbb064457449b93a943bd6534ca93bc7fa5704c2f6826266c98688ee9ea28731fda57a5245d5f63c05f3899fcca54e40c0b6251b7c4796e957445 wireguard-tools-1.0.20210914.tar.xz
|
|
ad02a7bab0038aaaeacc80ea61497911cb4af6dafe6c781a142cceb4d18acbae20c5e86396e00e88848f410caccc0137c2bff9a736ceff59e0c1227d0d926a15 wg-quick.initd
|
|
bf623fa31215d2e90078950dc18b9e69004235aa2e87cc4910ce710ba51119fb76c345a9cce1d0aa946fad1ccb5a40e9734ff3424e8d2d16cd00c1f1e0fe4916 wg-quick-different-sudo.patch
|
|
"
|