# Maintainer (Arch): orphan # Contributor: Nicolás Reynolds # Contributor: Luke Shumaker # Contributor: Michał Masłowski # Maintainer (AUR): Vladimir Tsanev pkgname=rfc5766-turn-server _portname=turnserver pkgver=3.2.5.6 pkgrel=1 pkgdesc="STUN and TURN Relay Server for VoIP and WebRTC" arch=('i686' 'x86_64' 'mips64el') url="http://code.google.com/p/rfc5766-turn-server/" license=('BSD3') depends=('libevent' 'postgresql-libs' 'libmysqlclient' 'hiredis') install="$_portname.install" backup=("etc/turnserver.conf" "etc/turnuserdb.conf") changelog='ChangeLog' source=(http://$_portname.open-sys.org/downloads/v$pkgver/$_portname-$pkgver.tar.gz $_portname.service $_portname.tmpfiles.d) md5sums=('f27056d68a151f1110151165eb8eeeea' 'bf568b614a17ee439e831b8f8aa7236a' 'aa7bf422a9dfba7febb56dc172feb1cf') sha1sums=('d578b2b0eef4fc7879f84259ae062bf9ad251b42' '0c5b348e793bd52ce0ee38d420b26c9b2a2e2ca5' '445e9982549d7ed018bc1fb6176a730313ae3d26') build() { cd "$srcdir/$_portname-$pkgver" ./configure --prefix=/usr --manprefix=/usr/share --examplesdir="/usr/share/$_portname/examples" --disable-rpath make } check() { cd "$srcdir/$_portname-$pkgver" make check } package() { cd "$srcdir/$_portname-$pkgver" make DESTDIR="$pkgdir" install chmod 644 "$pkgdir/usr/lib/libturnclient.a" mv "$pkgdir/usr/etc" "$pkgdir/etc" local file for file in "$pkgdir/etc"/*.default; do mv "$file" "${file%.default}" chmod 644 "${file%.default}" done sed -e '/^#log-file=\/var\/tmp\/turn.log$/c log-file=\/var\/log\/turnserver\/turn.log' \ -e '/^#pidfile="\/var\/run\/turnserver.pid"$/c pidfile="\/var\/run\/turnserver\/turnserver.pid"' \ -i "$pkgdir/etc/turnserver.conf" install -Dm644 "../$_portname.service" "$pkgdir/usr/lib/systemd/system/$_portname.service" install -Dm644 "../$_portname.tmpfiles.d" "$pkgdir/usr/lib/tmpfiles.d/$_portname.conf" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }