Skip to content

Commit 4423c14

Browse files
committed
wireguard-tools: Import version 1.0.20210914.
Based on omniosorg/omnios-extra#1235, will need to live in pkgsrc-extra until nshalman fork is merged upstream.
1 parent 8615489 commit 4423c14

File tree

6 files changed

+110
-0
lines changed

6 files changed

+110
-0
lines changed

wireguard-tools/DESCR

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
wireguard-tools - tools for configuring WireGuard
2+
3+
This supplies the main userspace tooling for using and configuring WireGuard
4+
tunnels, including the wg(8) and wg-quick(8) utilities.

wireguard-tools/Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# $NetBSD$
2+
3+
DISTNAME= wireguard-tools-1.0.20210914
4+
CATEGORIES= net
5+
MASTER_SITES= ${MASTER_SITE_GITHUB:=nshalman/}
6+
GITHUB_TAG= 8588ad10c513e50f2b051a4c48ffe33af562a9d5
7+
8+
MAINTAINER= [email protected]
9+
HOMEPAGE= https://github.com/nshalman/wireguard-tools
10+
COMMENT= Tools for configuring WireGuard
11+
LICENSE= gnu-gpl-v2
12+
13+
USE_TOOLS+= bash:run gmake
14+
15+
BUILD_DIRS= src
16+
MAKE_FLAGS+= WITH_WGQUICK=yes
17+
MAKE_FLAGS+= MANDIR=${PREFIX}/${PKGMANDIR}
18+
19+
REPLACE_BASH+= src/wg-quick/darwin.bash
20+
REPLACE_BASH+= src/wg-quick/sunos.bash
21+
22+
.include "../../mk/bsd.pkg.mk"

wireguard-tools/PLIST

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@comment $NetBSD$
2+
bin/wg
3+
bin/wg-quick
4+
man/man8/wg-quick.8
5+
man/man8/wg.8
6+
share/bash-completion/completions/wg
7+
share/bash-completion/completions/wg-quick

wireguard-tools/distinfo

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
$NetBSD$
2+
3+
BLAKE2s (wireguard-tools-1.0.20210914-8588ad10c513e50f2b051a4c48ffe33af562a9d5.tar.gz) = e03de4167fa1b341f9a9df95b1aaba8c63c5a4083566ef2cc9400b89a9f1ef35
4+
SHA512 (wireguard-tools-1.0.20210914-8588ad10c513e50f2b051a4c48ffe33af562a9d5.tar.gz) = 6281665c48cd4609ebe3512ed0104f5a9ede1e4c6d1fef741be6fbfe35345729940d54770bb422937775f8cb55bf991e0dd123d19fce19ec3f0127a4c4d02898
5+
Size (wireguard-tools-1.0.20210914-8588ad10c513e50f2b051a4c48ffe33af562a9d5.tar.gz) = 130139 bytes
6+
SHA1 (patch-src_Makefile) = 083d6bf0e2517798110faa05fddc0cb718c45a3d
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
3+
<service_bundle type="manifest" name="@SMF_NAME@">
4+
<service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
5+
<dependency name="network" grouping="require_all" restart_on="error" type="service">
6+
<service_fmri value="svc:/milestone/network:default" />
7+
</dependency>
8+
<dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
9+
<service_fmri value="svc:/system/filesystem/local" />
10+
</dependency>
11+
<exec_method name="start" type="method" exec="@PREFIX@/bin/wg-quick up %i" timeout_seconds="180">
12+
<method_context>
13+
<method_credential group="root" user="root" />
14+
<method_environment>
15+
<envvar name="WG_QUICK_USERSPACE_IMPLEMENTATION" value="@PREFIX@/bin/wireguard-go" />
16+
</method_environment>
17+
</method_context>
18+
</exec_method>
19+
<exec_method name="stop" type="method" exec="@PREFIX@/bin/wg-quick down %i" timeout_seconds="180">
20+
<method_context>
21+
<method_credential group="root" user="root" />
22+
<method_environment>
23+
<envvar name="WG_QUICK_USERSPACE_IMPLEMENTATION" value="@PREFIX@/bin/wireguard-go" />
24+
</method_environment>
25+
</method_context>
26+
</exec_method>
27+
<property_group name="application" type="application" />
28+
<property_group name="startd" type="framework">
29+
<propval name="duration" type="astring" value="contract" />
30+
<propval name="ignore_error" type="astring" value="core,signal" />
31+
</property_group>
32+
<stability value="Evolving" />
33+
<template>
34+
<common_name>
35+
<loctext xml:lang="C">WireGuard via wg-quick(8)</loctext>
36+
</common_name>
37+
</template>
38+
</service>
39+
</service_bundle>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
$NetBSD$
2+
3+
install -v is not portable.
4+
5+
--- src/Makefile.orig 2022-12-28 17:23:02.000000000 +0000
6+
+++ src/Makefile
7+
@@ -94,18 +94,18 @@ clean:
8+
$(RM) wg *.o *.d $(wildcard wincompat/*.o wincompat/*.lib wincompat/*.dll)
9+
10+
install: wg
11+
- @install -v -d "$(DESTDIR)$(BINDIR)" && install -v -m 0755 wg "$(DESTDIR)$(BINDIR)/wg"
12+
- @install -v -d "$(DESTDIR)$(MANDIR)/man8" && install -v -m 0644 man/wg.8 "$(DESTDIR)$(MANDIR)/man8/wg.8"
13+
+ @install -d "$(DESTDIR)$(BINDIR)" && install -m 0755 wg "$(DESTDIR)$(BINDIR)/wg"
14+
+ @install -d "$(DESTDIR)$(MANDIR)/man8" && install -m 0644 man/wg.8 "$(DESTDIR)$(MANDIR)/man8/wg.8"
15+
@[ "$(WITH_BASHCOMPLETION)" = "yes" ] || exit 0; \
16+
- install -v -d "$(DESTDIR)$(BASHCOMPDIR)" && install -v -m 0644 completion/wg.bash-completion "$(DESTDIR)$(BASHCOMPDIR)/wg"
17+
+ install -d "$(DESTDIR)$(BASHCOMPDIR)" && install -m 0644 completion/wg.bash-completion "$(DESTDIR)$(BASHCOMPDIR)/wg"
18+
@[ "$(WITH_WGQUICK)" = "yes" ] || exit 0; \
19+
- install -v -m 0755 wg-quick/$(PLATFORM).bash "$(DESTDIR)$(BINDIR)/wg-quick" && install -v -m 0700 -d "$(DESTDIR)$(SYSCONFDIR)/wireguard"
20+
+ install -m 0755 wg-quick/$(PLATFORM).bash "$(DESTDIR)$(BINDIR)/wg-quick" && install -m 0700 -d "$(DESTDIR)$(SYSCONFDIR)/wireguard"
21+
@[ "$(WITH_WGQUICK)" = "yes" ] || exit 0; \
22+
- install -v -m 0644 man/wg-quick.8 "$(DESTDIR)$(MANDIR)/man8/wg-quick.8"
23+
+ install -m 0644 man/wg-quick.8 "$(DESTDIR)$(MANDIR)/man8/wg-quick.8"
24+
@[ "$(WITH_WGQUICK)" = "yes" -a "$(WITH_BASHCOMPLETION)" = "yes" ] || exit 0; \
25+
- install -v -m 0644 completion/wg-quick.bash-completion "$(DESTDIR)$(BASHCOMPDIR)/wg-quick"
26+
+ install -m 0644 completion/wg-quick.bash-completion "$(DESTDIR)$(BASHCOMPDIR)/wg-quick"
27+
@[ "$(WITH_WGQUICK)" = "yes" -a "$(WITH_SYSTEMDUNITS)" = "yes" ] || exit 0; \
28+
- install -v -d "$(DESTDIR)$(SYSTEMDUNITDIR)" && install -v -m 0644 systemd/* "$(DESTDIR)$(SYSTEMDUNITDIR)/"
29+
+ install -d "$(DESTDIR)$(SYSTEMDUNITDIR)" && install -m 0644 systemd/* "$(DESTDIR)$(SYSTEMDUNITDIR)/"
30+
31+
check: clean
32+
scan-build --html-title=wireguard-tools -maxloop 100 --view --keep-going $(MAKE) wg

0 commit comments

Comments
 (0)