From 4423c144f6b87897636deae8fadefb9f50a8527e Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Mon, 9 Jan 2023 10:58:10 +0000 Subject: [PATCH] wireguard-tools: Import version 1.0.20210914. Based on https://github.com/omniosorg/omnios-extra/pull/1235, will need to live in pkgsrc-extra until nshalman fork is merged upstream. --- wireguard-tools/DESCR | 4 +++ wireguard-tools/Makefile | 22 ++++++++++++ wireguard-tools/PLIST | 7 ++++ wireguard-tools/distinfo | 6 ++++ wireguard-tools/files/smf/manifest.xml | 39 ++++++++++++++++++++++ wireguard-tools/patches/patch-src_Makefile | 32 ++++++++++++++++++ 6 files changed, 110 insertions(+) create mode 100644 wireguard-tools/DESCR create mode 100644 wireguard-tools/Makefile create mode 100644 wireguard-tools/PLIST create mode 100644 wireguard-tools/distinfo create mode 100644 wireguard-tools/files/smf/manifest.xml create mode 100644 wireguard-tools/patches/patch-src_Makefile diff --git a/wireguard-tools/DESCR b/wireguard-tools/DESCR new file mode 100644 index 0000000..72ace93 --- /dev/null +++ b/wireguard-tools/DESCR @@ -0,0 +1,4 @@ +wireguard-tools - tools for configuring WireGuard + +This supplies the main userspace tooling for using and configuring WireGuard +tunnels, including the wg(8) and wg-quick(8) utilities. diff --git a/wireguard-tools/Makefile b/wireguard-tools/Makefile new file mode 100644 index 0000000..82ddac3 --- /dev/null +++ b/wireguard-tools/Makefile @@ -0,0 +1,22 @@ +# $NetBSD$ + +DISTNAME= wireguard-tools-1.0.20210914 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_GITHUB:=nshalman/} +GITHUB_TAG= 8588ad10c513e50f2b051a4c48ffe33af562a9d5 + +MAINTAINER= jperkin@pkgsrc.org +HOMEPAGE= https://github.com/nshalman/wireguard-tools +COMMENT= Tools for configuring WireGuard +LICENSE= gnu-gpl-v2 + +USE_TOOLS+= bash:run gmake + +BUILD_DIRS= src +MAKE_FLAGS+= WITH_WGQUICK=yes +MAKE_FLAGS+= MANDIR=${PREFIX}/${PKGMANDIR} + +REPLACE_BASH+= src/wg-quick/darwin.bash +REPLACE_BASH+= src/wg-quick/sunos.bash + +.include "../../mk/bsd.pkg.mk" diff --git a/wireguard-tools/PLIST b/wireguard-tools/PLIST new file mode 100644 index 0000000..d3f5e85 --- /dev/null +++ b/wireguard-tools/PLIST @@ -0,0 +1,7 @@ +@comment $NetBSD$ +bin/wg +bin/wg-quick +man/man8/wg-quick.8 +man/man8/wg.8 +share/bash-completion/completions/wg +share/bash-completion/completions/wg-quick diff --git a/wireguard-tools/distinfo b/wireguard-tools/distinfo new file mode 100644 index 0000000..8edc4b9 --- /dev/null +++ b/wireguard-tools/distinfo @@ -0,0 +1,6 @@ +$NetBSD$ + +BLAKE2s (wireguard-tools-1.0.20210914-8588ad10c513e50f2b051a4c48ffe33af562a9d5.tar.gz) = e03de4167fa1b341f9a9df95b1aaba8c63c5a4083566ef2cc9400b89a9f1ef35 +SHA512 (wireguard-tools-1.0.20210914-8588ad10c513e50f2b051a4c48ffe33af562a9d5.tar.gz) = 6281665c48cd4609ebe3512ed0104f5a9ede1e4c6d1fef741be6fbfe35345729940d54770bb422937775f8cb55bf991e0dd123d19fce19ec3f0127a4c4d02898 +Size (wireguard-tools-1.0.20210914-8588ad10c513e50f2b051a4c48ffe33af562a9d5.tar.gz) = 130139 bytes +SHA1 (patch-src_Makefile) = 083d6bf0e2517798110faa05fddc0cb718c45a3d diff --git a/wireguard-tools/files/smf/manifest.xml b/wireguard-tools/files/smf/manifest.xml new file mode 100644 index 0000000..5d95501 --- /dev/null +++ b/wireguard-tools/files/smf/manifest.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wireguard-tools/patches/patch-src_Makefile b/wireguard-tools/patches/patch-src_Makefile new file mode 100644 index 0000000..989af1d --- /dev/null +++ b/wireguard-tools/patches/patch-src_Makefile @@ -0,0 +1,32 @@ +$NetBSD$ + +install -v is not portable. + +--- src/Makefile.orig 2022-12-28 17:23:02.000000000 +0000 ++++ src/Makefile +@@ -94,18 +94,18 @@ clean: + $(RM) wg *.o *.d $(wildcard wincompat/*.o wincompat/*.lib wincompat/*.dll) + + install: wg +- @install -v -d "$(DESTDIR)$(BINDIR)" && install -v -m 0755 wg "$(DESTDIR)$(BINDIR)/wg" +- @install -v -d "$(DESTDIR)$(MANDIR)/man8" && install -v -m 0644 man/wg.8 "$(DESTDIR)$(MANDIR)/man8/wg.8" ++ @install -d "$(DESTDIR)$(BINDIR)" && install -m 0755 wg "$(DESTDIR)$(BINDIR)/wg" ++ @install -d "$(DESTDIR)$(MANDIR)/man8" && install -m 0644 man/wg.8 "$(DESTDIR)$(MANDIR)/man8/wg.8" + @[ "$(WITH_BASHCOMPLETION)" = "yes" ] || exit 0; \ +- install -v -d "$(DESTDIR)$(BASHCOMPDIR)" && install -v -m 0644 completion/wg.bash-completion "$(DESTDIR)$(BASHCOMPDIR)/wg" ++ install -d "$(DESTDIR)$(BASHCOMPDIR)" && install -m 0644 completion/wg.bash-completion "$(DESTDIR)$(BASHCOMPDIR)/wg" + @[ "$(WITH_WGQUICK)" = "yes" ] || exit 0; \ +- install -v -m 0755 wg-quick/$(PLATFORM).bash "$(DESTDIR)$(BINDIR)/wg-quick" && install -v -m 0700 -d "$(DESTDIR)$(SYSCONFDIR)/wireguard" ++ install -m 0755 wg-quick/$(PLATFORM).bash "$(DESTDIR)$(BINDIR)/wg-quick" && install -m 0700 -d "$(DESTDIR)$(SYSCONFDIR)/wireguard" + @[ "$(WITH_WGQUICK)" = "yes" ] || exit 0; \ +- install -v -m 0644 man/wg-quick.8 "$(DESTDIR)$(MANDIR)/man8/wg-quick.8" ++ install -m 0644 man/wg-quick.8 "$(DESTDIR)$(MANDIR)/man8/wg-quick.8" + @[ "$(WITH_WGQUICK)" = "yes" -a "$(WITH_BASHCOMPLETION)" = "yes" ] || exit 0; \ +- install -v -m 0644 completion/wg-quick.bash-completion "$(DESTDIR)$(BASHCOMPDIR)/wg-quick" ++ install -m 0644 completion/wg-quick.bash-completion "$(DESTDIR)$(BASHCOMPDIR)/wg-quick" + @[ "$(WITH_WGQUICK)" = "yes" -a "$(WITH_SYSTEMDUNITS)" = "yes" ] || exit 0; \ +- install -v -d "$(DESTDIR)$(SYSTEMDUNITDIR)" && install -v -m 0644 systemd/* "$(DESTDIR)$(SYSTEMDUNITDIR)/" ++ install -d "$(DESTDIR)$(SYSTEMDUNITDIR)" && install -m 0644 systemd/* "$(DESTDIR)$(SYSTEMDUNITDIR)/" + + check: clean + scan-build --html-title=wireguard-tools -maxloop 100 --view --keep-going $(MAKE) wg