42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
# Description: coturn TURN server project
|
|
# URL: https://github.com/coturn/coturn
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
# Depends on: libevent
|
|
# Optional: hiredis libmicrohttpd mariadb postgresql sqlite3
|
|
|
|
name=coturn
|
|
version=4.6.2
|
|
release=2
|
|
source=(https://github.com/coturn/coturn/archive/$version/$name-$version.tar.gz
|
|
turnserver.service)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
export CFLAGS="$CFLAGS -ffat-lto-objects"
|
|
./configure \
|
|
--prefix=/usr \
|
|
--manprefix=/usr/share \
|
|
--examplesdir=/usr/share/turnserver/examples \
|
|
--disable-rpath
|
|
make
|
|
make DESTDIR=$PKG install
|
|
|
|
install -dm 700 $PKG/etc/turnserver
|
|
|
|
mv $PKG/{usr/etc/turnserver.conf.default,etc/turnserver/turnserver.conf}
|
|
sed \
|
|
-e '/^#log-file=\/var\/tmp\/turn.log$/c log-file=\/var\/log\/turnserver\/turn.log' \
|
|
-e '/^#pidfile="\/var\/run\/turnserver.pid"$/c pidfile=\/run\/turnserver\/turnserver.pid' \
|
|
-i $PKG/etc/turnserver/turnserver.conf
|
|
rmdir $PKG/usr/etc
|
|
rm -rf $PKG/var/db/turndb
|
|
|
|
find $PKG/{etc,usr/include,usr/lib,usr/share,var} -type f ! -name '*.sh' ! -name '*.pl' -exec chmod 644 {} +
|
|
|
|
setcap 'cap_net_bind_service=+ep' $PKG/usr/bin/turnserver
|
|
install -dm 750 -o coturn -g root $PKG/var/log/turnserver
|
|
install -dm 700 -o coturn -g coturn $PKG/var/lib/coturn
|
|
install -Dm 755 $SRC/turnserver.service $PKG/etc/rc.d/turnserver
|
|
}
|