Commit aac5a520 authored by Leonardo Arena's avatar Leonardo Arena

testing/spreed-webrtc: new aport

WebRTC audio/video call and conferencing server
parent 2d3b16b0
# 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"
#!/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"
}
#!/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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment