Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-mobilephone/kannel/, app-mobilephone/kannel/files/
Date: Tue, 26 Apr 2016 22:27:16
Message-Id: 1461709592.9084aa7d239f12d44cbd547e8d9622af5f920a01.wizardedit@gentoo
1 commit: 9084aa7d239f12d44cbd547e8d9622af5f920a01
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 26 20:25:21 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 26 22:26:32 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9084aa7d
7
8 app-mobilephone/kannel: use #!/sbin/openrc-run instead of #!/sbin/runscript
9
10 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573846
11
12 Package-Manager: portage-2.2.26
13
14 .../kannel/files/kannel-bearerbox.initd | 4 +-
15 app-mobilephone/kannel/files/kannel-initd | 2 +-
16 app-mobilephone/kannel/files/kannel-smsbox.initd | 4 +-
17 app-mobilephone/kannel/files/kannel-wapbox.initd | 4 +-
18 app-mobilephone/kannel/kannel-1.4.3-r2.ebuild | 120 ++++++++++++++++++++
19 app-mobilephone/kannel/kannel-1.5.0-r1.ebuild | 122 +++++++++++++++++++++
20 6 files changed, 249 insertions(+), 7 deletions(-)
21
22 diff --git a/app-mobilephone/kannel/files/kannel-bearerbox.initd b/app-mobilephone/kannel/files/kannel-bearerbox.initd
23 index 7034cb6..14259d5 100644
24 --- a/app-mobilephone/kannel/files/kannel-bearerbox.initd
25 +++ b/app-mobilephone/kannel/files/kannel-bearerbox.initd
26 @@ -1,5 +1,5 @@
27 -#!/sbin/runscript
28 -# Copyright 1999-2009 Gentoo Foundation
29 +#!/sbin/openrc-run
30 +# Copyright 1999-2016 Gentoo Foundation
31 # Distributed under the terms of the GNU General Public License v2
32 # $Id$
33
34
35 diff --git a/app-mobilephone/kannel/files/kannel-initd b/app-mobilephone/kannel/files/kannel-initd
36 index 25003fd..ddb5c7a 100644
37 --- a/app-mobilephone/kannel/files/kannel-initd
38 +++ b/app-mobilephone/kannel/files/kannel-initd
39 @@ -1,4 +1,4 @@
40 -#!/sbin/runscript
41 +#!/sbin/openrc-run
42
43 depend() {
44 need net
45
46 diff --git a/app-mobilephone/kannel/files/kannel-smsbox.initd b/app-mobilephone/kannel/files/kannel-smsbox.initd
47 index 5baf182..73087e6 100644
48 --- a/app-mobilephone/kannel/files/kannel-smsbox.initd
49 +++ b/app-mobilephone/kannel/files/kannel-smsbox.initd
50 @@ -1,5 +1,5 @@
51 -#!/sbin/runscript
52 -# Copyright 1999-2009 Gentoo Foundation
53 +#!/sbin/openrc-run
54 +# Copyright 1999-2016 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Id$
57
58
59 diff --git a/app-mobilephone/kannel/files/kannel-wapbox.initd b/app-mobilephone/kannel/files/kannel-wapbox.initd
60 index 5baf182..73087e6 100644
61 --- a/app-mobilephone/kannel/files/kannel-wapbox.initd
62 +++ b/app-mobilephone/kannel/files/kannel-wapbox.initd
63 @@ -1,5 +1,5 @@
64 -#!/sbin/runscript
65 -# Copyright 1999-2009 Gentoo Foundation
66 +#!/sbin/openrc-run
67 +# Copyright 1999-2016 Gentoo Foundation
68 # Distributed under the terms of the GNU General Public License v2
69 # $Id$
70
71
72 diff --git a/app-mobilephone/kannel/kannel-1.4.3-r2.ebuild b/app-mobilephone/kannel/kannel-1.4.3-r2.ebuild
73 new file mode 100644
74 index 0000000..df695fd
75 --- /dev/null
76 +++ b/app-mobilephone/kannel/kannel-1.4.3-r2.ebuild
77 @@ -0,0 +1,120 @@
78 +# Copyright 1999-2016 Gentoo Foundation
79 +# Distributed under the terms of the GNU General Public License v2
80 +# $Id$
81 +
82 +EAPI="2"
83 +WANT_AUTOMAKE=none
84 +
85 +inherit eutils autotools flag-o-matic ssl-cert user
86 +
87 +DESCRIPTION="Powerful SMS and WAP gateway"
88 +HOMEPAGE="http://www.kannel.org/"
89 +SRC_URI="http://www.kannel.org/download/${PV}/gateway-${PV}.tar.gz"
90 +
91 +LICENSE="Apache-1.1"
92 +SLOT="0"
93 +KEYWORDS="~amd64 x86"
94 +IUSE="ssl mysql sqlite postgres pcre doc debug pam"
95 +
96 +RESTRICT="test" # some tests fail with "address already in use"
97 +
98 +RDEPEND="sys-libs/e2fsprogs-libs
99 + dev-libs/libxml2
100 + dev-lang/perl
101 + sys-libs/zlib
102 + ssl? ( dev-libs/openssl )
103 + mysql? ( virtual/mysql )
104 + sqlite? ( dev-db/sqlite:3 )
105 + postgres? ( dev-db/postgresql[server] )
106 + pcre? ( dev-libs/libpcre )
107 + pam? ( virtual/pam )"
108 +DEPEND="${RDEPEND}
109 + >=sys-devel/bison-2.2
110 + doc? ( media-gfx/transfig
111 + app-text/jadetex
112 + app-text/docbook-dsssl-stylesheets
113 + app-text/docbook-sgml-dtd:3.1 )"
114 +
115 +S="${WORKDIR}/gateway-${PV}"
116 +
117 +pkg_setup() {
118 + enewgroup kannel
119 + enewuser kannel -1 -1 /var/log/kannel kannel
120 +}
121 +
122 +src_prepare() {
123 + epatch "${FILESDIR}/${P}-custom-wap-ports.patch"
124 + epatch "${FILESDIR}/${P}-autotools.patch"
125 + epatch "${FILESDIR}/${P}-external-libuuid.patch"
126 +
127 + #by default, use current directory for logging
128 + sed -i -e 's:/tmp/::' doc/examples/kannel.conf
129 +
130 + eautoconf
131 +}
132 +
133 +src_configure() {
134 + append-flags -fno-strict-aliasing # some code breaks strict aliasing
135 + econf --docdir=/usr/share/doc/${PF} \
136 + --enable-localtime \
137 + --disable-start-stop-daemon \
138 + --without-sqlite2 \
139 + $(use_enable pam) \
140 + $(use_enable debug debug) \
141 + $(use_enable pcre) \
142 + $(use_enable doc docs) \
143 + $(use_enable ssl) \
144 + $(use_with mysql) \
145 + $(use_with sqlite sqlite3) \
146 + $(use_with postgres pgsql) \
147 + || die "econf failed"
148 +}
149 +
150 +# phase disabled by RESTRICT
151 +# src_test() {
152 +# emake check || die "emake check failed"
153 +# }
154 +
155 +src_install() {
156 + emake DESTDIR="${D}" install || die "emake install failed"
157 +
158 + if use doc; then
159 + emake DESTDIR="${D}" install-docs || die "emake install-docs failed"
160 + fi
161 + dodoc README
162 +
163 + diropts -g kannel -m0750
164 + dodir /etc/kannel
165 + insinto /etc/kannel
166 + newins doc/examples/kannel.conf kannel.conf.sample
167 +
168 + local f
169 + for f in bearerbox smsbox wapbox; do
170 + newinitd "${FILESDIR}/kannel-$f.initd" kannel-$f
171 + done
172 +
173 + diropts -g kannel -m0770
174 + keepdir /var/log/kannel /var/run/kannel
175 +}
176 +
177 +pkg_postinst() {
178 + if use ssl; then
179 + elog "SSL certificate can be created by running"
180 + elog " emerge --config =${CATEGORY}/${PF}"
181 + fi
182 +}
183 +
184 +pkg_config() {
185 + if use ssl; then
186 + if install_cert /etc/ssl/kannel; then
187 + chown kannel "${ROOT}"etc/ssl/kannel.{pem,key}
188 + einfo "For using this certificate, you have to add following line to your kannel.conf:"
189 + einfo ' ssl-client-certkey-file = "/etc/ssl/kannel.pem"'
190 + einfo ' ssl-server-cert-file = "/etc/ssl/kannel.crt"'
191 + einfo ' ssl-server-key-file = "/etc/ssl/kannel.key"'
192 + fi
193 + else
194 + eerror "This phase exists only for creating kannel SSL certificate"
195 + eerror "and ssl USE flag is disabled for this package!"
196 + fi
197 +}
198
199 diff --git a/app-mobilephone/kannel/kannel-1.5.0-r1.ebuild b/app-mobilephone/kannel/kannel-1.5.0-r1.ebuild
200 new file mode 100644
201 index 0000000..ee84be2
202 --- /dev/null
203 +++ b/app-mobilephone/kannel/kannel-1.5.0-r1.ebuild
204 @@ -0,0 +1,122 @@
205 +# Copyright 1999-2016 Gentoo Foundation
206 +# Distributed under the terms of the GNU General Public License v2
207 +# $Id$
208 +
209 +EAPI=5
210 +WANT_AUTOMAKE=none
211 +
212 +inherit eutils autotools flag-o-matic ssl-cert user
213 +
214 +DESCRIPTION="Powerful SMS and WAP gateway"
215 +HOMEPAGE="http://www.kannel.org/"
216 +SRC_URI="http://www.kannel.org/download/${PV}/gateway-${PV}.tar.gz"
217 +
218 +LICENSE="Apache-1.1"
219 +SLOT="0"
220 +KEYWORDS="~amd64 ~x86"
221 +IUSE="debug doc mysql pam pcre postgres sqlite ssl"
222 +
223 +RESTRICT="test" # some tests fail with "address already in use"
224 +
225 +RDEPEND="sys-libs/e2fsprogs-libs
226 + dev-libs/libxml2
227 + dev-lang/perl
228 + sys-libs/zlib
229 + ssl? ( dev-libs/openssl )
230 + mysql? ( virtual/mysql )
231 + sqlite? ( dev-db/sqlite:3 )
232 + postgres? ( dev-db/postgresql[server] )
233 + pcre? ( dev-libs/libpcre )
234 + pam? ( virtual/pam )
235 +"
236 +DEPEND="${RDEPEND}
237 + >=sys-devel/bison-2.2
238 + doc? ( media-gfx/transfig
239 + app-text/jadetex
240 + app-text/docbook-dsssl-stylesheets
241 + app-text/docbook-sgml-dtd:3.1 )
242 +"
243 +
244 +S="${WORKDIR}/gateway-${PV}"
245 +
246 +pkg_setup() {
247 + enewgroup kannel
248 + enewuser kannel -1 -1 /var/log/kannel kannel
249 +}
250 +
251 +src_prepare() {
252 + epatch "${FILESDIR}/${PN}-1.5.0-custom-wap-ports.patch"
253 + epatch "${FILESDIR}/${PN}-1.4.3-autotools.patch"
254 + epatch "${FILESDIR}/${PN}-1.4.3-external-libuuid.patch"
255 +
256 + #by default, use current directory for logging
257 + sed -i -e 's:/tmp/::' doc/examples/kannel.conf
258 +
259 + eautoconf
260 +}
261 +
262 +src_configure() {
263 + append-flags -fno-strict-aliasing # some code breaks strict aliasing
264 + econf --docdir=/usr/share/doc/${PF} \
265 + --enable-localtime \
266 + --disable-start-stop-daemon \
267 + --without-sqlite2 \
268 + $(use_enable pam) \
269 + $(use_enable debug debug) \
270 + $(use_enable pcre) \
271 + $(use_enable doc docs) \
272 + $(use_enable ssl) \
273 + $(use_with mysql) \
274 + $(use_with sqlite sqlite3) \
275 + $(use_with postgres pgsql) \
276 + || die "econf failed"
277 +}
278 +
279 +# phase disabled by RESTRICT
280 +# src_test() {
281 +# emake check || die "emake check failed"
282 +# }
283 +
284 +src_install() {
285 + emake DESTDIR="${D}" install || die "emake install failed"
286 +
287 + if use doc; then
288 + emake -j1 DESTDIR="${D}" install-docs || die "emake install-docs failed"
289 + fi
290 + dodoc README
291 +
292 + diropts -g kannel -m0750
293 + dodir /etc/kannel
294 + insinto /etc/kannel
295 + newins doc/examples/kannel.conf kannel.conf.sample
296 +
297 + local f
298 + for f in bearerbox smsbox wapbox; do
299 + newinitd "${FILESDIR}/kannel-$f.initd" kannel-$f
300 + done
301 +
302 + diropts -g kannel -m0770
303 + keepdir /var/log/kannel /var/run/kannel
304 +}
305 +
306 +pkg_postinst() {
307 + if use ssl; then
308 + elog "SSL certificate can be created by running"
309 + elog " emerge --config =${CATEGORY}/${PF}"
310 + fi
311 +}
312 +
313 +pkg_config() {
314 + if use ssl; then
315 + if install_cert /etc/ssl/kannel; then
316 + chown kannel "${ROOT}"etc/ssl/kannel.{pem,key}
317 + einfo "For using this certificate, you have to add following line to your kannel.conf:"
318 + einfo ' ssl-client-certkey-file = "/etc/ssl/kannel.pem"'
319 + einfo ' ssl-server-cert-file = "/etc/ssl/kannel.crt"'
320 + einfo ' ssl-server-key-file = "/etc/ssl/kannel.key"'
321 + fi
322 + else
323 + eerror "This phase exists only for creating kannel SSL certificate"
324 + eerror "and ssl USE flag is disabled for this package!"
325 + fi
326 +}