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

Contents of /net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Nov 18 01:50:26 2007 UTC (12 years, 2 months ago) by sbriesen
Branch: MAIN
version bump, some cleanups.
(Portage version: 2.1.3.19)

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

  ViewVC Help
Powered by ViewVC 1.1.20