]>
Commit | Line | Data |
---|---|---|
4922f335 TO |
1 | Summary: HylaFAX(tm) is a sophisticated enterprise strength fax package |
2 | Name: hylafax | |
3 | Version: 4.1 | |
4 | Release: 0.1 | |
5 | License: distributable | |
6 | Group: Applications/Communications | |
7 | Group(de): Applikationen/Kommunikation | |
8 | Group(pl): Aplikacje/Komunikacja | |
9 | URL: http://www.hylafax.org/ | |
10 | Source0: ftp://ftp.hylafax.org/source/%{name}-%{version}.tar.gz | |
11 | Source1: %{name}-cron_entries.tar.gz | |
12 | Source2: %{name}-defaults.tar.gz | |
13 | Source3: %{name}-dialrules_extras.tar.gz | |
14 | Source6: %{name}-logrotate | |
15 | Source7: %{name}-init | |
16 | Source8: %{name}-hyla.conf | |
17 | Patch1: %{name}-dso.patch | |
18 | Patch2: %{name}-dso.chris.patch | |
19 | Patch4: %{name}-rings-cid-passing.patch | |
20 | Patch5: %{name}-mdk.patch | |
21 | Patch6: %{name}-topmargin.patch | |
22 | Patch7: %{name}-priority.patch | |
23 | BuildRequires: libjpeg-devel | |
24 | BuildRequires: libtiff-devel | |
25 | BuildRequires: zlib-devel | |
26 | Requires: ghostscript | |
27 | Requires: libtiff | |
28 | Requires: %{name}-libs = %{version} | |
29 | Requires: libtiff-progs | |
30 | Conflicts: mgetty-sendfax | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %define faxspool /var/spool/fax | |
34 | ||
35 | %description | |
36 | HylaFAX(tm) is a sophisticated enterprise-strength fax package for | |
37 | class 1 and 2 fax modems on unix systems. It provides spooling | |
38 | services and numerous supporting fax management tools. The fax clients | |
39 | may reside on machines different from the server and client | |
40 | implementations exist for a number of platforms including windows. | |
41 | ||
42 | You need this package if you are going to install hylafax-client | |
43 | and/or hylafax server. | |
44 | ||
45 | %package server | |
46 | Summary: The files for the HylaFAX(tm) fax server. | |
47 | Group: Applications/Communications | |
48 | Group(de): Applikationen/Kommunikation | |
49 | Group(pl): Aplikacje/Komunikacja | |
50 | Requires: %{name} | |
51 | ||
52 | %description server | |
53 | HylaFAX(tm) is a sophisticated enterprise-strength fax package for | |
54 | class 1 and 2 fax modems on unix systems. It provides spooling | |
55 | services and numerous supporting fax management tools. The fax clients | |
56 | may reside on machines different from the server and client | |
57 | implementations exist for a number of platforms including windows. | |
58 | ||
59 | This is the server portion of HylaFAX. | |
60 | ||
61 | %package client | |
62 | Summary: The files for the HylaFAX(tm) fax client. | |
63 | Group: Applications/Communications | |
64 | Group(de): Applikationen/Kommunikation | |
65 | Group(pl): Aplikacje/Komunikacja | |
66 | Requires: %{name} | |
67 | ||
68 | %description client | |
69 | HylaFAX(tm) is a sophisticated enterprise-strength fax package for | |
70 | class 1 and 2 fax modems on unix systems. It provides spooling | |
71 | services and numerous supporting fax management tools. The fax clients | |
72 | may reside on machines different from the server and client | |
73 | implementations exist for a number of platforms including windows. | |
74 | ||
75 | This is the client portion of HylaFAX. | |
76 | ||
77 | %package libs | |
78 | Summary: Hylafax libraries | |
79 | Group: Applications/Communications | |
80 | Group(de): Applikationen/Kommunikation | |
81 | Group(pl): Aplikacje/Komunikacja | |
82 | ||
83 | %description libs | |
84 | HylaFAX(tm) is a sophisticated enterprise-strength fax package for | |
85 | class 1 and 2 fax modems on unix systems. It provides spooling | |
86 | services and numerous supporting fax management tools. The fax clients | |
87 | may reside on machines different from the server and client | |
88 | implementations exist for a number of platforms including windows. | |
89 | ||
90 | This is the shared librairies of HylaFAX. | |
91 | ||
92 | %package devel | |
93 | Summary: Hylafax libraries | |
94 | Group: Applications/Communications | |
95 | Group(de): Applikationen/Kommunikation | |
96 | Group(pl): Aplikacje/Komunikacja | |
97 | Requires: %{name}-libs = %{version} | |
98 | ||
99 | %description devel | |
100 | HylaFAX(tm) is a sophisticated enterprise-strength fax package for | |
101 | class 1 and 2 fax modems on unix systems. It provides spooling | |
102 | services and numerous supporting fax management tools. The fax clients | |
103 | may reside on machines different from the server and client | |
104 | implementations exist for a number of platforms including windows. | |
105 | ||
106 | This is the shared librairies of HylaFAX. | |
107 | ||
108 | %prep | |
109 | %setup -q -n %{name}-%{version} -a 1 -a 2 -a 3 -q | |
110 | %patch1 -p1 | |
111 | %patch2 -p1 | |
112 | %patch4 | |
113 | %patch5 -p1 | |
114 | %patch6 -p1 | |
115 | %patch7 -p1 | |
116 | ||
117 | %build | |
118 | ./configure \ | |
119 | --with-DIR_BIN=%{_bindir} \ | |
120 | --with-DIR_SBIN=%{_sbindir} \ | |
121 | --with-DIR_LIBEXEC=%{_sbindir} \ | |
122 | --with-DIR_LIBDATA=%{_datadir}/fax \ | |
123 | --with-DIR_MAN=%{_mandir} \ | |
124 | --with-DIR_SPOOL=%{faxspool} \ | |
125 | --with-PATH_GSRIP=%{_bindir}/gs \ | |
126 | --with-AFM=no \ | |
127 | --with-DSO=LINUX \ | |
128 | --with-DSOSUF=so \ | |
129 | --with-PATH_VGETTY=/sbin/vgetty \ | |
130 | --with-PATH_EGETTY=/sbin/egetty \ | |
131 | --with-PATH_GETTY=/sbin/mgetty \ | |
132 | --with-HTML=no \ | |
133 | --with-PAGESIZE=A4 \ | |
134 | --with-SYSVINIT=/etc/rc.d/init.d/hylafax \ | |
135 | --with-INTERACTIVE=no \ | |
136 | --with-SCRIPT_SH=/bin/sh | |
137 | ||
138 | %{__make} OPTIMIZER="$RPM_OPT_FLAGS" | |
139 | ||
140 | %install | |
141 | rm -rf $RPM_BUILD_ROOT | |
142 | ||
143 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,cron.hourly,cron.daily,rc.d/init.d} | |
144 | install -d $RPM_BUILD_ROOT%{_bindir} | |
145 | install -d $RPM_BUILD_ROOT%{_sbindir} | |
146 | install -d $RPM_BUILD_ROOT%{_libdir} | |
147 | install -d $RPM_BUILD_ROOT%{_datadir}/fax | |
148 | install -d $RPM_BUILD_ROOT%{faxspool}/{etc,config/defaults,bin} | |
149 | install -d $RPM_BUILD_ROOT%{_mandir}/{man1,man5,man8} | |
150 | ||
151 | %{__make} install -e \ | |
152 | FAXUSER=`id -u` \ | |
153 | FAXGROUP=`id -g` \ | |
154 | SYSUSER=`id -u` \ | |
155 | SYSGROUP=`id -g` \ | |
156 | BIN=$RPM_BUILD_ROOT%{_bindir} \ | |
157 | SBIN=$RPM_BUILD_ROOT%{_sbindir} \ | |
158 | LIBDATA=$RPM_BUILD_ROOT%{_datadir}/fax \ | |
159 | LIBEXEC=$RPM_BUILD_ROOT%{_sbindir} \ | |
160 | SPOOL=$RPM_BUILD_ROOT%{faxspool} \ | |
161 | MAN=$RPM_BUILD_ROOT%{_mandir} \ | |
162 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
163 | ||
164 | # some hacks | |
165 | perl -pi -e 's!%{_prefix}%{_sysconfdir}/inetd.conf!%{_sysconfdir}/inetd.conf!g' $RPM_BUILD_ROOT%{_sbindir}/faxsetup | |
166 | perl -pi -e 's!%{_libdir}/aliases!%{_sysconfdir}/aliases!g' $RPM_BUILD_ROOT%{_sbindir}/faxsetup | |
167 | ||
168 | ||
169 | # init | |
170 | cat %{SOURCE7} > $RPM_BUILD_ROOT/etc/rc.d/init.d/hylafax | |
171 | chmod 755 $RPM_BUILD_ROOT/etc/rc.d/init.d/hylafax | |
172 | ||
173 | # defaults | |
174 | install defaults/* $RPM_BUILD_ROOT%{faxspool}/config/defaults/ | |
175 | ||
176 | # hyla.conf | |
177 | cat %{SOURCE8} > $RPM_BUILD_ROOT%{_datadir}/fax/hyla.conf | |
178 | ||
179 | # cron entries | |
180 | install -m 755 hylafax_daily.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/hylafax | |
181 | install -m 755 hylafax_hourly.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/hylafax | |
182 | ||
183 | # logrotate | |
184 | cat %{SOURCE6} > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/hylafax | |
185 | ||
186 | # dialrules extras | |
187 | install dialrules_extras/dialrules* $RPM_BUILD_ROOT%{faxspool}%{_sysconfdir} | |
188 | ||
189 | (cd $RPM_BUILD_ROOT%{faxspool}/bin; ln -s ps2fax.gs ps2fax) | |
190 | ||
191 | ||
192 | # The Makefile puts the .so file in /usr/sbin. Move them to /usr/lib | |
193 | mv $RPM_BUILD_ROOT%{_sbindir}/*.so.* $RPM_BUILD_ROOT%{_libdir} | |
194 | mv $RPM_BUILD_ROOT%{_sbindir}/*.so $RPM_BUILD_ROOT%{_libdir} | |
195 | ||
196 | # put execute permission on .so so that RPM doesn't warn | |
197 | chmod +x $RPM_BUILD_ROOT%{_libdir}/lib*.so.* | |
198 | chmod +x $RPM_BUILD_ROOT%{_libdir}/lib*.so | |
199 | ||
200 | # Since now the html doc dir is managed by the doc macro and not installed | |
201 | # by HylaFAX, the CVS stuff need to be deleted | |
202 | rm -rf $(find ./html -type d -name CVS) | |
203 | rm -f ./html/{.cvsignore,Makefile.in} | |
204 | ||
205 | # Some tools (manpage, man2html, unquote) | |
206 | rm -f html/tools/{unquote,man2html} | |
207 | ||
208 | # If Linux, what else...? :-), delete unnecessary files | |
209 | %ifos linux | |
210 | rm -f $RPM_BUILD_ROOT%{_sbindir}/{faxsetup.irix,faxsetup.bsdi} | |
211 | %endif | |
212 | ||
213 | ||
214 | %clean | |
215 | rm -rf $RPM_BUILD_ROOT | |
216 | ||
217 | %post libs -p /sbin/ldconfig | |
218 | %postun libs -p /sbin/ldconfig | |
219 | ||
220 | %preun client | |
221 | %_preun_service hylafax | |
222 | ||
223 | ||
224 | %post client | |
225 | %_post_service hylafax | |
226 | %{_sbindir}/faxsetup -client | |
227 | ||
228 | %post server | |
229 | if [ $1 = 1 ] ; then /sbin/chkconfig --add hylafax; fi | |
230 | ||
231 | %_post_service hylafax | |
232 | ||
233 | # Adding faxgetty entry to %{_sysconfdir}/inittab | |
234 | logger adding FaxGetty entry to %{_sysconfdir}/inittab | |
235 | cat %{_sysconfdir}/inittab | grep -i "faxgetty entry" || \ | |
236 | echo -e "# FaxGetty Entry\n#t0:23:respawn:%{_sbindir}/faxgetty ttyS0" >> %{_sysconfdir}/inittab | |
237 | ||
238 | echo "Please run \"%{_sbindir}/faxsetup -server\" to configure your fax server" | |
239 | ||
240 | ||
241 | %preun server | |
242 | %_preun_service hylafax | |
243 | if [ $1 = 0 ] ; then | |
244 | # Removing faxgetty entries in %{_sysconfdir}/inittab | |
245 | perl -pi -e 's!^.*faxgetty.*$!!g' %{_sysconfdir}/inittab > %{_sysconfdir}/inittab.$$ | |
246 | /sbin/init q | |
247 | fi | |
248 | ||
249 | #%postun server | |
250 | #if [ $1 = 2 ]; then /sbin/service hylafax condrestart >/dev/null 2>&1; fi | |
251 | ||
252 | ||
253 | ||
254 | %files | |
255 | %defattr(644,root,root,755) | |
256 | %doc README TODO VERSION COPYRIGHT | |
257 | %attr(755,root,root) %{_sbindir}/faxsetup | |
258 | %attr(755,root,root) %{_sbindir}/faxsetup.linux | |
259 | ||
260 | ||
261 | %files client | |
262 | %defattr(644,root,root,755) | |
263 | %attr(755,root,root) %{_bindir}/sendfax | |
264 | %attr(755,root,root) %{_bindir}/sendpage | |
265 | %attr(755,root,root) %{_bindir}/faxstat | |
266 | %attr(755,root,root) %{_bindir}/faxalter | |
267 | %attr(755,root,root) %{_bindir}/faxcover | |
268 | %attr(755,root,root) %{_bindir}/faxmail | |
269 | %attr(755,root,root) %{_bindir}/faxrm | |
270 | %attr(755,root,root) %{_sbindir}/textfmt | |
271 | %{_datadir}/fax/pagesizes | |
272 | %{_datadir}/fax/faxcover.ps | |
273 | %{_datadir}/fax/typerules | |
274 | %{_datadir}/fax/hyla.conf | |
275 | %{_mandir}/man1/* | |
276 | ||
277 | ||
278 | %files server | |
279 | %defattr(644,root,root,755) | |
280 | %attr(754,root,root) /etc/rc.d/init.d/hylafax | |
281 | %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/cron.daily/hylafax | |
282 | %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/cron.hourly/hylafax | |
283 | %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/logrotate.d/hylafax | |
284 | %attr(-,uucp,uucp) %dir %{faxspool} | |
285 | %attr(-,uucp,uucp) %dir %{faxspool}/bin | |
286 | %attr(-,uucp,uucp) %dir %{faxspool}/client | |
287 | %attr(-,uucp,uucp) %dir %{faxspool}/config | |
288 | %attr(-,uucp,uucp) %dir %{faxspool}/dev | |
289 | %attr(-,uucp,uucp) %dir %{faxspool}%{_sysconfdir} | |
290 | %attr(-,uucp,uucp) %dir %{faxspool}/info | |
291 | %attr(-,uucp,uucp) %dir %{faxspool}/log | |
292 | %attr(-,uucp,uucp) %dir %{faxspool}/recvq | |
293 | %attr(-,uucp,uucp) %dir %{faxspool}/status | |
294 | %attr(-,uucp,uucp) %dir %{faxspool}/sendq | |
295 | %attr(-,uucp,uucp) %dir %{faxspool}/doneq | |
296 | %attr(-,uucp,uucp) %dir %{faxspool}/docq | |
297 | %attr(-,uucp,uucp) %dir %{faxspool}/tmp | |
298 | %attr(-,uucp,uucp) %dir %{faxspool}/pollq | |
299 | %attr(-,uucp,uucp) %dir %{faxspool}/archive | |
300 | ||
301 | %attr(-,uucp,uucp) %{faxspool}/FIFO | |
302 | %attr(-,root,root) %{faxspool}/COPYRIGHT | |
303 | %attr(-,uucp,uucp) %config(noreplace) %verify(not size mtime md5) %{faxspool}%{_sysconfdir}/xferfaxlog | |
304 | %attr(-,uucp,uucp) %config(noreplace) %verify(not size mtime md5) %{faxspool}%{_sysconfdir}/hosts.hfaxd | |
305 | %attr(-,uucp,uucp) %config(noreplace) %verify(not size mtime md5) %{faxspool}%{_sysconfdir}/lutRS18.pcf | |
306 | %attr(-,uucp,uucp) %config(noreplace) %verify(not size mtime md5) %{faxspool}%{_sysconfdir}/dpsprinter.ps | |
307 | %attr(-,uucp,uucp) %config(noreplace) %verify(not size mtime md5) %{faxspool}%{_sysconfdir}/cover.templ | |
308 | %attr(-,uucp,uucp) %config(noreplace) %verify(not size mtime md5) %{faxspool}%{_sysconfdir}/dialrules* | |
309 | ||
310 | %{faxspool}/bin/* | |
311 | %{faxspool}/config/* | |
312 | ||
313 | %attr(755,root,root) %{_sbindir}/hfaxd | |
314 | %attr(755,root,root) %{_sbindir}/hylafax | |
315 | %attr(755,root,root) %{_sbindir}/faxdeluser | |
316 | %attr(755,root,root) %{_sbindir}/faxadduser | |
317 | %attr(755,root,root) %{_sbindir}/choptest | |
318 | %attr(755,root,root) %{_sbindir}/cqtest | |
319 | %attr(755,root,root) %{_sbindir}/dialtest | |
320 | %attr(755,root,root) %{_sbindir}/faxabort | |
321 | %attr(755,root,root) %{_sbindir}/faxaddmodem | |
322 | %attr(755,root,root) %{_sbindir}/faxanswer | |
323 | %attr(755,root,root) %{_sbindir}/faxconfig | |
324 | %attr(755,root,root) %{_sbindir}/faxcron | |
325 | %attr(755,root,root) %{_sbindir}/faxgetty | |
326 | %attr(755,root,root) %{_sbindir}/faxinfo | |
327 | %attr(755,root,root) %{_sbindir}/faxmodem | |
328 | %attr(755,root,root) %{_sbindir}/faxmsg | |
329 | %attr(755,root,root) %{_sbindir}/faxq | |
330 | %attr(755,root,root) %{_sbindir}/faxqclean | |
331 | %attr(755,root,root) %{_sbindir}/faxquit | |
332 | %attr(755,root,root) %{_sbindir}/faxsend | |
333 | %attr(755,root,root) %{_sbindir}/faxstate | |
334 | %attr(755,root,root) %{_sbindir}/faxwatch | |
335 | %attr(755,root,root) %{_sbindir}/lockname | |
336 | %attr(755,root,root) %{_sbindir}/ondelay | |
337 | %attr(755,root,root) %{_sbindir}/pagesend | |
338 | %attr(755,root,root) %{_sbindir}/probemodem | |
339 | %attr(755,root,root) %{_sbindir}/recvstats | |
340 | %attr(755,root,root) %{_sbindir}/tagtest | |
341 | %attr(755,root,root) %{_sbindir}/tiffcheck | |
342 | %attr(755,root,root) %{_sbindir}/tsitest | |
343 | %attr(755,root,root) %{_sbindir}/typetest | |
344 | %attr(755,root,root) %{_sbindir}/xferfaxstats | |
345 | ||
346 | %{_datadir}/fax/faxmail.ps | |
347 | %{_datadir}/fax/hfaxd.conf | |
348 | ||
349 | %{_mandir}/man5/* | |
350 | %{_mandir}/man8/* | |
351 | ||
352 | %files devel | |
353 | %defattr(644,root,root,755) | |
354 | %doc html COPYRIGHT | |
355 | %{_libdir}/*.so | |
356 | ||
357 | ||
358 | %files libs | |
359 | %defattr(644,root,root,755) | |
360 | %doc COPYRIGHT | |
361 | %{_libdir}/*.so.* |