summaryrefslogtreecommitdiff
path: root/opt/wireguard-tools
diff options
context:
space:
mode:
Diffstat (limited to 'opt/wireguard-tools')
-rw-r--r--opt/wireguard-tools/.footprint27
-rw-r--r--opt/wireguard-tools/.signature6
-rw-r--r--opt/wireguard-tools/MAKEPKG84
3 files changed, 117 insertions, 0 deletions
diff --git a/opt/wireguard-tools/.footprint b/opt/wireguard-tools/.footprint
new file mode 100644
index 0000000..6e8538c
--- /dev/null
+++ b/opt/wireguard-tools/.footprint
@@ -0,0 +1,27 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/sv/
+drwxr-xr-x root/root etc/sv/wireguard/
+-rw-r--r-- root/root etc/sv/wireguard/down (EMPTY)
+-rwxr-xr-x root/root etc/sv/wireguard/finish
+-rwxr-xr-x root/root etc/sv/wireguard/run
+drwxr-xr-x root/root etc/sv/wireguard/log/
+-rwxr-xr-x root/root etc/sv/wireguard/log/run
+drwx------ root/root etc/wireguard/
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/wg
+-rwxr-xr-x root/root usr/bin/wg-quick
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/bash-completion/
+drwxr-xr-x root/root usr/share/bash-completion/completions/
+-rw-r--r-- root/root usr/share/bash-completion/completions/wg
+-rw-r--r-- root/root usr/share/bash-completion/completions/wg-quick
+drwxr-xr-x root/root usr/share/man/
+drwxr-xr-x root/root usr/share/man/man8/
+-rw-r--r-- root/root usr/share/man/man8/wg-quick.8.gz
+-rw-r--r-- root/root usr/share/man/man8/wg.8.gz
+drwxr-xr-x root/root var/
+drwxr-xr-x root/root var/lib/
+drwxr-xr-x root/root var/lib/pkg/
+drwxr-xr-x root/root var/lib/pkg/meta/
+-rw-r--r-- root/root var/lib/pkg/meta/wireguard-tools
diff --git a/opt/wireguard-tools/.signature b/opt/wireguard-tools/.signature
new file mode 100644
index 0000000..ca81511
--- /dev/null
+++ b/opt/wireguard-tools/.signature
@@ -0,0 +1,6 @@
+RWTZ9IduCSQ/mLrOiEBuH4ooaGzgR4fVSI4oIhmCUAaXLeT18XghcoJlRtXOzln9S1p5k0DBsYX8EsA+uaLIDEfuWEheYwPnfAg=
+
+SHA256 (MAKEPKG) = 57169fe2c5e50e8706e35bd0f8f541b3c6cfe968ec7ce86182eeb031e6e4b76f
+SHA256 (.footprint) = dbf5cb914efc73b31ea5b7a3b70eeb02b0833235bac31e1d5165ac2e9264e9c0
+SHA256 (wireguard-tools-1.0.20260223.tar.xz) = af459827b80bfd31b83b08077f4b5843acb7d18ad9a33a2ef532d3090f291fbf
+SHA256 (wireguard-tools#1.0.20260223-2.pkg.tar.gz) = 5096b43f1a82af888163f573c57bbed9111732e8849c9a0799ffbca138e5b7e4
diff --git a/opt/wireguard-tools/MAKEPKG b/opt/wireguard-tools/MAKEPKG
new file mode 100644
index 0000000..04ed57c
--- /dev/null
+++ b/opt/wireguard-tools/MAKEPKG
@@ -0,0 +1,84 @@
+#!/bin/mkpkg
+# description: WireGuard userspace tools — wg(8) and wg-quick(8)
+# url: https://www.wireguard.com/
+
+name=wireguard-tools
+version=1.0.20260223
+release=2
+depends=(bash openresolv)
+makedeps=()
+services=(wireguard)
+source=(https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-$version.tar.xz)
+sha256sums=(
+ "af459827b80bfd31b83b08077f4b5843acb7d18ad9a33a2ef532d3090f291fbf"
+)
+
+build() {
+ cd $name-$version/src
+
+ make \
+ CC=clang \
+ WITH_BASHCOMPLETION=yes \
+ WITH_WGQUICK=yes \
+ WITH_SYSTEMDUNITS=no \
+ DESTDIR=$PKG \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ BASHCOMPDIR=/usr/share/bash-completion/completions
+
+ make \
+ WITH_BASHCOMPLETION=yes \
+ WITH_WGQUICK=yes \
+ WITH_SYSTEMDUNITS=no \
+ DESTDIR=$PKG \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ BASHCOMPDIR=/usr/share/bash-completion/completions \
+ install
+}
+
+post_build() {
+ install -d $PKG/etc/sv/wireguard
+ install -d $PKG/etc/sv/wireguard/log
+ install -d -m 700 $PKG/etc/wireguard
+
+ printf '%s\n' \
+ '#!/bin/sh' \
+ 'exec 2>&1' \
+ 'set -e' \
+ 'for conf in /etc/wireguard/*.conf; do' \
+ ' [ -e "$conf" ] || continue' \
+ ' wg-quick up "$conf"' \
+ 'done' \
+ 'exec chpst -b wireguard pause' \
+ > $PKG/etc/sv/wireguard/run
+ chmod 755 $PKG/etc/sv/wireguard/run
+
+ printf '%s\n' \
+ '#!/bin/sh' \
+ 'set -e' \
+ 'for conf in /etc/wireguard/*.conf; do' \
+ ' [ -e "$conf" ] || continue' \
+ ' wg-quick down "$conf"' \
+ 'done' \
+ > $PKG/etc/sv/wireguard/finish
+ chmod 755 $PKG/etc/sv/wireguard/finish
+
+ printf '%s\n' \
+ '#!/bin/sh' \
+ 'mkdir -p /var/log/wireguard' \
+ 'exec svlogd -tt /var/log/wireguard' \
+ > $PKG/etc/sv/wireguard/log/run
+
+ chmod 755 $PKG/etc/sv/wireguard/log/run
+
+ # Service disabled by default - must explicitly: rm /etc/sv/wireguard/down
+ touch $PKG/etc/sv/wireguard/down
+}
+
+signify() {
+ untrusted comment: public key
+ RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
+}
+
+# vim: filetype=sh