summaryrefslogtreecommitdiff
path: root/net-im/coturn/coturn-4.5.0.7.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 20:52:04 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 20:52:04 +0100
commit71bc00c87bba1ce31de0dac6c3b7fd1aee6917fc (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /net-im/coturn/coturn-4.5.0.7.ebuild
parent6612a728ea11526a849618ec515ad57131d64416 (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'net-im/coturn/coturn-4.5.0.7.ebuild')
-rw-r--r--net-im/coturn/coturn-4.5.0.7.ebuild71
1 files changed, 71 insertions, 0 deletions
diff --git a/net-im/coturn/coturn-4.5.0.7.ebuild b/net-im/coturn/coturn-4.5.0.7.ebuild
new file mode 100644
index 000000000000..438817b8c4a6
--- /dev/null
+++ b/net-im/coturn/coturn-4.5.0.7.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils user systemd tmpfiles
+DESCRIPTION="coturn TURN server project"
+HOMEPAGE="https://github.com/${PN}/${PN}"
+
+if [ ${PV} = 9999 ]; then
+ KEYWORDS=""
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ inherit git-r3
+ DEPEND="dev-vcs/git"
+# S="${WORKDIR}/${PN}-master"
+else
+ KEYWORDS="~x86 ~amd64"
+ 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="|| ( dev-libs/libevent[-ssl,libressl] dev-libs/libevent[ssl] )
+ mongodb? ( dev-libs/mongo-c-driver )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:* )
+ redis? ( dev-libs/hiredis )
+ sqlite? ( dev-db/sqlite )"
+
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ 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"
+ sed 's:#simple-log:simple-log:' -i "${S}/examples/etc/turnserver.conf" \
+ || die "sed for simple-log failed"
+ if ! use mongodb; then
+ export TURN_NO_MONGO=yes
+ fi
+ if ! use mysql; then
+ export TURN_NO_MYSQL=yes
+ fi
+ if ! use postgres; then
+ export TURN_NO_PQ=yes
+ fi
+ if ! use redis; then
+ export TURN_NO_HIREDIS=yes
+ fi
+ if ! use sqlite; then
+ export TURN_NO_SQLITE=yes
+ fi
+
+ econf $(use_with sqlite)
+}
+
+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"
+ enewgroup turnserver
+ enewuser turnserver -1 -1 -1 turnserver
+ elog "You need to copy /etc/turnserver.conf.default to"
+ elog "/etc/turnserver.conf and do your settings there."
+}