/[gentoo-x86]/net-misc/hylafaxplus/hylafaxplus-5.5.1.ebuild
Gentoo

Contents of /net-misc/hylafaxplus/hylafaxplus-5.5.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Sep 27 12:56:58 2013 UTC (4 years, 11 months ago) by pinkbyte
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Drop old

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x1F357D42)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/hylafaxplus/hylafaxplus-5.5.1.ebuild,v 1.2 2013/03/10 01:42:10 ottxor Exp $
4
5 EAPI="2"
6
7 inherit eutils multilib pam toolchain-funcs
8
9 MY_PN=${PN/plus/}
10 MY_P="${MY_PN}-${PV}"
11
12 DESCRIPTION="Enterprise client-server fax package for class 1 and 2 fax modems."
13 HOMEPAGE="http://hylafax.sourceforge.net"
14 SRC_URI="mirror://sourceforge/hylafax/${MY_P}.tar.gz"
15
16 SLOT="0"
17 LICENSE="hylafaxplus"
18 KEYWORDS=""
19
20 IUSE="jbig pam mgetty html ldap"
21
22 DEPEND=">=sys-libs/zlib-1.1.4
23 !net-misc/hylafax
24 app-text/ghostscript-gpl
25 virtual/mta
26 media-libs/tiff[jbig?]
27 virtual/jpeg
28 jbig? ( media-libs/jbigkit )
29 virtual/awk
30 ldap? ( net-nds/openldap )
31 pam? ( virtual/pam )
32 mgetty? ( net-dialup/mgetty[-fax] )"
33
34 RDEPEND="${DEPEND}
35 net-mail/metamail
36 !net-dialup/sendpage"
37
38 S=${WORKDIR}/${MY_P}
39
40 export CONFIG_PROTECT="${CONFIG_PROTECT} /var/spool/fax/etc /usr/lib/fax"
41
42 src_prepare() {
43 epatch "${FILESDIR}/ldconfig-patch"
44 # force it not to strip binaries
45 for dir in etc util faxalter faxcover faxd faxmail faxrm faxstat \
46 hfaxd sendfax sendpage ; do
47 sed -i -e "s:-idb:-idb \"nostrip\" -idb:g" \
48 "${dir}"/Makefile.in || die "sed failed"
49 done
50
51 sed -i -e "s|-fpic|-fPIC|g" \
52 configure || die
53 }
54
55 src_configure() {
56 local my_conf="
57 --with-DIR_BIN=/usr/bin
58 --with-DIR_SBIN=/usr/sbin
59 --with-DIR_LIB=/usr/$(get_libdir)
60 --with-DIR_LIBEXEC=/usr/sbin
61 --with-DIR_LIBDATA=/usr/$(get_libdir)/fax
62 --with-DIR_LOCALE=/usr/share/locale
63 --with-DIR_LOCKS=/var/lock
64 --with-DIR_MAN=/usr/share/man
65 --with-DIR_SPOOL=/var/spool/fax
66 --with-DIR_HTML=/usr/share/doc/${P}/html
67 --with-DIR_CGI="${WORKDIR}"
68 --with-PATH_DPSRIP=/var/spool/fax/bin/ps2fax
69 --with-PATH_IMPRIP=\"\"
70 --with-SYSVINIT=no
71 --with-REGEX=yes
72 --with-LIBTIFF=\"-ltiff -ljpeg -lz\"
73 --with-OPTIMIZER=\"${CFLAGS}\"
74 --with-DSO=auto"
75
76 if use html; then
77 my_conf="${my_conf} --with-HTML=yes"
78 else
79 my_conf="${my_conf} --with-HTML=no"
80 fi
81
82 if use mgetty; then
83 my_conf="${my_conf} \
84 --with-PATH_GETTY=/sbin/mgetty \
85 --with-PATH_EGETTY=/sbin/mgetty \
86 --with-PATH_VGETTY=/usr/sbin/vgetty"
87 else
88 # GETTY defaults to /sbin/agetty
89 my_conf="${my_conf} \
90 --with-PATH_EGETTY=/bin/false \
91 --with-PATH_VGETTY=/bin/false"
92 fi
93
94 if [ -h /etc/localtime ]; then
95 local continent=$(readlink /etc/localtime | cut -d / -f 5)
96 if [ "${continent}" == "Europe" ]; then
97 my_conf="${my_conf} --with-PAGESIZE=A4"
98 fi
99 fi
100
101 #--enable-pam isn't valid
102 use pam || my_conf="${my_conf} $(use_enable pam)"
103 use ldap || my_conf="${my_conf} $(use_enable ldap)"
104 use jbig || my_conf="${my_conf} $(use_enable jbig)"
105
106 myconf="CC=$(tc-getCC) CXX=$(tc-getCXX) ${my_conf}"
107
108 # eval required for quoting in ${my_conf} to work properly, better way?
109 eval ./configure --nointeractive ${my_conf} || die "./configure failed"
110 }
111
112 src_install() {
113 dodir /usr/{bin,sbin} /usr/$(get_libdir)/fax /usr/share/man
114 dodir /var/spool /var/spool/recvq
115 fowners uucp:uucp /var/spool/fax
116 fperms 0600 /var/spool/fax
117 dodir /usr/share/doc/${P}/samples
118
119 emake \
120 BIN=${D}/usr/bin \
121 SBIN=${D}/usr/sbin \
122 LIBDIR=${D}/usr/$(get_libdir) \
123 LIB=${D}/usr/$(get_libdir) \
124 LIBEXEC=${D}/usr/sbin \
125 LIBDATA=${D}/usr/$(get_libdir)/fax \
126 DIR_LOCALE=${D}/usr/share/locale \
127 MAN=${D}/usr/share/man \
128 SPOOL=${D}/var/spool/fax \
129 HTMLDIR=${D}/usr/share/doc/${P}/html \
130 install DESTDIR="${D}" || die "make install failed"
131
132 keepdir /var/spool/fax/{archive,client,etc,pollq,recvq,tmp}
133 keepdir /var/spool/fax/{status,sendq,log,info,doneq,docq,dev}
134
135 dosed "s:hostname:hostname -f:g" /var/spool/fax/bin/{faxrcvd,pollrcvd} \
136 || die "dosed hostname failed"
137
138 generate_files # in this case, it only generates the env.d entry
139
140 einfo "Adding env.d entry for ${PN}"
141 doenvd 99${P}
142
143 einfo "Adding init.d and conf.d entries for ${PN}"
144 newconfd "${FILESDIR}"/${PN}-conf ${PN}
145 newinitd "${FILESDIR}"/${PN}-init ${PN}
146
147 use pam && pamd_mimic_system ${MY_PN} auth account session
148
149 dodoc CONTRIBUTORS README TODO
150 docinto samples
151 }
152
153 pkg_postinst() {
154 elog
155 elog "The faxonly USE flag has been removed; since ${PN} does not"
156 elog "require mgetty, and certain fax files conflict, you must build"
157 elog "mgetty without fax support if you wish to use them both. You"
158 elog "may want to add both to package.use so any future updates are"
159 elog "correctly built:"
160 elog
161 elog " net-dialup/mgetty -fax"
162 elog " net-misc/hylafax [-mgetty|mgetty]"
163 elog
164 elog "There are additional files included in the documentation dir."
165 elog
166 elog "Note 1: hylafax.cron is provided for vixie-cron users and"
167 elog "should be placed in /etc/cron.d. Use as-is or adapt it to"
168 elog "your system config."
169 elog
170 elog "Note 2: if you need to use hylafax with iptables, then you"
171 elog "need to specify the port and use ip_conntrack_ftp as shown"
172 elog "in the included example modules file."
173 elog
174 elog "See the docs and man pages for detailed configuration info."
175 elog
176 elog "Now run faxsetup and (if necessary) faxaddmodem."
177 elog
178 }
179
180 generate_files() {
181 cat <<-EOF > 99${P}
182 PATH="/var/spool/fax/bin"
183 CONFIG_PROTECT="/var/spool/fax/etc /usr/$(get_libdir)/fax"
184 EOF
185 }

  ViewVC Help
Powered by ViewVC 1.1.20