void-packages/srcpkgs/coturn/template

50 lines
1.3 KiB
Bash

# Template file for 'coturn'
pkgname=coturn
version=4.6.2
revision=2
build_style=configure
configure_args="
--prefix=/usr
--manprefix=/usr/share
--sysconfdir=/etc"
conf_files="/etc/turnserver.conf"
hostmakedepends="pkg-config"
makedepends="openssl-devel libevent-devel hiredis-devel sqlite-devel
postgresql-libs-devel libmariadbclient-devel mariadb"
short_desc="Server Implementation of TURN and STUN"
maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://github.com/coturn/coturn"
changelog="https://raw.githubusercontent.com/coturn/coturn/master/ChangeLog"
distfiles="https://github.com/coturn/coturn/archive/${version}.tar.gz"
checksum=13f2a38b66cffb73d86b5ed24acba4e1371d738d758a6039e3a18f0c84c176ad
pre_build() {
# configure script does not like /usr when cross-building
if [ "$CROSS_BUILD" ]; then
LOCALSTATEDIR=/var ./configure --prefix=/tmp --confdir=/etc
sed -i 's:\${MANPREFIX}:/tmp/share:' Makefile
fi
}
system_accounts="_coturn"
post_install() {
if [ "$CROSS_BUILD" ]; then
vmkdir usr
mv -v ${DESTDIR}/tmp/* ${DESTDIR}/usr
fi
vlicense LICENSE
vsv coturnserver
vsconf examples/etc/turnserver.conf
}
coturn-devel_package() {
short_desc="${short_desc} - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove "usr/lib/*.a"
vmove usr/include
}
}