summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortarball2021-06-27 11:35:32 +0600
committertarball2021-06-27 11:35:32 +0600
commit4b3c05515ddb1a92a53bc35133affe0a353d8878 (patch)
tree7f7d676204d97e15a4d79e99e0c43a49376fdd0a
downloadaur-4b3c05515ddb1a92a53bc35133affe0a353d8878.tar.gz
Initial commit
-rw-r--r--.SRCINFO26
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD70
-rw-r--r--config_readme16
-rw-r--r--environment10
-rw-r--r--wiretrustee-signal.service17
-rw-r--r--wiretrustee@.service17
7 files changed, 160 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..12fd4217abd8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = wiretrustee
+ pkgdesc = Connect your devices into a single secure private WireGuard®-based mesh network
+ pkgver = 0.0.7
+ pkgrel = 1
+ url = https://wiretrustee.com
+ arch = x86_64
+ arch = aarch64
+ arch = armv7h
+ arch = armv7l
+ license = BSD
+ makedepends = go
+ depends = glibc
+ provides = wiretrustee
+ conflicts = wiretrustee
+ source = wiretrustee-0.0.7.tar.gz::https://github.com/wiretrustee/wiretrustee/archive/refs/tags/v0.0.7.tar.gz
+ source = config_readme
+ source = environment
+ source = wiretrustee@.service
+ source = wiretrustee-signal.service
+ sha256sums = 1af0bf07b6ac22e176f848e8cd4c0ffff2f37ed9cf1d83a82a0232026f446a60
+ sha256sums = e6e2bb1687510b9381202d95beb27b1bfbe30033f4f038e4bdde61e7a3f65f22
+ sha256sums = c72c3f27ee2f2fbb232108781e38f41d7f04272d11a42f59938541ac591bd393
+ sha256sums = 672235231a73743878d77e94827c5aba326464dae63457f94cd51708ac84ba58
+ sha256sums = 79cae90dff3bb3177762b9d3a9c69e69ef79ced3dc3a85529ff5050bf17bcd85
+
+pkgname = wiretrustee
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..cac4d4bafa49
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.tar.*
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..de6cb7709d4d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: tarball <bootctl@gmail.com>
+
+pkgname=wiretrustee
+pkgver=0.0.7
+pkgrel=1
+pkgdesc='Connect your devices into a single secure private WireGuard®-based mesh network'
+url='https://wiretrustee.com'
+arch=(x86_64 aarch64 armv7h armv7l)
+license=(BSD)
+
+provides=("$pkgname")
+conflicts=("$pkgname")
+depends=(glibc)
+makedepends=(go)
+optdepends=()
+
+source=(
+ "$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/refs/tags/v$pkgver.tar.gz"
+ 'config_readme'
+ 'environment'
+ 'wiretrustee@.service'
+ 'wiretrustee-signal.service'
+)
+sha256sums=(
+ '1af0bf07b6ac22e176f848e8cd4c0ffff2f37ed9cf1d83a82a0232026f446a60'
+ 'e6e2bb1687510b9381202d95beb27b1bfbe30033f4f038e4bdde61e7a3f65f22'
+ 'c72c3f27ee2f2fbb232108781e38f41d7f04272d11a42f59938541ac591bd393'
+ '672235231a73743878d77e94827c5aba326464dae63457f94cd51708ac84ba58'
+ '79cae90dff3bb3177762b9d3a9c69e69ef79ced3dc3a85529ff5050bf17bcd85'
+)
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ mkdir -p build
+
+ go mod download
+}
+
+build() {
+ export GOFLAGS='-buildmode=pie -trimpath -mod=readonly -modcacherw'
+ cd "$srcdir/$pkgname-$pkgver"
+
+ go build \
+ -ldflags "-s -w -linkmode=external -extldflags \"$LDFLAGS\"" \
+ -o build/ \
+ .
+}
+
+package() {
+ _source="$srcdir/$pkgname-$pkgver"
+
+ # binary
+ install -Dm755 "$_source/build/$pkgname" "$pkgdir/usr/bin/$pkgname"
+
+ # config directory
+ install -Ddm755 -o root -g root "$pkgdir/etc/$pkgname"
+ install -Dm644 "config_readme" "$pkgdir/etc/$pkgname/README"
+
+ # environment file
+ install -Dm644 environment "$pkgdir/etc/default/$pkgname"
+
+ # systemd units
+ for kind in @ -signal; do
+ install -Dm644 "$pkgname$kind.service" \
+ "$pkgdir/usr/lib/systemd/system/$pkgname$kind.service"
+ done
+
+ # license
+ install -Dm644 "$_source/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/config_readme b/config_readme
new file mode 100644
index 000000000000..b494dc9a0a31
--- /dev/null
+++ b/config_readme
@@ -0,0 +1,16 @@
+Configure your Wiretrustee instance by running:
+
+# wiretrustee init \
+ --config /etc/wiretrustee/main.json \
+ --stunURLs stun:stun.wiretrustee.com:3468,stun:stun.l.google.com:19302 \
+ --turnURLs <TURN User>:<TURN password>@turn:stun.wiretrustee.com:3468 \
+ --signalAddr signal.wiretrustee.com:10000 \
+ --wgLocalAddr 10.30.30.1/24 \
+ --log-level info
+
+Then enable and start the service:
+
+# systemctl enable --now wiretrustee@main
+
+Read more at https://github.com/wiretrustee/wiretrustee
+
diff --git a/environment b/environment
new file mode 100644
index 000000000000..ea6f1dd95a32
--- /dev/null
+++ b/environment
@@ -0,0 +1,10 @@
+# additional options to pass to all wiretrustee services
+# see more at 'wiretrustee --help'
+WIRETRUSTEE_ARGS="--log-level info"
+
+# additional options to pass to wiretrustee clients
+WIRETRUSTEE_CLIENT_ARGS="${WIRETRUSTEE_ARGS}"
+
+# additional options to pass to wiretrustee signal service
+WIRETRUSTEE_SIGNAL_ARGS="${WIRETRUSTEE_ARGS} --port 10000"
+
diff --git a/wiretrustee-signal.service b/wiretrustee-signal.service
new file mode 100644
index 000000000000..4bf2cce98951
--- /dev/null
+++ b/wiretrustee-signal.service
@@ -0,0 +1,17 @@
+[Unit]
+Description = Wiretrustee Signal Service
+Documentation = https://github.com/wiretrustee/wiretrustee#readme
+After = multi-user.target network-online.target
+Wants = network-online.target
+
+[Service]
+Type = simple
+EnvironmentFile = -/etc/default/wiretrustee
+ExecStart = /usr/bin/wiretrustee signal $WIRETRUSTEE_SIGNAL_ARGS
+Restart = on-failure
+RestartSec = 5
+TimeoutStopSec = 5
+
+[Install]
+WantedBy = multi-user.target
+
diff --git a/wiretrustee@.service b/wiretrustee@.service
new file mode 100644
index 000000000000..25a471bbb4f7
--- /dev/null
+++ b/wiretrustee@.service
@@ -0,0 +1,17 @@
+[Unit]
+Description = Wiretrustee Service (%i)
+Documentation = https://github.com/wiretrustee/wiretrustee#readme
+After = multi-user.target network-online.target
+Wants = network-online.target
+
+[Service]
+Type = simple
+EnvironmentFile = -/etc/default/wiretrustee
+ExecStart = /usr/bin/wiretrustee up --config /etc/wiretrustee/%i.json $WIRETRUSTEE_CLIENT_ARGS
+Restart = on-failure
+RestartSec = 5
+TimeoutStopSec = 5
+
+[Install]
+WantedBy = multi-user.target
+