diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-01-03 15:21:30 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-01-03 15:22:00 +0000 |
commit | aac5a520b4c43578618ca98b179fb53831a1f650 (patch) | |
tree | c82131f823b2c9506bafed193a90c20a8c37c94b /testing/spreed-webrtc | |
parent | 2d3b16b0cd222689d4c7c40b48dff28d3d8c366f (diff) | |
download | aports-aac5a520b4c43578618ca98b179fb53831a1f650.tar.bz2 aports-aac5a520b4c43578618ca98b179fb53831a1f650.tar.xz |
testing/spreed-webrtc: new aport
WebRTC audio/video call and conferencing server
Diffstat (limited to 'testing/spreed-webrtc')
-rw-r--r-- | testing/spreed-webrtc/APKBUILD | 60 | ||||
-rw-r--r-- | testing/spreed-webrtc/spreed-webrtc.initd | 21 | ||||
-rw-r--r-- | testing/spreed-webrtc/spreed-webrtc.pre-install | 4 |
3 files changed, 85 insertions, 0 deletions
diff --git a/testing/spreed-webrtc/APKBUILD b/testing/spreed-webrtc/APKBUILD new file mode 100644 index 0000000000..6c45c8a765 --- /dev/null +++ b/testing/spreed-webrtc/APKBUILD @@ -0,0 +1,60 @@ +# Contributor: Leonardo Arena <rnalrd@alpinelinux.org> +# Maintainer: +pkgname=spreed-webrtc +pkgver=0.29.5 +pkgrel=0 +pkgdesc="WebRTC audio/video call and conferencing server" +url="http://spreed.me" +arch="all" +license="AGPL3" +depends= +depends_dev= +makedepends="$depends_dev autoconf automake go go-context go-acceptlanguageparser + go-conf go-httputils go-mux go-nats go-nuid go-pkac go-phoenix + go-securecookie go-sloth go-spreed-turnservicecli go-uuid go-websocket + nodejs" +install="$pkgname.pre-install" +subpackages="$pkgname-doc" +pkgusers="spreed" +pkggroups="spreed" +_vendor="strukturag" +source="$pkgname-$pkgver.tar.gz::https://github.com/$_vendor/spreed-webrtc/archive/v$pkgver.tar.gz + $pkgname.initd" +builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + cd "$builddir" + ./autogen.sh + #some libraries aren't in the expected path in the tarball + mkdir -p src/github.com/$_vendor/$pkgname && mv go src/github.com/$_vendor/$pkgname || return 1 + #fix default server config + sed -i 's|;root = /usr/share/spreed-webrtc-server/www|root = /usr/share/spreed-webrtc-server/www|' \ + server.conf.in || return 1 +} + +build() { + cd "$builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + make GOPATH="$GOPATH $builddir/go:$builddir/src" assets || return 1 + make GOPATH="$GOPATH $builddir:$builddir/go:$builddir/src" binaryall || return 1 +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install || return 1 + mkdir -p "$pkgdir"/usr/share/doc/$pkgname + mv doc/* "$pkgdir"/usr/share/doc/$pkgname + install -m644 -D server.conf.in "$pkgdir"/etc/$pkgname/${pkgname}-server.conf + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/${pkgname}-server + mkdir -p "$pkgdir"/var/log/$pkgname && chown spreed:spreed "$pkgdir"/var/log/$pkgname +} + +md5sums="9c73d65aaaf14f9fc69810efd0469222 spreed-webrtc-0.29.5.tar.gz +e676c7380170a1f4f68d49a1a11f9e54 spreed-webrtc.initd" +sha256sums="c31733e216fec0e03cfc24c437dc029769af0761cc2138c9c00942fb39654ba3 spreed-webrtc-0.29.5.tar.gz +20df30221d31779cfcf012d3b105d2e9f7da822f240fbf329f24ddc77dbe099a spreed-webrtc.initd" +sha512sums="1b4fbaeceb4dd85624707edb49e9846ff9c5eb928f609f580f1b6433d9dab24db5eb693b3a61d013c40517ea569a24b9741c2180c4fa26fdaf439a3a579e5d46 spreed-webrtc-0.29.5.tar.gz +740290f2803fd5b960630c74c34efd36f85381d1422d2dac5704346a74cd2395b5bab931c8bcbf5d7db5ead188618020a937933c609fe2db6b184bd5f7e20419 spreed-webrtc.initd" diff --git a/testing/spreed-webrtc/spreed-webrtc.initd b/testing/spreed-webrtc/spreed-webrtc.initd new file mode 100644 index 0000000000..5ab0efd22b --- /dev/null +++ b/testing/spreed-webrtc/spreed-webrtc.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run + +command=/usr/sbin/spreed-webrtc-server +pidfile=/var/run/spreed-webrtc/${SVCNAME}.pid +conf=/etc/spreed-webrtc/${SVCNAME}.conf +logfile=/var/log/spreed-webrtc/spreed-webrtc-server.log + +: ${exec_user:=spreed} +: ${exec_group:=spreed} + +start_stop_daemon_args="--user $exec_user --group $exec_group --background --make-pidfile" + +depend() { + need net + after firewall +} + +start_pre() { + checkpath --directory ${pidfile%/*} --owner ${exec_user}:${exec_group} + command_args="-c $conf -l $logfile" +} diff --git a/testing/spreed-webrtc/spreed-webrtc.pre-install b/testing/spreed-webrtc/spreed-webrtc.pre-install new file mode 100644 index 0000000000..a14b9033fd --- /dev/null +++ b/testing/spreed-webrtc/spreed-webrtc.pre-install @@ -0,0 +1,4 @@ +#!/bin/sh +addgroup -S spreed 2>/dev/null +adduser -h /usr/share/spreed-webrtc -s /sbin/nologin -G spreed -S -D spreed 2>/dev/null +exit 0 |