summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoeljunior2020-12-18 19:27:51 +0000
committerNoeljunior2020-12-18 19:27:51 +0000
commit774512ceb5bb5a687eac46080d875e6a640764f8 (patch)
treefedc2abc3ea80081fd78ec6d872b03f7e648f51f
downloadaur-774512ceb5bb5a687eac46080d875e6a640764f8.tar.gz
Initial commit, v0.2.0
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD36
-rw-r--r--nextcloud-spreed-signaling.install17
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..14cac1b9fce
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = nextcloud-spreed-signaling
+ pkgdesc = Standalone signaling server for Nextcloud Talk.
+ pkgver = 0.2.0
+ pkgrel = 1
+ url = https://github.com/strukturag/nextcloud-spreed-signaling
+ install = nextcloud-spreed-signaling.install
+ arch = any
+ license = AGPL3
+ makedepends = go>=1.10
+ optdepends = nats-server
+ optdepends = janus-gateway
+ source = https://github.com/strukturag/nextcloud-spreed-signaling/releases/download/v0.2.0/nextcloud-spreed-signaling-v0.2.0.tar.gz
+ sha256sums = SKIP
+
+pkgname = nextcloud-spreed-signaling
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b398ec401a5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Noeljnuior <liamgliamgmailcom>
+
+pkgname=nextcloud-spreed-signaling
+pkgver=0.2.0
+pkgrel=1
+pkgdesc='Standalone signaling server for Nextcloud Talk.'
+arch=(any)
+url='https://github.com/strukturag/nextcloud-spreed-signaling'
+license=(AGPL3)
+makedepends=('go>=1.10')
+install="nextcloud-spreed-signaling.install"
+depends=()
+optdepends=('nats-server' 'janus-gateway')
+source=("https://github.com/strukturag/nextcloud-spreed-signaling/releases/download/v$pkgver/nextcloud-spreed-signaling-v$pkgver.tar.gz")
+sha256sums=('SKIP')
+
+build() {
+ cd "$srcdir/$pkgname-v$pkgver"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+ make -j 1 build
+ make -j 1 client
+}
+
+package() {
+ cd "$srcdir/$pkgname-v$pkgver"
+ install -Dm755 "bin/signaling" "$pkgdir/usr/bin/signaling"
+ install -Dm755 "bin/proxy" "$pkgdir/usr/bin/signaling-proxy"
+ install -Dm755 "bin/client" "$pkgdir/usr/bin/signaling-client"
+ install -Dm644 "dist/init/systemd/signaling.service" "$pkgdir/usr/lib/systemd/system/signaling.service"
+ install -Dm600 "server.conf.in" "$pkgdir/etc/signaling/server.conf"
+}
diff --git a/nextcloud-spreed-signaling.install b/nextcloud-spreed-signaling.install
new file mode 100644
index 00000000000..12866fde6ba
--- /dev/null
+++ b/nextcloud-spreed-signaling.install
@@ -0,0 +1,17 @@
+post_install() {
+ groupadd --system signaling
+ useradd --system \
+ --gid signaling \
+ --shell /usr/bin/nologin \
+ --comment "Standalone signaling server for Nextcloud Talk." \
+ signaling
+
+ chown signaling: /etc/signaling/server.conf
+}
+
+post_remove() {
+ systemctl stop signaling.service 2>/dev/null
+ systemctl disable signaling.service 2>/dev/null
+
+ userdel signaling
+}