/[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.2 - (show annotations) (download)
Thu Oct 28 10:01:23 2010 UTC (9 years, 2 months ago) by ssuominen
Branch: MAIN
Changes since 1.1: +2 -5 lines
drop redudant WANT_AUTO latest lines

(Portage version: 2.2.0_alpha1/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20