Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/siproxd/files/, net-misc/siproxd/
Date: Wed, 04 May 2016 01:02:42
Message-Id: 1462322900.0f1a5374b9792e20672f222fc38b2cbb8b5ef5f8.wizardedit@gentoo
1 commit: 0f1a5374b9792e20672f222fc38b2cbb8b5ef5f8
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 4 00:48:20 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Wed May 4 00:48:20 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f1a5374
7
8 net-misc/siproxd: use #!/sbin/openrc-run instead of #!/sbin/runscript
9
10 Gentoo-Bug: https://bugs.gentoo.org/573846
11
12 Package-Manager: portage-2.2.26
13
14 net-misc/siproxd/files/siproxd.rc6 | 4 +-
15 net-misc/siproxd/files/siproxd.rc7 | 31 ---------
16 net-misc/siproxd/files/siproxd.rc8 | 4 +-
17 net-misc/siproxd/siproxd-0.8.0-r3.ebuild | 109 ++++++++++++++++++++++++++++++
18 net-misc/siproxd/siproxd-0.8.1-r2.ebuild | 110 +++++++++++++++++++++++++++++++
19 5 files changed, 223 insertions(+), 35 deletions(-)
20
21 diff --git a/net-misc/siproxd/files/siproxd.rc6 b/net-misc/siproxd/files/siproxd.rc6
22 index 9d7fae7..63ffe15 100644
23 --- a/net-misc/siproxd/files/siproxd.rc6
24 +++ b/net-misc/siproxd/files/siproxd.rc6
25 @@ -1,5 +1,5 @@
26 -#!/sbin/runscript
27 -# Copyright 1999-2005 Gentoo Foundation
28 +#!/sbin/openrc-run
29 +# Copyright 1999-2016 Gentoo Foundation
30 # Distributed under the terms of the GNU General Public License v2
31 # $Id$
32
33
34 diff --git a/net-misc/siproxd/files/siproxd.rc7 b/net-misc/siproxd/files/siproxd.rc7
35 deleted file mode 100644
36 index 88ba033..0000000
37 --- a/net-misc/siproxd/files/siproxd.rc7
38 +++ /dev/null
39 @@ -1,31 +0,0 @@
40 -#!/sbin/runscript
41 -# Copyright 1999-2013 Gentoo Foundation
42 -# Distributed under the terms of the GNU General Public License v2
43 -# $Id$
44 -
45 -depend() {
46 - need net
47 -}
48 -
49 -check_config() {
50 - if [[ ! -f /etc/siproxd.conf ]]; then
51 - eerror "Please create /etc/siproxd.conf first!"
52 - return 1
53 - fi
54 - return 0
55 -}
56 -
57 -start() {
58 - check_config || return 1
59 - checkpath -q -d /var/run/siproxd -o siproxd:siproxd
60 - ebegin "Starting siproxd"
61 - start-stop-daemon --start --exec /usr/sbin/siproxd -- \
62 - -p /var/run/siproxd/siproxd.pid -c /etc/siproxd.conf
63 - eend $?
64 -}
65 -
66 -stop() {
67 - ebegin "Stopping siproxd"
68 - start-stop-daemon --stop --pidfile /var/run/siproxd/siproxd.pid
69 - eend $?
70 -}
71
72 diff --git a/net-misc/siproxd/files/siproxd.rc8 b/net-misc/siproxd/files/siproxd.rc8
73 index d85b32f..146fefb 100644
74 --- a/net-misc/siproxd/files/siproxd.rc8
75 +++ b/net-misc/siproxd/files/siproxd.rc8
76 @@ -1,5 +1,5 @@
77 -#!/sbin/runscript
78 -# Copyright 1999-2014 Gentoo Foundation
79 +#!/sbin/openrc-run
80 +# Copyright 1999-2016 Gentoo Foundation
81 # Distributed under the terms of the GNU General Public License v2
82 # $Id$
83
84
85 diff --git a/net-misc/siproxd/siproxd-0.8.0-r3.ebuild b/net-misc/siproxd/siproxd-0.8.0-r3.ebuild
86 new file mode 100644
87 index 0000000..211c605
88 --- /dev/null
89 +++ b/net-misc/siproxd/siproxd-0.8.0-r3.ebuild
90 @@ -0,0 +1,109 @@
91 +# Copyright 1999-2016 Gentoo Foundation
92 +# Distributed under the terms of the GNU General Public License v2
93 +# $Id$
94 +
95 +EAPI="5"
96 +
97 +inherit eutils autotools user
98 +
99 +DESCRIPTION="A proxy/masquerading daemon for the SIP protocol"
100 +HOMEPAGE="http://siproxd.sourceforge.net/"
101 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
102 +
103 +LICENSE="GPL-2"
104 +SLOT="0"
105 +KEYWORDS="amd64 x86"
106 +IUSE="examples doc static"
107 +# TODO: debug can be used but dmalloc is breaking the build
108 +# upstream has been contacted, see bug 2649238 in their bugtracker
109 +
110 +RDEPEND=">=net-libs/libosip-3.0.0
111 + <net-libs/libosip-4.0.0"
112 +# debug? ( dev-libs/dmalloc[threads] )"
113 +DEPEND="${RDEPEND}
114 + >=sys-devel/libtool-2.4
115 + doc? ( app-text/docbook-sgml-utils
116 + app-text/docbook-sgml-dtd:4.2 )"
117 +# docbook-sgml-utils is for building doc
118 +# docbook-sgml-dtd is for the doc dtd even if docbook-sgml-utils depends on it
119 +
120 +pkg_setup() {
121 + enewgroup siproxd
122 + enewuser siproxd -1 -1 /dev/null siproxd
123 +}
124 +
125 +src_prepare() {
126 + default
127 +
128 + # make the daemon run as user 'siproxd' by default
129 + sed -i -e "s:nobody:siproxd:" doc/siproxd.conf.example \
130 + || die "patching doc/siproxd.conf.example failed"
131 + # do not fail when building with external libltdl
132 + sed -i 's/libltdl //' Makefile.am || die "patching Makefile failed"
133 + epatch "${FILESDIR}/${PN}-libtool-2.4.patch"
134 + # do not crash when building with external libltdl, bug 308495
135 + sed -i 's|"../libltdl/ltdl.h"|<ltdl.h>|' src/plugins.h || die "patching plugins.h failed"
136 +
137 + eautoreconf
138 +}
139 +
140 +src_configure() {
141 + # static-libosip2 make it link statically against libosip2
142 + # static build static version of plugins, forced to true
143 + econf \
144 + $(use_enable doc) \
145 + $(use_enable static static-libosip2) \
146 + --enable-static
147 + #$(use debug && use_enable debug dmalloc) \
148 +
149 + # statically linked plugins to libosip2 causes a shared lib linking with
150 + # static lib (gcc seems not to like it : portable issue it says).
151 + # there was also DT_TEXREL issue and stripping of static plugins failed
152 + # so shared lib has to be used for plugins
153 + # upstream has been contacted, see bug 2649351 in their bugtracker
154 + if use static; then
155 + sed -i -r -e \
156 + "s:LIBS =(.*)( \/[^ ]*libosip[^ ]*\.a)( \/[^ ]*libosip[^ ]*\.a)(.*):LIBS_STATIC =\1\2\3\4\nLIBS = \1\4 -losip2 -losipparser2:" \
157 + src/Makefile || die "patching src/Makefile failed"
158 + sed -i -e \
159 + "s:\$(siproxd_LDADD) \$(LIBS):\$(siproxd_LDADD) \$(LIBS_STATIC):" \
160 + src/Makefile || die "patching src/Makefile failed"
161 + fi
162 +}
163 +
164 +src_install() {
165 + einstall
166 +
167 + newinitd "${FILESDIR}"/${PN}.rc6 ${PN}
168 +
169 + dodoc AUTHORS ChangeLog NEWS README RELNOTES TODO \
170 + doc/FAQ doc/FLI4L_HOWTO.txt doc/KNOWN_BUGS
171 +
172 + if use doc; then
173 + dodoc doc/RFC3261_compliance.txt
174 + # auto-generated doc is not auto-installed
175 + # upstream has been contacted, see bug 2649333 in their bugtracker
176 + dohtml -r doc/html/
177 + # pdf is not build all the time
178 + if has_version app-text/docbook-sgml-utils[jadetex]; then
179 + dodoc doc/pdf/*.pdf
180 + fi
181 + fi
182 +
183 + if use examples; then
184 + docinto examples
185 + dodoc doc/sample_*.txt
186 + fi
187 +
188 + # set up siproxd directories
189 + keepdir /var/{lib,run}/${PN}
190 + fowners siproxd:siproxd /var/{lib,run}/${PN}
191 +}
192 +
193 +pkg_postinst() {
194 + if use static; then
195 + elog "static USE flag does not build a _fully_ statically linked binary"
196 + elog "only libosip2 and libosipparser2 are statically linked"
197 + elog "In addition, plugins are dynamically linked with those libs"
198 + fi
199 +}
200
201 diff --git a/net-misc/siproxd/siproxd-0.8.1-r2.ebuild b/net-misc/siproxd/siproxd-0.8.1-r2.ebuild
202 new file mode 100644
203 index 0000000..15e884f
204 --- /dev/null
205 +++ b/net-misc/siproxd/siproxd-0.8.1-r2.ebuild
206 @@ -0,0 +1,110 @@
207 +# Copyright 1999-2016 Gentoo Foundation
208 +# Distributed under the terms of the GNU General Public License v2
209 +# $Id$
210 +
211 +EAPI=5
212 +
213 +inherit eutils autotools user
214 +
215 +DESCRIPTION="A proxy/masquerading daemon for the SIP protocol"
216 +HOMEPAGE="http://siproxd.sourceforge.net/"
217 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
218 +
219 +LICENSE="GPL-2"
220 +SLOT="0"
221 +KEYWORDS="~amd64 ~x86"
222 +IUSE="examples doc static"
223 +# TODO: debug can be used but dmalloc is breaking the build
224 +# upstream has been contacted, see bug 2649238 in their bugtracker
225 +
226 +RDEPEND=">=net-libs/libosip-3.0.0
227 + <net-libs/libosip-4.0.0"
228 +# debug? ( dev-libs/dmalloc[threads] )"
229 +DEPEND="${RDEPEND}
230 + >=sys-devel/libtool-2.4
231 + doc? ( app-text/docbook-sgml-utils
232 + app-text/docbook-sgml-dtd:4.2 )"
233 +# docbook-sgml-utils is for building doc
234 +# docbook-sgml-dtd is for the doc dtd even if docbook-sgml-utils depends on it
235 +
236 +pkg_setup() {
237 + enewgroup siproxd
238 + enewuser siproxd -1 -1 /dev/null siproxd
239 +}
240 +
241 +src_prepare() {
242 + # make the daemon run as user 'siproxd' by default
243 + sed -i -e "s:nobody:siproxd:" doc/siproxd.conf.example \
244 + || die "patching doc/siproxd.conf.example failed"
245 + # do not fail when building with external libltdl
246 + sed -i 's/libltdl //' Makefile.am || die "patching Makefile failed"
247 + epatch "${FILESDIR}/${PN}-libtool-2.4.patch"
248 + # do not crash when building with external libltdl, bug 308495
249 + sed -i 's|"../libltdl/ltdl.h"|<ltdl.h>|' src/plugins.h || die "patching plugins.h failed"
250 +
251 + epatch "${FILESDIR}/${PN}-0.8.1-amd64_static_build.patch" #380835
252 +
253 + eautoreconf
254 +}
255 +
256 +src_configure() {
257 + # static-libosip2 make it link statically against libosip2
258 + # static build static version of plugins, forced to true
259 + econf \
260 + $(use_enable doc) \
261 + $(use_enable static static-libosip2) \
262 + $(use_enable !static shared) \
263 + --enable-static
264 + #$(use debug && use_enable debug dmalloc) \
265 +
266 + # statically linked plugins to libosip2 causes a shared lib linking with
267 + # static lib (gcc seems not to like it : portable issue it says).
268 + # there was also DT_TEXREL issue and stripping of static plugins failed
269 + # so shared lib has to be used for plugins
270 + # upstream has been contacted, see bug 2649351 in their bugtracker
271 + if use static; then
272 + sed -i -r -e \
273 + "s:LIBS =(.*)( \/[^ ]*libosip[^ ]*\.a)( \/[^ ]*libosip[^ ]*\.a)(.*):LIBS_STATIC =\1\2\3\4\nLIBS = \1\4 -losip2 -losipparser2:" \
274 + src/Makefile || die "patching src/Makefile failed"
275 + sed -i -e \
276 + "s:\$(siproxd_LDADD) \$(LIBS):\$(siproxd_LDADD) \$(LIBS_STATIC):" \
277 + src/Makefile || die "patching src/Makefile failed"
278 + fi
279 +}
280 +
281 +src_install() {
282 + default
283 +
284 + newinitd "${FILESDIR}"/${PN}.rc8 ${PN}
285 +
286 + dodoc AUTHORS ChangeLog NEWS README RELNOTES TODO \
287 + doc/FAQ doc/FLI4L_HOWTO.txt doc/KNOWN_BUGS
288 +
289 + if use doc; then
290 + dodoc doc/RFC3261_compliance.txt
291 + # auto-generated doc is not auto-installed
292 + # upstream has been contacted, see bug 2649333 in their bugtracker
293 + dohtml -r doc/html/
294 + # pdf is not build all the time
295 + if has_version 'app-text/docbook-sgml-utils[jadetex]' ; then
296 + dodoc doc/pdf/*.pdf
297 + fi
298 + fi
299 +
300 + if use examples; then
301 + docinto examples
302 + dodoc doc/sample_*.txt
303 + fi
304 +
305 + # set up siproxd directories
306 + keepdir /var/lib/${PN}
307 + fowners siproxd:siproxd /var/lib/${PN}
308 +}
309 +
310 +pkg_postinst() {
311 + if use static; then
312 + elog "static USE flag does not build a _fully_ statically linked binary"
313 + elog "only libosip2 and libosipparser2 are statically linked"
314 + elog "In addition, plugins are dynamically linked with those libs"
315 + fi
316 +}