1 |
commit: e003f96c094d230eaf7dc69ebdc72e1ae74ea040 |
2 |
Author: Andreas Schuerch <nativemad <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 7 15:54:18 2016 +0000 |
4 |
Commit: Andreas Schuerch <nativemad <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 7 15:54:18 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e003f96c |
7 |
|
8 |
net-im/coturn: new ebuild, written by me |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
net-im/coturn/Manifest | 1 + |
13 |
net-im/coturn/coturn-4.5.0.4.ebuild | 64 +++++++++++++++++++++++++++++++++++++ |
14 |
net-im/coturn/coturn-9999.ebuild | 64 +++++++++++++++++++++++++++++++++++++ |
15 |
net-im/coturn/files/turnserver.init | 26 +++++++++++++++ |
16 |
net-im/coturn/metadata.xml | 15 +++++++++ |
17 |
5 files changed, 170 insertions(+) |
18 |
|
19 |
diff --git a/net-im/coturn/Manifest b/net-im/coturn/Manifest |
20 |
new file mode 100644 |
21 |
index 00000000..0546106 |
22 |
--- /dev/null |
23 |
+++ b/net-im/coturn/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST coturn-4.5.0.4.tar.gz 381015 SHA256 582c5816b115b403f980f3c38edb12b74d3b2500b7cde190cfb292ae5c056c36 SHA512 1d267b715b08853a5434d0a10cffd49e035624353e6733ff7349c549ef3f69240c2488097d81e33f7a551e02d72a26f1f430aefb9cbacda511a2ae6f883cd414 WHIRLPOOL 7ff9b31c3a1a0e2fbc7ae0580df00476e803160fd7f92f3a02ab611c6f940a39334ea5efccb576b348f87c87ff690087af3c9304560caf8215fb14bef9a45f8f |
26 |
|
27 |
diff --git a/net-im/coturn/coturn-4.5.0.4.ebuild b/net-im/coturn/coturn-4.5.0.4.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000..4932955 |
30 |
--- /dev/null |
31 |
+++ b/net-im/coturn/coturn-4.5.0.4.ebuild |
32 |
@@ -0,0 +1,64 @@ |
33 |
+# Copyright 1999-2016 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+# $Id$ |
36 |
+ |
37 |
+EAPI=6 |
38 |
+inherit eutils user |
39 |
+DESCRIPTION="coturn TURN server project" |
40 |
+HOMEPAGE="https://github.com/${PN}/${PN}" |
41 |
+ |
42 |
+if [ ${PV} = 9999 ]; then |
43 |
+ KEYWORDS="" |
44 |
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" |
45 |
+ inherit git-r3 |
46 |
+ DEPEND="dev-vcs/git" |
47 |
+# S="${WORKDIR}/${PN}-master" |
48 |
+else |
49 |
+ KEYWORDS="~x86 ~amd64" |
50 |
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
51 |
+fi |
52 |
+ |
53 |
+LICENSE="BSD" |
54 |
+SLOT="0" |
55 |
+IUSE="mongodb mysql postgres redis sqlite" |
56 |
+RDEPEND="dev-libs/libevent[ssl] |
57 |
+ dev-libs/openssl:* |
58 |
+ mongodb? ( dev-libs/mongo-c-driver ) |
59 |
+ mysql? ( virtual/mysql ) |
60 |
+ postgres? ( dev-db/postgresql:* ) |
61 |
+ redis? ( dev-libs/hiredis ) |
62 |
+ sqlite? ( dev-db/sqlite )" |
63 |
+DEPEND="${RDEPEND}" |
64 |
+ |
65 |
+src_configure() { |
66 |
+ if ! use mongodb; then |
67 |
+ export TURN_NO_MONGO=yes |
68 |
+ fi |
69 |
+ if ! use mysql; then |
70 |
+ export TURN_NO_MYSQL=yes |
71 |
+ fi |
72 |
+ if ! use postgres; then |
73 |
+ export TURN_NO_PQ=yes |
74 |
+ fi |
75 |
+ if ! use redis; then |
76 |
+ export TURN_NO_HIREDIS=yes |
77 |
+ fi |
78 |
+ if ! use sqlite; then |
79 |
+ export TURN_NO_SQLITE=yes |
80 |
+ fi |
81 |
+ |
82 |
+ econf $(use_with sqlite) |
83 |
+} |
84 |
+ |
85 |
+src_install() { |
86 |
+ default |
87 |
+ newinitd "${FILESDIR}/turnserver.init" turnserver |
88 |
+} |
89 |
+ |
90 |
+pkg_postinst() { |
91 |
+ enewgroup turnserver |
92 |
+ enewuser turnserver -1 -1 -1 turnserver |
93 |
+ elog "Be aware that the default path for logfiles in coturn is /var/tmp!" |
94 |
+ elog "You should copy /etc/turnserver.conf.default to" |
95 |
+ elog "/etc/turnserver.conf and change not only the log option." |
96 |
+} |
97 |
|
98 |
diff --git a/net-im/coturn/coturn-9999.ebuild b/net-im/coturn/coturn-9999.ebuild |
99 |
new file mode 100644 |
100 |
index 00000000..4932955 |
101 |
--- /dev/null |
102 |
+++ b/net-im/coturn/coturn-9999.ebuild |
103 |
@@ -0,0 +1,64 @@ |
104 |
+# Copyright 1999-2016 Gentoo Foundation |
105 |
+# Distributed under the terms of the GNU General Public License v2 |
106 |
+# $Id$ |
107 |
+ |
108 |
+EAPI=6 |
109 |
+inherit eutils user |
110 |
+DESCRIPTION="coturn TURN server project" |
111 |
+HOMEPAGE="https://github.com/${PN}/${PN}" |
112 |
+ |
113 |
+if [ ${PV} = 9999 ]; then |
114 |
+ KEYWORDS="" |
115 |
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" |
116 |
+ inherit git-r3 |
117 |
+ DEPEND="dev-vcs/git" |
118 |
+# S="${WORKDIR}/${PN}-master" |
119 |
+else |
120 |
+ KEYWORDS="~x86 ~amd64" |
121 |
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
122 |
+fi |
123 |
+ |
124 |
+LICENSE="BSD" |
125 |
+SLOT="0" |
126 |
+IUSE="mongodb mysql postgres redis sqlite" |
127 |
+RDEPEND="dev-libs/libevent[ssl] |
128 |
+ dev-libs/openssl:* |
129 |
+ mongodb? ( dev-libs/mongo-c-driver ) |
130 |
+ mysql? ( virtual/mysql ) |
131 |
+ postgres? ( dev-db/postgresql:* ) |
132 |
+ redis? ( dev-libs/hiredis ) |
133 |
+ sqlite? ( dev-db/sqlite )" |
134 |
+DEPEND="${RDEPEND}" |
135 |
+ |
136 |
+src_configure() { |
137 |
+ if ! use mongodb; then |
138 |
+ export TURN_NO_MONGO=yes |
139 |
+ fi |
140 |
+ if ! use mysql; then |
141 |
+ export TURN_NO_MYSQL=yes |
142 |
+ fi |
143 |
+ if ! use postgres; then |
144 |
+ export TURN_NO_PQ=yes |
145 |
+ fi |
146 |
+ if ! use redis; then |
147 |
+ export TURN_NO_HIREDIS=yes |
148 |
+ fi |
149 |
+ if ! use sqlite; then |
150 |
+ export TURN_NO_SQLITE=yes |
151 |
+ fi |
152 |
+ |
153 |
+ econf $(use_with sqlite) |
154 |
+} |
155 |
+ |
156 |
+src_install() { |
157 |
+ default |
158 |
+ newinitd "${FILESDIR}/turnserver.init" turnserver |
159 |
+} |
160 |
+ |
161 |
+pkg_postinst() { |
162 |
+ enewgroup turnserver |
163 |
+ enewuser turnserver -1 -1 -1 turnserver |
164 |
+ elog "Be aware that the default path for logfiles in coturn is /var/tmp!" |
165 |
+ elog "You should copy /etc/turnserver.conf.default to" |
166 |
+ elog "/etc/turnserver.conf and change not only the log option." |
167 |
+} |
168 |
|
169 |
diff --git a/net-im/coturn/files/turnserver.init b/net-im/coturn/files/turnserver.init |
170 |
new file mode 100755 |
171 |
index 00000000..de01a69 |
172 |
--- /dev/null |
173 |
+++ b/net-im/coturn/files/turnserver.init |
174 |
@@ -0,0 +1,26 @@ |
175 |
+#!/sbin/openrc-run |
176 |
+# Copyright 1999-2013 Gentoo Foundation |
177 |
+# Distributed under the terms of the GNU General Public License v2 |
178 |
+# $Id$ |
179 |
+ |
180 |
+ |
181 |
+depend() { |
182 |
+ need net |
183 |
+ use dns |
184 |
+ after sshd |
185 |
+} |
186 |
+ |
187 |
+ |
188 |
+start() { |
189 |
+ ebegin "Starting turnserver" |
190 |
+ checkpath -q -d -m 0755 -o turnserver:turnserver /var/run/turnserver |
191 |
+ start-stop-daemon --start --user turnserver --exec /usr/bin/turnserver -- -o \ |
192 |
+ --pidfile /var/run/turnserver/turnserver.pid >/dev/null |
193 |
+ eend $? |
194 |
+} |
195 |
+ |
196 |
+stop() { |
197 |
+ ebegin "Stopping turnserver" |
198 |
+ start-stop-daemon --stop --quiet --pidfile /var/run/turnserver/turnserver.pid |
199 |
+ eend $? |
200 |
+} |
201 |
|
202 |
diff --git a/net-im/coturn/metadata.xml b/net-im/coturn/metadata.xml |
203 |
new file mode 100644 |
204 |
index 00000000..2baddb2 |
205 |
--- /dev/null |
206 |
+++ b/net-im/coturn/metadata.xml |
207 |
@@ -0,0 +1,15 @@ |
208 |
+<?xml version="1.0" encoding="UTF-8"?> |
209 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
210 |
+<pkgmetadata> |
211 |
+ <maintainer type="person"> |
212 |
+ <email>nativemad@g.o</email> |
213 |
+ <name>Andreas Schuerch</name> |
214 |
+ </maintainer> |
215 |
+ <upstream> |
216 |
+ <remote-id type="github">coturn/coturn</remote-id> |
217 |
+ </upstream> |
218 |
+ <use> |
219 |
+ <flag name="mongodb">Enable support for the mongodb database</flag> |
220 |
+ <flag name="redis">Enable support for the redis database</flag> |
221 |
+ </use> |
222 |
+</pkgmetadata> |