From f8a827d09dfc357b527a5d086757ab047478f0fd Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Sun, 1 Oct 2017 22:45:12 +0200 Subject: testing/coturn: new aport --- testing/coturn/APKBUILD | 45 +++++++++++++++++++++++++++++++++++++++ testing/coturn/coturn.pre-install | 6 ++++++ testing/coturn/turnserver.initd | 13 +++++++++++ 3 files changed, 64 insertions(+) create mode 100644 testing/coturn/APKBUILD create mode 100644 testing/coturn/coturn.pre-install create mode 100644 testing/coturn/turnserver.initd diff --git a/testing/coturn/APKBUILD b/testing/coturn/APKBUILD new file mode 100644 index 0000000000..195d9cf294 --- /dev/null +++ b/testing/coturn/APKBUILD @@ -0,0 +1,45 @@ +# Contributor: Carlo Landmeter +# Maintainer: +pkgname=coturn +pkgver=4.5.0.6 +pkgrel=0 +pkgdesc="Free open source implementation of TURN and STUN Server" +url="https://github.com/coturn/coturn" +arch="all" +license="BSD-3-Clause" +depends="" +depends_dev="" +makedepends="$depends_dev libressl-dev libevent-dev linux-headers sqlite-dev" +pkgusers="$pkgname" +pkggroups="$pkgname" +install="$pkgname.pre-install" +subpackages="$pkgname-dev $pkgname-doc" +source="coturn-$pkgver.tar.gz::https://github.com/coturn/coturn/archive/$pkgver.tar.gz + turnserver.initd + " +builddir="$srcdir/coturn-$pkgver" + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --disable-rpath \ + --sysconfdir=/etc/$pkgname \ + --turndbdir=/var/lib/$pkgname + make +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install + install -Dm755 "$srcdir"/turnserver.initd \ + "$pkgdir"/etc/init.d/turnserver +} + +sha512sums="4ad7d482af675033d050258e2af04b813561414d4ba926cfd336c6548200dbf1a90f9511983b8cad20713c7edff2a424c9d6b11d401717794e3d1af6b7ed9208 coturn-4.5.0.6.tar.gz +e686dc752618b2da2f6127ab11c49767bfcf228edf458cefe2853093baa845adb2b3159e850db1721e7474c4938fb237dd12bdfd7fd4db2ee73fbd0cb19af17d turnserver.initd" diff --git a/testing/coturn/coturn.pre-install b/testing/coturn/coturn.pre-install new file mode 100644 index 0000000000..28dd31c19a --- /dev/null +++ b/testing/coturn/coturn.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S turnserver 2>/dev/null +adduser -S -D -h /var/lib/turnserver -s /sbin/nologin -G turnserver -g turnserver turnserver 2>/dev/null + +exit 0 diff --git a/testing/coturn/turnserver.initd b/testing/coturn/turnserver.initd new file mode 100644 index 0000000000..5b5eae0759 --- /dev/null +++ b/testing/coturn/turnserver.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run + +description="TURN and STUN Server" +name=turnserver +command=/usr/bin/turnserver +command_user=turnserver +pidfile=/run/turnserver/turnserver.pid +command_args="--no-stdout-log --daemon --pidfile $pidfile" + +start_pre() { + checkpath --directory --owner turnserver:turnserver --mode 0775 \ + /run/turnserver /var/log/turnserver +} -- cgit v1.2.3