/[gentoo-x86]/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.3-r1.ebuild
Gentoo

Contents of /net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sun Aug 10 20:43:34 2014 UTC (5 years, 9 months ago) by slyfox
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +3 -3 lines
QA: drop trailing '.' from DESCRIPTION

(Portage version: 2.2.11_p9/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.3-r1.ebuild,v 1.8 2011/02/26 21:49:22 signals Exp $
4
5 inherit eutils versionator autotools
6
7 FAX_SPOOL_DIR="/var/spool/fax"
8
9 MY_PV1="$(get_version_component_range 1-4)"
10 MY_PV2="$(get_version_component_range 5)"
11 MY_PV3="$(get_version_component_range 6)"
12 MY_P="${PN}_${MY_PV1}.svn.${MY_PV2}"
13
14 DESCRIPTION="capi4hylafax adds a faxcapi modem to the hylafax enviroment"
15 SRC_URI="mirror://debian/pool/main/c/capi4hylafax/${MY_P}.orig.tar.gz
16 mirror://debian/pool/main/c/capi4hylafax/${MY_P}-${MY_PV3}.diff.gz"
17 HOMEPAGE="http://packages.qa.debian.org/c/capi4hylafax.html"
18
19 S="${WORKDIR}/${PN}-svn"
20
21 IUSE="unicode"
22
23 SLOT="0"
24 LICENSE="GPL-2"
25 KEYWORDS="amd64 ppc x86"
26
27 DEPEND="net-dialup/capi4k-utils
28 media-libs/tiff
29 virtual/jpeg
30 sys-libs/zlib"
31
32 RDEPEND="${DEPEND}
33 dev-util/dialog"
34
35 src_unpack() {
36 unpack ${A}
37 cd "${S}"
38
39 # apply debian patches + update configs
40 epatch "${WORKDIR}/${MY_P}-${MY_PV3}.diff"
41
42 # apply bugfix patch (see bug #145982)
43 epatch "${FILESDIR}/${P}-recvdev.diff"
44
45 eautoreconf
46
47 # fix location of fax spool
48 for i in config.faxCAPI Readme_src src/defaults.h.in debian/*.1; do
49 [ -f "${i}" ] && sed -i -e "s:/var/spool/hylafax:${FAX_SPOOL_DIR}:g" "${i}"
50 done
51
52 # fix location of fax config
53 sed -i -e "s:/etc/hylafax:${FAX_SPOOL_DIR}/etc:g" setupconffile
54
55 # fix name and location of logfile
56 sed -i -e "s:/var/spool/fax/log/capi4hylafax:/var/log/${PN}.log:" config.faxCAPI
57 sed -i -e "s:/tmp/capifax.log:/var/log/${PN}.log:" src/defaults.h.in config.faxCAPI
58
59 # patch man pages
60 sed -i -e "s:/usr/share/doc/capi4hylafax/:/usr/share/doc/${PF}/html/:g" \
61 -e "s:c2send:c2faxsend:g" -e "s:c2recv:c2faxrecv:g" \
62 -e "s:CAPI4HYLAFAXCONFIG \"1\":C2FAXADDMODEM \"8\":g" \
63 -e "s:capi4hylafaxconfig:c2faxaddmodem:g" debian/*.1
64 cp -f debian/capi4hylafaxconfig.1 debian/c2faxaddmodem.8
65
66 # if specified, convert all relevant files from latin1 to UTF-8
67 if use unicode; then
68 for i in config.faxCAPI; do
69 einfo "Converting ${i} to UTF-8"
70 iconv -f latin1 -t utf8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~"
71 done
72 fi
73 }
74
75 src_compile() {
76 econf --with-hylafax-spooldir="${FAX_SPOOL_DIR}" || die "econf failed"
77 emake || die "emake failed"
78 }
79
80 src_install() {
81 keepdir "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
82 fowners uucp:uucp "${FAX_SPOOL_DIR}" "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
83 fperms 0700 "${FAX_SPOOL_DIR}"
84
85 make DESTDIR="${D}" install || die "make install failed"
86
87 # install setup script
88 newsbin setupconffile c2faxaddmodem
89
90 # install sample config
91 insinto "${FAX_SPOOL_DIR}/etc"
92 newins config.faxCAPI config.faxCAPI.default
93
94 # install docs
95 dodoc AUTHORS ChangeLog Readme_src
96 newdoc debian/changelog ChangeLog.debian
97 dohtml README.html LIESMICH.html
98
99 # install man pages
100 doman debian/c2fax*.[18]
101
102 # install examples
103 insinto /usr/share/doc/${PF}/examples
104 doins sample_faxrcvd faxrcvd config.faxCAPI fritz_pic.tif GenerateFileMail.pl
105 newins sample_AVMC4_config.faxCAPI config.faxCAPI_AVMC4
106 newins debian/faxsend sample_faxsend
107
108 # finally install init-script + config
109 newinitd "${FILESDIR}/${PN}.initd" ${PN}
110 newconfd "${FILESDIR}/${PN}.confd" ${PN}
111 }
112
113 pkg_postinst() {
114 einfo "To use capi4hylafax:"
115 einfo "Make sure that your isdn/capi devices are owned by"
116 einfo "the \"uucp\" user (see udev or devfsd config)."
117 einfo "Modify ${FAX_SPOOL_DIR}/etc/config.faxCAPI"
118 einfo "to suit your system."
119
120 if [ -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI" ]; then
121 einfo
122 einfo "If you're upgrading from a previous version"
123 einfo "please check for new or changed options."
124 einfo "A sample default config is installed as:"
125 einfo "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default"
126 else
127 # install default config
128 cp -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default" \
129 "${FAX_SPOOL_DIR}/etc/config.faxCAPI"
130 fi
131
132 einfo
133 einfo "You should also check special options in:"
134 einfo "/etc/conf.d/${PN}"
135 einfo
136 einfo "If you want to use capi4hylafax together with"
137 einfo "hylafax, then please emerge net-misc/hylafax"
138 einfo
139 einfo "Then append the following line to your hylafax"
140 einfo "config file (${FAX_SPOOL_DIR}/etc/config):"
141 einfo "SendFaxCmd: /usr/bin/c2faxsend"
142 }

  ViewVC Help
Powered by ViewVC 1.1.20