summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schuerch <nativemad@gentoo.org>2016-09-07 17:54:18 +0200
committerAndreas Schuerch <nativemad@gentoo.org>2016-09-07 17:54:18 +0200
commite003f96c094d230eaf7dc69ebdc72e1ae74ea040 (patch)
treeb0972a0a3999d70ac27b3d7992fa9ec48596cf56 /net-im/coturn/coturn-9999.ebuild
parentsys-freebsd/freebsd-sources: Drop freebsd-sources-7.1-types.h-fix.patch. (diff)
downloadgentoo-e003f96c094d230eaf7dc69ebdc72e1ae74ea040.tar.gz
gentoo-e003f96c094d230eaf7dc69ebdc72e1ae74ea040.tar.bz2
gentoo-e003f96c094d230eaf7dc69ebdc72e1ae74ea040.zip
net-im/coturn: new ebuild, written by me
Package-Manager: portage-2.2.28
Diffstat (limited to 'net-im/coturn/coturn-9999.ebuild')
-rw-r--r--net-im/coturn/coturn-9999.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/net-im/coturn/coturn-9999.ebuild b/net-im/coturn/coturn-9999.ebuild
new file mode 100644
index 000000000000..49329554e95d
--- /dev/null
+++ b/net-im/coturn/coturn-9999.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit eutils user
+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]
+ dev-libs/openssl:*
+ 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() {
+ 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
+}
+
+pkg_postinst() {
+ enewgroup turnserver
+ enewuser turnserver -1 -1 -1 turnserver
+ elog "Be aware that the default path for logfiles in coturn is /var/tmp!"
+ elog "You should copy /etc/turnserver.conf.default to"
+ elog "/etc/turnserver.conf and change not only the log option."
+}