summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schuerch <nativemad@gentoo.org>2017-05-30 16:39:08 +0200
committerAndreas Schuerch <nativemad@gentoo.org>2017-05-30 16:39:08 +0200
commit6062ad6ab9032d245a846cb81e188575dae4b876 (patch)
treea732af77a3c7bddfd47204361f3d3ba5f3fe1155 /net-im/coturn
parentsys-process/procps: Revbump to add elogind support (bug #599504). (diff)
downloadgentoo-6062ad6ab9032d245a846cb81e188575dae4b876.tar.gz
gentoo-6062ad6ab9032d245a846cb81e188575dae4b876.tar.bz2
gentoo-6062ad6ab9032d245a846cb81e188575dae4b876.zip
net-im/coturn: bump to 4.5.0.6 and use of systemd tmpfiles.d
Package-Manager: Portage-2.3.5, Repoman-2.3.1
Diffstat (limited to 'net-im/coturn')
-rw-r--r--net-im/coturn/Manifest1
-rw-r--r--net-im/coturn/coturn-4.5.0.4-r1.ebuild4
-rw-r--r--net-im/coturn/coturn-4.5.0.6.ebuild71
-rw-r--r--net-im/coturn/coturn-9999.ebuild4
-rw-r--r--net-im/coturn/files/coturn.conf1
-rw-r--r--net-im/coturn/files/coturn.service1
6 files changed, 79 insertions, 3 deletions
diff --git a/net-im/coturn/Manifest b/net-im/coturn/Manifest
index 0546106ac258..59f230fb6836 100644
--- a/net-im/coturn/Manifest
+++ b/net-im/coturn/Manifest
@@ -1 +1,2 @@
DIST coturn-4.5.0.4.tar.gz 381015 SHA256 582c5816b115b403f980f3c38edb12b74d3b2500b7cde190cfb292ae5c056c36 SHA512 1d267b715b08853a5434d0a10cffd49e035624353e6733ff7349c549ef3f69240c2488097d81e33f7a551e02d72a26f1f430aefb9cbacda511a2ae6f883cd414 WHIRLPOOL 7ff9b31c3a1a0e2fbc7ae0580df00476e803160fd7f92f3a02ab611c6f940a39334ea5efccb576b348f87c87ff690087af3c9304560caf8215fb14bef9a45f8f
+DIST coturn-4.5.0.6.tar.gz 394071 SHA256 5ad976e142daf392351f86623b217be7ca91322105e0500c379a9dcdbbc466e8 SHA512 4ad7d482af675033d050258e2af04b813561414d4ba926cfd336c6548200dbf1a90f9511983b8cad20713c7edff2a424c9d6b11d401717794e3d1af6b7ed9208 WHIRLPOOL 517353ce5cd90aca4f3991d87cdb0835e97eecf0c6529e93360b9506194f4c0cb1f3cc47e207510bbf3e4f465ab088303cdcd235cccbb11555940a8fa60f0478
diff --git a/net-im/coturn/coturn-4.5.0.4-r1.ebuild b/net-im/coturn/coturn-4.5.0.4-r1.ebuild
index 2ffd86380e4e..02115af32237 100644
--- a/net-im/coturn/coturn-4.5.0.4-r1.ebuild
+++ b/net-im/coturn/coturn-4.5.0.4-r1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit eutils user systemd
+inherit eutils user systemd tmpfiles
DESCRIPTION="coturn TURN server project"
HOMEPAGE="https://github.com/${PN}/${PN}"
@@ -59,9 +59,11 @@ src_install() {
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"
diff --git a/net-im/coturn/coturn-4.5.0.6.ebuild b/net-im/coturn/coturn-4.5.0.6.ebuild
new file mode 100644
index 000000000000..02115af32237
--- /dev/null
+++ b/net-im/coturn/coturn-4.5.0.6.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 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]
+ 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() {
+ 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."
+}
diff --git a/net-im/coturn/coturn-9999.ebuild b/net-im/coturn/coturn-9999.ebuild
index 2ffd86380e4e..02115af32237 100644
--- a/net-im/coturn/coturn-9999.ebuild
+++ b/net-im/coturn/coturn-9999.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit eutils user systemd
+inherit eutils user systemd tmpfiles
DESCRIPTION="coturn TURN server project"
HOMEPAGE="https://github.com/${PN}/${PN}"
@@ -59,9 +59,11 @@ src_install() {
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"
diff --git a/net-im/coturn/files/coturn.conf b/net-im/coturn/files/coturn.conf
new file mode 100644
index 000000000000..0097a3b49a69
--- /dev/null
+++ b/net-im/coturn/files/coturn.conf
@@ -0,0 +1 @@
+d /run/turnserver - turnserver turnserver - -
diff --git a/net-im/coturn/files/coturn.service b/net-im/coturn/files/coturn.service
index 81465f589d8d..e072759e61b0 100644
--- a/net-im/coturn/files/coturn.service
+++ b/net-im/coturn/files/coturn.service
@@ -8,7 +8,6 @@ User=turnserver
Group=turnserver
PermissionsStartOnly=true
ExecStartPre=/bin/bash -c "[ -f /var/log/turnserver.log ] || touch /var/log/turnserver.log && chown turnserver:turnserver /var/log/turnserver.log && chmod 660 /var/log/turnserver.log"
-ExecStartPre=/bin/bash -c "[ -d /var/run/turnserver ] || mkdir /var/run/turnserver && chown turnserver:turnserver /var/run/turnserver"
ExecStart=/usr/bin/turnserver --pidfile /var/run/turnserver/turnserver.pid
Restart=always
RestartSec=30s