diff options
author | Andreas Schuerch <nativemad@gentoo.org> | 2016-09-07 17:54:18 +0200 |
---|---|---|
committer | Andreas Schuerch <nativemad@gentoo.org> | 2016-09-07 17:54:18 +0200 |
commit | e003f96c094d230eaf7dc69ebdc72e1ae74ea040 (patch) | |
tree | b0972a0a3999d70ac27b3d7992fa9ec48596cf56 /net-im | |
parent | sys-freebsd/freebsd-sources: Drop freebsd-sources-7.1-types.h-fix.patch. (diff) | |
download | gentoo-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')
-rw-r--r-- | net-im/coturn/Manifest | 1 | ||||
-rw-r--r-- | net-im/coturn/coturn-4.5.0.4.ebuild | 64 | ||||
-rw-r--r-- | net-im/coturn/coturn-9999.ebuild | 64 | ||||
-rwxr-xr-x | net-im/coturn/files/turnserver.init | 26 | ||||
-rw-r--r-- | net-im/coturn/metadata.xml | 15 |
5 files changed, 170 insertions, 0 deletions
diff --git a/net-im/coturn/Manifest b/net-im/coturn/Manifest new file mode 100644 index 000000000000..0546106ac258 --- /dev/null +++ b/net-im/coturn/Manifest @@ -0,0 +1 @@ +DIST coturn-4.5.0.4.tar.gz 381015 SHA256 582c5816b115b403f980f3c38edb12b74d3b2500b7cde190cfb292ae5c056c36 SHA512 1d267b715b08853a5434d0a10cffd49e035624353e6733ff7349c549ef3f69240c2488097d81e33f7a551e02d72a26f1f430aefb9cbacda511a2ae6f883cd414 WHIRLPOOL 7ff9b31c3a1a0e2fbc7ae0580df00476e803160fd7f92f3a02ab611c6f940a39334ea5efccb576b348f87c87ff690087af3c9304560caf8215fb14bef9a45f8f diff --git a/net-im/coturn/coturn-4.5.0.4.ebuild b/net-im/coturn/coturn-4.5.0.4.ebuild new file mode 100644 index 000000000000..49329554e95d --- /dev/null +++ b/net-im/coturn/coturn-4.5.0.4.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." +} 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." +} diff --git a/net-im/coturn/files/turnserver.init b/net-im/coturn/files/turnserver.init new file mode 100755 index 000000000000..de01a69d5ee8 --- /dev/null +++ b/net-im/coturn/files/turnserver.init @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + + +depend() { + need net + use dns + after sshd +} + + +start() { + ebegin "Starting turnserver" + checkpath -q -d -m 0755 -o turnserver:turnserver /var/run/turnserver + start-stop-daemon --start --user turnserver --exec /usr/bin/turnserver -- -o \ + --pidfile /var/run/turnserver/turnserver.pid >/dev/null + eend $? +} + +stop() { + ebegin "Stopping turnserver" + start-stop-daemon --stop --quiet --pidfile /var/run/turnserver/turnserver.pid + eend $? +} diff --git a/net-im/coturn/metadata.xml b/net-im/coturn/metadata.xml new file mode 100644 index 000000000000..2baddb2216a4 --- /dev/null +++ b/net-im/coturn/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>nativemad@gentoo.org</email> + <name>Andreas Schuerch</name> + </maintainer> + <upstream> + <remote-id type="github">coturn/coturn</remote-id> + </upstream> + <use> + <flag name="mongodb">Enable support for the mongodb database</flag> + <flag name="redis">Enable support for the redis database</flag> + </use> +</pkgmetadata> |