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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat Jun 13 09:37:05 2015 UTC (4 years, 6 months ago) by mrueg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Remove old.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key )

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/hylafaxplus/hylafaxplus-5.5.1-r1.ebuild,v 1.5 2014/08/10 20:44:19 slyfox 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="amd64 x86"
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_compile() {
113 emake -j1 || die "emake failed"
114 }
115
116 src_install() {
117 dodir /usr/{bin,sbin} /usr/$(get_libdir)/fax /usr/share/man
118 dodir /var/spool /var/spool/recvq
119 fowners uucp:uucp /var/spool/fax
120 fperms 0600 /var/spool/fax
121 dodir /usr/share/doc/${P}/samples
122
123 emake \
124 BIN=${D}/usr/bin \
125 SBIN=${D}/usr/sbin \
126 LIBDIR=${D}/usr/$(get_libdir) \
127 LIB=${D}/usr/$(get_libdir) \
128 LIBEXEC=${D}/usr/sbin \
129 LIBDATA=${D}/usr/$(get_libdir)/fax \
130 DIR_LOCALE=${D}/usr/share/locale \
131 MAN=${D}/usr/share/man \
132 SPOOL=${D}/var/spool/fax \
133 HTMLDIR=${D}/usr/share/doc/${P}/html \
134 install DESTDIR="${D}" || die "make install failed"
135
136 keepdir /var/spool/fax/{archive,client,etc,pollq,recvq,tmp}
137 keepdir /var/spool/fax/{status,sendq,log,info,doneq,docq,dev}
138
139 dosed "s:hostname:hostname -f:g" /var/spool/fax/bin/{faxrcvd,pollrcvd} \
140 || die "dosed hostname failed"
141
142 generate_files # in this case, it only generates the env.d entry
143
144 einfo "Adding env.d entry for ${PN}"
145 doenvd 99${P}
146
147 einfo "Adding init.d and conf.d entries for ${PN}"
148 newconfd "${FILESDIR}"/${PN}-conf ${PN}
149 newinitd "${FILESDIR}"/${PN}-init ${PN}
150
151 use pam && pamd_mimic_system ${MY_PN} auth account session
152
153 dodoc CONTRIBUTORS README TODO
154 docinto samples
155 }
156
157 pkg_postinst() {
158 elog
159 elog "The faxonly USE flag has been removed; since ${PN} does not"
160 elog "require mgetty, and certain fax files conflict, you must build"
161 elog "mgetty without fax support if you wish to use them both. You"
162 elog "may want to add both to package.use so any future updates are"
163 elog "correctly built:"
164 elog
165 elog " net-dialup/mgetty -fax"
166 elog " net-misc/hylafax [-mgetty|mgetty]"
167 elog
168 elog "See the docs and man pages for detailed configuration info."
169 elog
170 elog "Now run faxsetup and (if necessary) faxaddmodem."
171 elog
172 }
173
174 generate_files() {
175 cat <<-EOF > 99${P}
176 PATH="/var/spool/fax/bin"
177 CONFIG_PROTECT="/var/spool/fax/etc /usr/$(get_libdir)/fax"
178 EOF
179 }

  ViewVC Help
Powered by ViewVC 1.1.20