]> git.pld-linux.org Git - packages/hylafax.git/blame - hylafax.spec
- stolen from MDK
[packages/hylafax.git] / hylafax.spec
CommitLineData
4922f335
TO
1Summary: HylaFAX(tm) is a sophisticated enterprise strength fax package
2Name: hylafax
3Version: 4.1
4Release: 0.1
5License: distributable
6Group: Applications/Communications
7Group(de): Applikationen/Kommunikation
8Group(pl): Aplikacje/Komunikacja
9URL: http://www.hylafax.org/
10Source0: ftp://ftp.hylafax.org/source/%{name}-%{version}.tar.gz
11Source1: %{name}-cron_entries.tar.gz
12Source2: %{name}-defaults.tar.gz
13Source3: %{name}-dialrules_extras.tar.gz
14Source6: %{name}-logrotate
15Source7: %{name}-init
16Source8: %{name}-hyla.conf
17Patch1: %{name}-dso.patch
18Patch2: %{name}-dso.chris.patch
19Patch4: %{name}-rings-cid-passing.patch
20Patch5: %{name}-mdk.patch
21Patch6: %{name}-topmargin.patch
22Patch7: %{name}-priority.patch
23BuildRequires: libjpeg-devel
24BuildRequires: libtiff-devel
25BuildRequires: zlib-devel
26Requires: ghostscript
27Requires: libtiff
28Requires: %{name}-libs = %{version}
29Requires: libtiff-progs
30Conflicts: mgetty-sendfax
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%define faxspool /var/spool/fax
34
35%description
36HylaFAX(tm) is a sophisticated enterprise-strength fax package for
37class 1 and 2 fax modems on unix systems. It provides spooling
38services and numerous supporting fax management tools. The fax clients
39may reside on machines different from the server and client
40implementations exist for a number of platforms including windows.
41
42You need this package if you are going to install hylafax-client
43and/or hylafax server.
44
45%package server
46Summary: The files for the HylaFAX(tm) fax server.
47Group: Applications/Communications
48Group(de): Applikationen/Kommunikation
49Group(pl): Aplikacje/Komunikacja
50Requires: %{name}
51
52%description server
53HylaFAX(tm) is a sophisticated enterprise-strength fax package for
54class 1 and 2 fax modems on unix systems. It provides spooling
55services and numerous supporting fax management tools. The fax clients
56may reside on machines different from the server and client
57implementations exist for a number of platforms including windows.
58
59This is the server portion of HylaFAX.
60
61%package client
62Summary: The files for the HylaFAX(tm) fax client.
63Group: Applications/Communications
64Group(de): Applikationen/Kommunikation
65Group(pl): Aplikacje/Komunikacja
66Requires: %{name}
67
68%description client
69HylaFAX(tm) is a sophisticated enterprise-strength fax package for
70class 1 and 2 fax modems on unix systems. It provides spooling
71services and numerous supporting fax management tools. The fax clients
72may reside on machines different from the server and client
73implementations exist for a number of platforms including windows.
74
75This is the client portion of HylaFAX.
76
77%package libs
78Summary: Hylafax libraries
79Group: Applications/Communications
80Group(de): Applikationen/Kommunikation
81Group(pl): Aplikacje/Komunikacja
82
83%description libs
84HylaFAX(tm) is a sophisticated enterprise-strength fax package for
85class 1 and 2 fax modems on unix systems. It provides spooling
86services and numerous supporting fax management tools. The fax clients
87may reside on machines different from the server and client
88implementations exist for a number of platforms including windows.
89
90This is the shared librairies of HylaFAX.
91
92%package devel
93Summary: Hylafax libraries
94Group: Applications/Communications
95Group(de): Applikationen/Kommunikation
96Group(pl): Aplikacje/Komunikacja
97Requires: %{name}-libs = %{version}
98
99%description devel
100HylaFAX(tm) is a sophisticated enterprise-strength fax package for
101class 1 and 2 fax modems on unix systems. It provides spooling
102services and numerous supporting fax management tools. The fax clients
103may reside on machines different from the server and client
104implementations exist for a number of platforms including windows.
105
106This 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
141rm -rf $RPM_BUILD_ROOT
142
143install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,cron.hourly,cron.daily,rc.d/init.d}
144install -d $RPM_BUILD_ROOT%{_bindir}
145install -d $RPM_BUILD_ROOT%{_sbindir}
146install -d $RPM_BUILD_ROOT%{_libdir}
147install -d $RPM_BUILD_ROOT%{_datadir}/fax
148install -d $RPM_BUILD_ROOT%{faxspool}/{etc,config/defaults,bin}
149install -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
165perl -pi -e 's!%{_prefix}%{_sysconfdir}/inetd.conf!%{_sysconfdir}/inetd.conf!g' $RPM_BUILD_ROOT%{_sbindir}/faxsetup
166perl -pi -e 's!%{_libdir}/aliases!%{_sysconfdir}/aliases!g' $RPM_BUILD_ROOT%{_sbindir}/faxsetup
167
168
169# init
170cat %{SOURCE7} > $RPM_BUILD_ROOT/etc/rc.d/init.d/hylafax
171chmod 755 $RPM_BUILD_ROOT/etc/rc.d/init.d/hylafax
172
173# defaults
174install defaults/* $RPM_BUILD_ROOT%{faxspool}/config/defaults/
175
176# hyla.conf
177cat %{SOURCE8} > $RPM_BUILD_ROOT%{_datadir}/fax/hyla.conf
178
179# cron entries
180install -m 755 hylafax_daily.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/hylafax
181install -m 755 hylafax_hourly.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/hylafax
182
183# logrotate
184cat %{SOURCE6} > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/hylafax
185
186# dialrules extras
187install 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
193mv $RPM_BUILD_ROOT%{_sbindir}/*.so.* $RPM_BUILD_ROOT%{_libdir}
194mv $RPM_BUILD_ROOT%{_sbindir}/*.so $RPM_BUILD_ROOT%{_libdir}
195
196# put execute permission on .so so that RPM doesn't warn
197chmod +x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
198chmod +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
202rm -rf $(find ./html -type d -name CVS)
203rm -f ./html/{.cvsignore,Makefile.in}
204
205# Some tools (manpage, man2html, unquote)
206rm -f html/tools/{unquote,man2html}
207
208# If Linux, what else...? :-), delete unnecessary files
209%ifos linux
210rm -f $RPM_BUILD_ROOT%{_sbindir}/{faxsetup.irix,faxsetup.bsdi}
211%endif
212
213
214%clean
215rm -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
229if [ $1 = 1 ] ; then /sbin/chkconfig --add hylafax; fi
230
231%_post_service hylafax
232
233# Adding faxgetty entry to %{_sysconfdir}/inittab
234logger adding FaxGetty entry to %{_sysconfdir}/inittab
235cat %{_sysconfdir}/inittab | grep -i "faxgetty entry" || \
236echo -e "# FaxGetty Entry\n#t0:23:respawn:%{_sbindir}/faxgetty ttyS0" >> %{_sysconfdir}/inittab
237
238echo "Please run \"%{_sbindir}/faxsetup -server\" to configure your fax server"
239
240
241%preun server
242%_preun_service hylafax
243if [ $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
247fi
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.*
This page took 0.111037 seconds and 4 git commands to generate.