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/capi4hylafax/, net-misc/capi4hylafax/files/
Date: Wed, 04 May 2016 00:10:40
Message-Id: 1462320517.bde2de06291222b7787b54cb2be936a67bfa063a.wizardedit@gentoo
1 commit: bde2de06291222b7787b54cb2be936a67bfa063a
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 3 23:10:41 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Wed May 4 00:08:37 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bde2de06
7
8 net-misc/capi4hylafax: 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 .../capi4hylafax-01.03.00.99.300.20-r1.ebuild | 155 +++++++++++++++++++++
15 .../capi4hylafax-01.03.00.99.300.3-r2.ebuild | 142 +++++++++++++++++++
16 .../capi4hylafax-01.03.00.99.300.9-r1.ebuild | 133 ++++++++++++++++++
17 net-misc/capi4hylafax/files/capi4hylafax.initd | 4 +-
18 4 files changed, 432 insertions(+), 2 deletions(-)
19
20 diff --git a/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.20-r1.ebuild b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.20-r1.ebuild
21 new file mode 100644
22 index 0000000..d4f049f
23 --- /dev/null
24 +++ b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.20-r1.ebuild
25 @@ -0,0 +1,155 @@
26 +# Copyright 1999-2016 Gentoo Foundation
27 +# Distributed under the terms of the GNU General Public License v2
28 +# $Id$
29 +
30 +EAPI=6
31 +
32 +inherit eutils versionator autotools
33 +
34 +FAX_SPOOL_DIR="${ROOT}/var/spool/fax"
35 +
36 +MY_PV1="$(get_version_component_range 1-4)"
37 +MY_PV2="$(get_version_component_range 5)"
38 +MY_PV3="$(get_version_component_range 6)"
39 +MY_P="${PN}_${MY_PV1}.svn.${MY_PV2}"
40 +
41 +DESCRIPTION="capi4hylafax adds a faxcapi modem to the hylafax enviroment"
42 +SRC_URI="mirror://debian/pool/main/c/capi4hylafax/${MY_P}.orig.tar.gz
43 + mirror://debian/pool/main/c/capi4hylafax/${MY_P}-${MY_PV3}.debian.tar.gz"
44 +HOMEPAGE="http://packages.qa.debian.org/c/capi4hylafax.html"
45 +
46 +S="${WORKDIR}/${PN}-svn"
47 +
48 +SLOT="0"
49 +LICENSE="GPL-2"
50 +KEYWORDS="~amd64 ~ppc ~x86"
51 +
52 +DEPEND="net-dialup/capi4k-utils
53 + app-shells/bash:0
54 + media-libs/tiff:0
55 + virtual/jpeg:0
56 + sys-libs/zlib"
57 +
58 +RDEPEND="${DEPEND}
59 + dev-util/dialog"
60 +
61 +DOCS=( AUTHORS ChangeLog Readme_src )
62 +HTML_DOCS=( README.html LIESMICH.html )
63 +
64 +src_prepare() {
65 + EPATCH_SOURCE="${WORKDIR}/debian/patches" EPATCH_SUFFIX="patch" \
66 + EPATCH_FORCE="yes" epatch
67 +
68 + eapply_user
69 +
70 + eautoreconf
71 +
72 + mv ../debian . || die
73 +
74 + # fix location of fax spool
75 + sed -e "s:/var/spool/hylafax:${FAX_SPOOL_DIR}:g" \
76 + -i config.faxCAPI \
77 + -i Readme_src \
78 + -i src/defaults.h.in \
79 + -i debian/*.1 || die
80 +
81 + # fix location of fax config
82 + sed -i -e "s:/etc/hylafax:${FAX_SPOOL_DIR}/etc:g" setupconffile || die
83 +
84 + # fix name and location of logfile
85 + sed -e "s:/var/spool/fax/log/capi4hylafax:/var/log/${PN}.log:" \
86 + -i config.faxCAPI || die
87 +
88 + sed -e "s:/tmp/capifax.log:/var/log/${PN}.log:" \
89 + -i src/defaults.h.in config.faxCAPI || die
90 +
91 + # patch man pages
92 + sed -e "s:/usr/share/doc/capi4hylafax/:/usr/share/doc/${PF}/html/:g" \
93 + -e "s:c2send:c2faxsend:g" \
94 + -e "s:c2recv:c2faxrecv:g" \
95 + -e "s:CAPI4HYLAFAXCONFIG \"1\":C2FAXADDMODEM \"8\":g" \
96 + -e "s:capi4hylafaxconfig:c2faxaddmodem:g" \
97 + -i debian/*.1 || die
98 +
99 + cp -f debian/capi4hylafaxconfig.1 debian/c2faxaddmodem.8 || die
100 +}
101 +
102 +src_configure() {
103 + econf --with-hylafax-spooldir="${FAX_SPOOL_DIR}"
104 +}
105 +
106 +src_install() {
107 + keepdir "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
108 + fowners uucp:uucp "${FAX_SPOOL_DIR}" "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
109 + fperms 0700 "${FAX_SPOOL_DIR}"
110 +
111 + default
112 +
113 + # install setup script
114 + newsbin setupconffile c2faxaddmodem
115 +
116 + # install sample config
117 + insinto "${FAX_SPOOL_DIR}/etc"
118 + newins config.faxCAPI config.faxCAPI.default
119 +
120 + # install docs
121 + newdoc debian/changelog ChangeLog.debian
122 +
123 + # install man pages
124 + doman debian/c2fax*.[18]
125 +
126 + # install examples
127 + insinto /usr/share/doc/${PF}/examples
128 + doins sample_faxrcvd config.faxCAPI fritz_pic.tif GenerateFileMail.pl
129 + newins sample_AVMC4_config.faxCAPI config.faxCAPI_AVMC4
130 + newins debian/faxsend sample_faxsend
131 +
132 + # finally install init-script + config
133 + newinitd "${FILESDIR}/${PN}.initd" ${PN}
134 + newconfd "${FILESDIR}/${PN}.confd" ${PN}
135 +}
136 +
137 +pkg_postinst() {
138 + einfo
139 + elog "To use capi4hylafax:"
140 + elog "Make sure that your isdn/capi devices are owned by"
141 + elog "the \"uucp\" user (see udev or devfsd config)."
142 + elog "Modify ${FAX_SPOOL_DIR}/etc/config.faxCAPI"
143 + elog "to suit your system."
144 +
145 + if [ -n "${REPLACING_VERSIONS}" ]; then
146 + elog
147 + elog "If you're upgrading from a previous version"
148 + elog "please check for new or changed options."
149 + elog "A sample default config is installed as:"
150 + elog "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default"
151 + else
152 + elog
153 + elog "Please run package config to install a default configuration."
154 + fi
155 +
156 + elog
157 + elog "You should also check special options in:"
158 + elog "/etc/conf.d/${PN}"
159 + elog
160 + elog "The following optional dependency is also available:"
161 + optfeature "hylafax integration" net-misc/hylafax
162 + elog
163 + elog "Then append the following line to your hylafax"
164 + elog "config file (${FAX_SPOOL_DIR}/etc/config):"
165 + elog "SendFaxCmd: /usr/bin/c2faxsend"
166 + einfo
167 +}
168 +
169 +pkg_config() {
170 + local config_file="${FAX_SPOOL_DIR}/etc/config.faxCAPI"
171 + if [ -e "${config_file}" ]; then
172 + eerror "The configuration file already exists. Please either update"
173 + eerror "or remove this file and re-run package configuration."
174 + eerror "Configuration file location: ${config_file}"
175 + else
176 + elog "Installing template configuration file to ${config_file}"
177 + cp -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default" \
178 + "${config_file}" || die
179 + fi
180 +}
181
182 diff --git a/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.3-r2.ebuild b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.3-r2.ebuild
183 new file mode 100644
184 index 0000000..f60dcb3
185 --- /dev/null
186 +++ b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.3-r2.ebuild
187 @@ -0,0 +1,142 @@
188 +# Copyright 1999-2016 Gentoo Foundation
189 +# Distributed under the terms of the GNU General Public License v2
190 +# $Id$
191 +
192 +inherit eutils versionator autotools
193 +
194 +FAX_SPOOL_DIR="/var/spool/fax"
195 +
196 +MY_PV1="$(get_version_component_range 1-4)"
197 +MY_PV2="$(get_version_component_range 5)"
198 +MY_PV3="$(get_version_component_range 6)"
199 +MY_P="${PN}_${MY_PV1}.svn.${MY_PV2}"
200 +
201 +DESCRIPTION="capi4hylafax adds a faxcapi modem to the hylafax enviroment"
202 +SRC_URI="mirror://debian/pool/main/c/capi4hylafax/${MY_P}.orig.tar.gz
203 + mirror://debian/pool/main/c/capi4hylafax/${MY_P}-${MY_PV3}.diff.gz"
204 +HOMEPAGE="http://packages.qa.debian.org/c/capi4hylafax.html"
205 +
206 +S="${WORKDIR}/${PN}-svn"
207 +
208 +IUSE="unicode"
209 +
210 +SLOT="0"
211 +LICENSE="GPL-2"
212 +KEYWORDS="amd64 ppc x86"
213 +
214 +DEPEND="net-dialup/capi4k-utils
215 + media-libs/tiff
216 + virtual/jpeg
217 + sys-libs/zlib"
218 +
219 +RDEPEND="${DEPEND}
220 + dev-util/dialog"
221 +
222 +src_unpack() {
223 + unpack ${A}
224 + cd "${S}"
225 +
226 + # apply debian patches + update configs
227 + epatch "${WORKDIR}/${MY_P}-${MY_PV3}.diff"
228 +
229 + # apply bugfix patch (see bug #145982)
230 + epatch "${FILESDIR}/${P}-recvdev.diff"
231 +
232 + eautoreconf
233 +
234 + # fix location of fax spool
235 + for i in config.faxCAPI Readme_src src/defaults.h.in debian/*.1; do
236 + [ -f "${i}" ] && sed -i -e "s:/var/spool/hylafax:${FAX_SPOOL_DIR}:g" "${i}"
237 + done
238 +
239 + # fix location of fax config
240 + sed -i -e "s:/etc/hylafax:${FAX_SPOOL_DIR}/etc:g" setupconffile
241 +
242 + # fix name and location of logfile
243 + sed -i -e "s:/var/spool/fax/log/capi4hylafax:/var/log/${PN}.log:" config.faxCAPI
244 + sed -i -e "s:/tmp/capifax.log:/var/log/${PN}.log:" src/defaults.h.in config.faxCAPI
245 +
246 + # patch man pages
247 + sed -i -e "s:/usr/share/doc/capi4hylafax/:/usr/share/doc/${PF}/html/:g" \
248 + -e "s:c2send:c2faxsend:g" -e "s:c2recv:c2faxrecv:g" \
249 + -e "s:CAPI4HYLAFAXCONFIG \"1\":C2FAXADDMODEM \"8\":g" \
250 + -e "s:capi4hylafaxconfig:c2faxaddmodem:g" debian/*.1
251 + cp -f debian/capi4hylafaxconfig.1 debian/c2faxaddmodem.8
252 +
253 + # if specified, convert all relevant files from latin1 to UTF-8
254 + if use unicode; then
255 + for i in config.faxCAPI; do
256 + einfo "Converting ${i} to UTF-8"
257 + iconv -f latin1 -t utf8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~"
258 + done
259 + fi
260 +}
261 +
262 +src_compile() {
263 + econf --with-hylafax-spooldir="${FAX_SPOOL_DIR}" || die "econf failed"
264 + emake || die "emake failed"
265 +}
266 +
267 +src_install() {
268 + keepdir "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
269 + fowners uucp:uucp "${FAX_SPOOL_DIR}" "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
270 + fperms 0700 "${FAX_SPOOL_DIR}"
271 +
272 + make DESTDIR="${D}" install || die "make install failed"
273 +
274 + # install setup script
275 + newsbin setupconffile c2faxaddmodem
276 +
277 + # install sample config
278 + insinto "${FAX_SPOOL_DIR}/etc"
279 + newins config.faxCAPI config.faxCAPI.default
280 +
281 + # install docs
282 + dodoc AUTHORS ChangeLog Readme_src
283 + newdoc debian/changelog ChangeLog.debian
284 + dohtml README.html LIESMICH.html
285 +
286 + # install man pages
287 + doman debian/c2fax*.[18]
288 +
289 + # install examples
290 + insinto /usr/share/doc/${PF}/examples
291 + doins sample_faxrcvd faxrcvd config.faxCAPI fritz_pic.tif GenerateFileMail.pl
292 + newins sample_AVMC4_config.faxCAPI config.faxCAPI_AVMC4
293 + newins debian/faxsend sample_faxsend
294 +
295 + # finally install init-script + config
296 + newinitd "${FILESDIR}/${PN}.initd" ${PN}
297 + newconfd "${FILESDIR}/${PN}.confd" ${PN}
298 +}
299 +
300 +pkg_postinst() {
301 + einfo "To use capi4hylafax:"
302 + einfo "Make sure that your isdn/capi devices are owned by"
303 + einfo "the \"uucp\" user (see udev or devfsd config)."
304 + einfo "Modify ${FAX_SPOOL_DIR}/etc/config.faxCAPI"
305 + einfo "to suit your system."
306 +
307 + if [ -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI" ]; then
308 + einfo
309 + einfo "If you're upgrading from a previous version"
310 + einfo "please check for new or changed options."
311 + einfo "A sample default config is installed as:"
312 + einfo "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default"
313 + else
314 + # install default config
315 + cp -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default" \
316 + "${FAX_SPOOL_DIR}/etc/config.faxCAPI"
317 + fi
318 +
319 + einfo
320 + einfo "You should also check special options in:"
321 + einfo "/etc/conf.d/${PN}"
322 + einfo
323 + einfo "If you want to use capi4hylafax together with"
324 + einfo "hylafax, then please emerge net-misc/hylafax"
325 + einfo
326 + einfo "Then append the following line to your hylafax"
327 + einfo "config file (${FAX_SPOOL_DIR}/etc/config):"
328 + einfo "SendFaxCmd: /usr/bin/c2faxsend"
329 +}
330
331 diff --git a/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.9-r1.ebuild b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.9-r1.ebuild
332 new file mode 100644
333 index 0000000..10c3a2f
334 --- /dev/null
335 +++ b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.9-r1.ebuild
336 @@ -0,0 +1,133 @@
337 +# Copyright 1999-2016 Gentoo Foundation
338 +# Distributed under the terms of the GNU General Public License v2
339 +# $Id$
340 +
341 +inherit eutils versionator autotools
342 +
343 +FAX_SPOOL_DIR="/var/spool/fax"
344 +
345 +MY_PV1="$(get_version_component_range 1-4)"
346 +MY_PV2="$(get_version_component_range 5)"
347 +MY_PV3="$(get_version_component_range 6)"
348 +MY_P="${PN}_${MY_PV1}.svn.${MY_PV2}"
349 +
350 +DESCRIPTION="capi4hylafax adds a faxcapi modem to the hylafax enviroment"
351 +SRC_URI="mirror://debian/pool/main/c/capi4hylafax/${MY_P}.orig.tar.gz
352 + mirror://debian/pool/main/c/capi4hylafax/${MY_P}-${MY_PV3}.diff.gz"
353 +HOMEPAGE="http://packages.qa.debian.org/c/capi4hylafax.html"
354 +
355 +S="${WORKDIR}/${PN}-svn"
356 +
357 +IUSE=""
358 +
359 +SLOT="0"
360 +LICENSE="GPL-2"
361 +KEYWORDS="~amd64 ~ppc ~x86"
362 +
363 +DEPEND="net-dialup/capi4k-utils
364 + app-shells/bash
365 + media-libs/tiff
366 + virtual/jpeg
367 + sys-libs/zlib"
368 +
369 +RDEPEND="${DEPEND}
370 + dev-util/dialog"
371 +
372 +src_unpack() {
373 + unpack ${A}
374 + cd "${S}"
375 +
376 + # apply debian patches + update configs
377 + epatch "${WORKDIR}/${MY_P}-${MY_PV3}.diff"
378 +
379 + # update autotools
380 + eautoreconf
381 +
382 + # fix location of fax spool
383 + for i in config.faxCAPI Readme_src src/defaults.h.in debian/*.1; do
384 + [ -f "${i}" ] && sed -i -e "s:/var/spool/hylafax:${FAX_SPOOL_DIR}:g" "${i}"
385 + done
386 +
387 + # fix location of fax config
388 + sed -i -e "s:/etc/hylafax:${FAX_SPOOL_DIR}/etc:g" setupconffile
389 +
390 + # fix name and location of logfile
391 + sed -i -e "s:/var/spool/fax/log/capi4hylafax:/var/log/${PN}.log:" config.faxCAPI
392 + sed -i -e "s:/tmp/capifax.log:/var/log/${PN}.log:" src/defaults.h.in config.faxCAPI
393 +
394 + # patch man pages
395 + sed -i -e "s:/usr/share/doc/capi4hylafax/:/usr/share/doc/${PF}/html/:g" \
396 + -e "s:c2send:c2faxsend:g" -e "s:c2recv:c2faxrecv:g" \
397 + -e "s:CAPI4HYLAFAXCONFIG \"1\":C2FAXADDMODEM \"8\":g" \
398 + -e "s:capi4hylafaxconfig:c2faxaddmodem:g" debian/*.1
399 + cp -f debian/capi4hylafaxconfig.1 debian/c2faxaddmodem.8
400 +}
401 +
402 +src_compile() {
403 + econf --with-hylafax-spooldir="${FAX_SPOOL_DIR}" || die "econf failed"
404 + emake || die "emake failed"
405 +}
406 +
407 +src_install() {
408 + keepdir "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
409 + fowners uucp:uucp "${FAX_SPOOL_DIR}" "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
410 + fperms 0700 "${FAX_SPOOL_DIR}"
411 +
412 + make DESTDIR="${D}" install || die "make install failed"
413 +
414 + # install setup script
415 + newsbin setupconffile c2faxaddmodem
416 +
417 + # install sample config
418 + insinto "${FAX_SPOOL_DIR}/etc"
419 + newins config.faxCAPI config.faxCAPI.default
420 +
421 + # install docs
422 + dodoc AUTHORS ChangeLog Readme_src
423 + newdoc debian/changelog ChangeLog.debian
424 + dohtml README.html LIESMICH.html
425 +
426 + # install man pages
427 + doman debian/c2fax*.[18]
428 +
429 + # install examples
430 + insinto /usr/share/doc/${PF}/examples
431 + doins sample_faxrcvd config.faxCAPI fritz_pic.tif GenerateFileMail.pl
432 + newins sample_AVMC4_config.faxCAPI config.faxCAPI_AVMC4
433 + newins debian/faxsend sample_faxsend
434 +
435 + # finally install init-script + config
436 + newinitd "${FILESDIR}/${PN}.initd" ${PN}
437 + newconfd "${FILESDIR}/${PN}.confd" ${PN}
438 +}
439 +
440 +pkg_postinst() {
441 + elog "To use capi4hylafax:"
442 + elog "Make sure that your isdn/capi devices are owned by"
443 + elog "the \"uucp\" user (see udev or devfsd config)."
444 + elog "Modify ${FAX_SPOOL_DIR}/etc/config.faxCAPI"
445 + elog "to suit your system."
446 +
447 + if [ -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI" ]; then
448 + elog
449 + elog "If you're upgrading from a previous version"
450 + elog "please check for new or changed options."
451 + elog "A sample default config is installed as:"
452 + elog "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default"
453 + else
454 + # install default config
455 + cp -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default" \
456 + "${FAX_SPOOL_DIR}/etc/config.faxCAPI"
457 + fi
458 +
459 + elog
460 + elog "You should also check special options in:"
461 + elog "/etc/conf.d/${PN}"
462 + elog
463 + elog "If you want to use capi4hylafax together with"
464 + elog "hylafax, then please emerge net-misc/hylafax"
465 + elog
466 + elog "Then append the following line to your hylafax"
467 + elog "config file (${FAX_SPOOL_DIR}/etc/config):"
468 + elog "SendFaxCmd: /usr/bin/c2faxsend"
469 +}
470
471 diff --git a/net-misc/capi4hylafax/files/capi4hylafax.initd b/net-misc/capi4hylafax/files/capi4hylafax.initd
472 index bfba068..e7ad4e8 100644
473 --- a/net-misc/capi4hylafax/files/capi4hylafax.initd
474 +++ b/net-misc/capi4hylafax/files/capi4hylafax.initd
475 @@ -1,5 +1,5 @@
476 -#!/sbin/runscript
477 -# Copyright 1999-2005 Gentoo Foundation
478 +#!/sbin/openrc-run
479 +# Copyright 1999-2016 Gentoo Foundation
480 # Distributed under the terms of the GNU General Public License v2
481 # $Id$