Skip to content

Commit ddb7771

Browse files
committed
wireguard-tools: initial package at 1.0.20210914
1 parent 5f7e528 commit ddb7771

File tree

3 files changed

+107
-0
lines changed

3 files changed

+107
-0
lines changed

build/wireguard-tools/build.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/bash
2+
#
3+
# {{{ CDDL HEADER
4+
#
5+
# This file and its contents are supplied under the terms of the
6+
# Common Development and Distribution License ("CDDL"), version 1.0.
7+
# You may only use this file in accordance with the terms of version
8+
# 1.0 of the CDDL.
9+
#
10+
# A full copy of the text of the CDDL should have accompanied this
11+
# source. A copy of the CDDL is also available via the Internet at
12+
# http://www.illumos.org/license/CDDL.
13+
# }}}
14+
15+
# Copyright 2023 OmniOS Community Edition (OmniOSce) Association.
16+
17+
. ../../lib/build.sh
18+
19+
PROG=wireguard-tools
20+
PKG=ooce/network/wireguard-tools
21+
VER=1.0.20210914
22+
SUMMARY="Tools for configuring WireGuard"
23+
DESC="This supplies the main userspace tooling for using and configuring WireGuard tunnels, including the wg(8) and\
24+
wg-quick(8) utilities. "
25+
26+
RUN_DEPENDS_IPS="ooce/network/wireguard-go"
27+
28+
XFORM_ARGS+="
29+
-DPREFIX=${PREFIX#/}
30+
-DPROG=$PROG
31+
-DSERVICE=ooce/network/wg-quick
32+
"
33+
34+
build_and_install() {
35+
pushd $TMPDIR/$BUILDDIR/$PROG/src
36+
gmake \
37+
PREFIX=$PREFIX \
38+
DESTDIR=$DESTDIR \
39+
WITH_WGQUICK=yes \
40+
install
41+
popd >/dev/null
42+
}
43+
44+
init
45+
prep_build
46+
# Use nshalman fork until it is fully upstreamed
47+
clone_github_source $PROG $GITHUB/nshalman/$PROG "8588ad1"
48+
build_and_install
49+
xform files/wg-quick.xml > $TMPDIR/network-wg-quick.xml
50+
install_smf ooce network-wg-quick.xml
51+
make_package
52+
clean_up
53+
54+
# Vim hints
55+
# vim:ts=4:sw=4:et:fdm=marker
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="export">
4+
<service name="$(SERVICE)" type="service" version="0">
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>

build/wireguard-tools/local.mog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# This file and its contents are supplied under the terms of the
3+
# Common Development and Distribution License ("CDDL"), version 1.0.
4+
# You may only use this file in accordance with the terms of version
5+
# 1.0 of the CDDL.
6+
#
7+
# A full copy of the text of the CDDL should have accompanied this
8+
# source. A copy of the CDDL is also available via the Internet at
9+
# http://www.illumos.org/license/CDDL.
10+
11+
# Copyright 2023 OmniOS Community Edition (OmniOSce) Association.
12+
13+
license wireguard-tools/COPYING license=GPLv2

0 commit comments

Comments
 (0)