void-packages/srcpkgs/coturn/template
2021-03-05 17:07:48 +01:00

50 lines
1.3 KiB
Bash

# Template file for 'coturn'
pkgname=coturn
version=4.5.1.3
revision=2
build_style=gnu-configure
configure_args="--libdir=/usr/lib"
conf_files="/etc/turnserver.conf"
makedepends="openssl-devel libevent-devel hiredis-devel sqlite-devel
postgresql-libs-devel libmariadbclient-devel"
short_desc="Server Implementation of TURN and STUN"
maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://github.com/coturn/coturn"
distfiles="https://github.com/coturn/coturn/archive/${version}.tar.gz"
checksum=4ff1f8c041ac71445018d81321d4b66e5dce4f171ef73a348d858dc9a0cc1cce
post_patch() {
# LibreSSL does not support FIPS mode
vsed -i src/client/ns_turn_msg.c \
-e 's/^#ifdef EVP_MD_CTX_FLAG_NON_FIPS_ALLOW$/#if 0/'
}
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
}
}