summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/coturn/coturn-9999.ebuild')
-rw-r--r--net-im/coturn/coturn-9999.ebuild31
1 files changed, 21 insertions, 10 deletions
diff --git a/net-im/coturn/coturn-9999.ebuild b/net-im/coturn/coturn-9999.ebuild
index d3a3c881360..8c10c10306a 100644
--- a/net-im/coturn/coturn-9999.ebuild
+++ b/net-im/coturn/coturn-9999.ebuild
@@ -4,22 +4,25 @@
EAPI=7
inherit toolchain-funcs systemd tmpfiles
+
DESCRIPTION="coturn TURN server project"
HOMEPAGE="https://github.com/coturn/coturn"
-if [ ${PV} = 9999 ]; then
- EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+if [[ ${PV} == *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/coturn/coturn.git"
inherit git-r3
-# S="${WORKDIR}/${PN}-master"
+ #S="${WORKDIR}/${PN}-master"
else
+ SRC_URI="https://github.com/coturn/coturn/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
- SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
fi
LICENSE="BSD"
SLOT="0"
IUSE="mongodb mysql postgres redis sqlite"
-RDEPEND="acct-group/turnserver
+
+RDEPEND="
+ acct-group/turnserver
acct-user/turnserver
>dev-libs/libevent-2.1.8:=
dev-libs/openssl:=
@@ -27,18 +30,21 @@ RDEPEND="acct-group/turnserver
mysql? ( dev-db/mysql-connector-c:= )
postgres? ( dev-db/postgresql:* )
redis? ( dev-libs/hiredis:= )
- sqlite? ( dev-db/sqlite )"
+ sqlite? ( dev-db/sqlite )
+"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-4.5.2-respect-TMPDIR.patch
+ "${FILESDIR}"/${P}-openssl3.patch
)
src_configure() {
- if [ -n "${AR}" ]; then
+ if [[ -n "${AR}" ]]; then
sed 's:ARCHIVERCMD="ar -r":ARCHIVERCMD="${AR} -r":g' -i "${S}/configure"
fi
+
sed 's:MANPREFIX}/man/:MANPREFIX}/:g' -i "${S}/Makefile.in" || die "sed for mandir failed"
sed 's:#log-file=/var/tmp/turn.log:log-file=/var/log/turnserver.log:' \
-i "${S}/examples/etc/turnserver.conf" || die "sed for logdir failed"
@@ -46,6 +52,7 @@ src_configure() {
|| die "sed for simple-log failed"
sed '/INSTALL_DIR} examples\/script/a \ \${INSTALL_DIR} examples\/ca \${DESTDIR}${EXAMPLESDIR}' \
-i "${S}/Makefile.in" || die "sed for example ca failed"
+
if ! use mongodb; then
export TURN_NO_MONGO=yes
fi
@@ -73,15 +80,19 @@ src_configure() {
src_install() {
default
+
newinitd "${FILESDIR}/turnserver.init" turnserver
+
insinto /etc/logrotate.d
newins "${FILESDIR}/logrotate.${PN}" "${PN}"
+
systemd_dounit "${FILESDIR}/${PN}.service"
dotmpfiles "${FILESDIR}/${PN}.conf"
}
pkg_postinst() {
- tmpfiles_process "${PN}.conf"
- elog "You need to copy /etc/turnserver.conf.default to"
- elog "/etc/turnserver.conf and do your settings there."
+ tmpfiles_process ${PN}.conf
+
+ elog "You need to copy ${EROOT}/etc/turnserver.conf.default to"
+ elog "${EROOT}/etc/turnserver.conf and do your settings there."
}