]> git.pld-linux.org Git - packages/hylafax.git/blob - hylafax.spec
- release 3: do not require the perl package (used sed -i instead)
[packages/hylafax.git] / hylafax.spec
1 Summary:        HylaFAX(tm) is a sophisticated enterprise strength fax package
2 Summary(pl):    HylaFAX(tm) to przemy¶lany, potê¿ny pakiet do obs³ugi faksów
3 Name:           hylafax
4 Version:        4.1.8
5 Release:        3
6 License:        distributable
7 Group:          Applications/Communications
8 Source0:        ftp://ftp.hylafax.org/source/%{name}-%{version}.tar.gz
9 # Source0-md5:  beaf55ad7935e3bcaa53a5ac093f61a8
10 Source1:        %{name}-cron_entries.tar.gz
11 # Source1-md5:  d5e2bd6447715654ba916b6f4d0d9343
12 Source2:        %{name}-defaults.tar.gz
13 # Source2-md5:  9fae3c4503ecd328a85cd23a430f4ddf
14 Source3:        %{name}-dialrules_extras.tar.gz
15 # Source3-md5:  092430f320963d31932b587152fb811b
16 Source4:        %{name}-man-pages.tar.bz2
17 # Source4-md5:  62772fbbce6cb3a918145ad8a836b4eb
18 Source6:        %{name}-logrotate
19 Source7:        %{name}-init
20 Source8:        %{name}-hyla.conf
21 Patch0:         %{name}-no_libgl_man.patch
22 Patch1:         %{name}-topmargin.patch
23 Patch2:         %{name}-pic.patch
24 URL:            http://www.hylafax.org/
25 BuildRequires:  libjpeg-devel
26 BuildRequires:  libstdc++-devel
27 BuildRequires:  libtiff-devel
28 BuildRequires:  libtiff-progs
29 BuildRequires:  sed >= 4.1
30 BuildRequires:  zlib-devel
31 Requires:       %{name}-libs = %{version}-%{release}
32 Requires:       ghostscript
33 Requires:       ghostscript-fonts-std
34 Requires:       libtiff-progs
35 Conflicts:      mgetty-sendfax
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         faxspool        /var/spool/fax
39
40 %description
41 HylaFAX(tm) is a sophisticated enterprise-strength fax package for
42 class 1 and 2 fax modems on unix systems. It provides spooling
43 services and numerous supporting fax management tools. The fax clients
44 may reside on machines different from the server and client
45 implementations exist for a number of platforms including Windows.
46
47 You need this package if you are going to install hylafax-client
48 and/or hylafax server.
49
50 %description -l pl
51 HylaFAX(tm) to przemy¶lany, potê¿ny pakiet do obs³ugi faksmodemów klasy
52 1 i 2 na systemach uniksowych. Dostarcza us³ug kolejkowania i wielu
53 narzêdzi do zarz±dzania faksami. Klienci mog± dzia³aæ na maszynach
54 innych ni¿ serwer, dostêpne s± implementacje klientów na wiele
55 platform, w tym na platformê Windows.
56
57 Ten pakiet zawiera pliki wspólne dla serwera i klienta HylaFAX.
58
59 %package server
60 Summary:        The files for the HylaFAX(tm) fax server
61 Summary(pl):    Pliki dla serwera faksów HylaFAX(tm)
62 Group:          Applications/Communications
63 Requires(post,preun):   /sbin/chkconfig
64 Requires(post): grep
65 Requires(post): textutils
66 Requires(preun):        sed >= 4.1
67 Requires(preun):        /sbin/telinit
68 Requires:       %{name} = %{version}-%{release}
69
70 %description server
71 HylaFAX(tm) is a sophisticated enterprise-strength fax package for
72 class 1 and 2 fax modems on unix systems. It provides spooling
73 services and numerous supporting fax management tools. The fax clients
74 may reside on machines different from the server and client
75 implementations exist for a number of platforms including Windows.
76
77 This is the server portion of HylaFAX.
78
79 %description server -l pl
80 HylaFAX(tm) to przemy¶lany, potê¿ny pakiet do obs³ugi faksmodemów klasy
81 1 i 2 na systemach uniksowych. Dostarcza us³ug kolejkowania i wielu
82 narzêdzi do zarz±dzania faksami. Klienci mog± dzia³aæ na maszynach
83 innych ni¿ serwer, implementacje klientów s± dostêpne na wiele
84 platform, w tym na platformê Windows.
85
86 Ten pakiet zawiera czê¶æ serwerow± HylaFAX.
87
88 %package client
89 Summary:        The files for the HylaFAX(tm) fax client
90 Summary(pl):    Pliki dla klienta faksów HylaFAX(tm)
91 Group:          Applications/Communications
92 Requires:       %{name} = %{version}-%{release}
93
94 %description client
95 HylaFAX(tm) is a sophisticated enterprise-strength fax package for
96 class 1 and 2 fax modems on unix systems. It provides spooling
97 services and numerous supporting fax management tools. The fax clients
98 may reside on machines different from the server and client
99 implementations exist for a number of platforms including Windows.
100
101 This is the client portion of HylaFAX.
102
103 %description client -l pl
104 HylaFAX(tm) to przemy¶lany, potê¿ny pakiet do obs³ugi faksmodemów klasy
105 1 i 2 na systemach uniksowych. Dostarcza us³ug kolejkowania i wielu
106 narzêdzi do zarz±dzania faksami. Klienci mog± dzia³aæ na maszynach
107 innych ni¿ serwer, implementacje klientów s± dostêpne na wiele
108 platform, w tym na platformê Windows.
109
110 Ten pakiet zawiera czê¶æ klienck± HylaFAX.
111
112 %package libs
113 Summary:        Hylafax libraries
114 Summary(pl):    Biblioteki HylaFAX
115 Group:          Libraries
116
117 %description libs
118 HylaFAX(tm) is a sophisticated enterprise-strength fax package for
119 class 1 and 2 fax modems on unix systems. It provides spooling
120 services and numerous supporting fax management tools. The fax clients
121 may reside on machines different from the server and client
122 implementations exist for a number of platforms including Windows.
123
124 This package contains the shared libraries of HylaFAX.
125
126 %description libs -l pl
127 HylaFAX(tm) to przemy¶lany, potê¿ny pakiet do obs³ugi faksmodemów klasy
128 1 i 2 na systemach uniksowych. Dostarcza us³ug kolejkowania i wielu
129 narzêdzi do zarz±dzania faksami. Klienci mog± dzia³aæ na maszynach
130 innych ni¿ serwer, implementacje klientów s± dostêpne na wiele
131 platform, w tym na platformê Windows.
132
133 Ten pakiet zawiera biblioteki wspó³dzielone HylaFAX.
134
135 %package devel
136 Summary:        Hylafax libraries development part
137 Summary(pl):    Pakiet dla programistów u¿ywaj±cych bibliotek HylaFAX
138 Group:          Development/Libraries
139 Requires:       %{name}-libs = %{version}-%{release}
140
141 %description devel
142 This is development package for HylaFAX libraries.
143
144 %description devel -l pl
145 Pakiet dla programistów u¿ywaj±cych bibliotek HylaFAX.
146
147 %prep
148 %setup -q -a1 -a2 -a3
149 %patch0 -p1
150 %patch1 -p1
151 %patch2 -p1
152
153 %build
154 # set dummy GCOPTS,GCXXOPTS to avoid adding "-g"
155 GCOPTS=" " \
156 GCXXOPTS=" " \
157 ./configure \
158         --with-DIR_BIN=%{_bindir} \
159         --with-DIR_SBIN=%{_sbindir} \
160         --with-DIR_LIBEXEC=%{_sbindir} \
161         --with-DIR_LIBDIR=%{_libdir} \
162         --with-DIR_LIBDATA=%{_datadir}/fax \
163         --with-DIR_MAN=%{_mandir} \
164         --with-DIR_SPOOL=%{faxspool} \
165         --with-PATH_GSRIP=%{_bindir}/gs \
166         --with-AFM=no \
167         --with-DSO=auto \
168         --with-PATH_VGETTY=/sbin/vgetty \
169         --with-PATH_EGETTY=/sbin/egetty \
170         --with-PATH_GETTY=/sbin/mgetty \
171         --with-HTML=no \
172         --with-PAGESIZE=A4 \
173         --with-SYSVINIT=/etc/rc.d/init.d/hylafax \
174         --with-INTERACTIVE=no \
175         --with-SCRIPT_SH=/bin/bash \
176         --with-PATH_SENDMAIL=/usr/sbin/sendmail
177
178 %{__make} \
179         OPTIMIZER="%{rpmcflags}"
180
181 %install
182 rm -rf $RPM_BUILD_ROOT
183 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,cron.hourly,cron.daily,rc.d/init.d} \
184         $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir},%{_datadir}/fax} \
185         $RPM_BUILD_ROOT%{faxspool}/{etc,config/defaults,bin} \
186         $RPM_BUILD_ROOT%{_mandir}/{man1,man5,man8}
187
188 %{__make} install -e \
189         FAXUSER=`id -u` \
190         FAXGROUP=`id -g` \
191         SYSUSER=`id -u` \
192         SYSGROUP=`id -g` \
193         BIN=$RPM_BUILD_ROOT%{_bindir} \
194         SBIN=$RPM_BUILD_ROOT%{_sbindir} \
195         LIBDATA=$RPM_BUILD_ROOT%{_datadir}/fax \
196         LIBEXEC=$RPM_BUILD_ROOT%{_sbindir} \
197         SPOOL=$RPM_BUILD_ROOT%{faxspool} \
198         MAN=$RPM_BUILD_ROOT%{_mandir} \
199         LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
200         INSTALL_ROOT=$RPM_BUILD_ROOT
201
202 bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
203
204 # some hacks
205 sed -i -e 's!%{_prefix}%{_sysconfdir}/inetd.conf!%{_sysconfdir}/inetd.conf!g' $RPM_BUILD_ROOT%{_sbindir}/faxsetup
206 sed -i -e 's!%{_libdir}/aliases!%{_sysconfdir}/aliases!g' $RPM_BUILD_ROOT%{_sbindir}/faxsetup
207
208 # init
209 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/hylafax
210
211 # defaults
212 install defaults/* $RPM_BUILD_ROOT%{faxspool}/config/defaults/
213
214 # hyla.conf
215 install %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/fax/hyla.conf
216
217 # cron entries
218 install hylafax_daily.cron  $RPM_BUILD_ROOT/etc/cron.daily/hylafax
219 install hylafax_hourly.cron $RPM_BUILD_ROOT/etc/cron.hourly/hylafax
220
221 # logrotate
222 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/hylafax
223
224 # dialrules extras
225 install dialrules_extras/dialrules* $RPM_BUILD_ROOT%{faxspool}/etc
226
227 (cd $RPM_BUILD_ROOT%{faxspool}/bin; ln -sf ps2fax.gs ps2fax)
228
229 # The Makefile puts the .so file in /usr/sbin. Move them to /usr/lib
230 #mv -f $RPM_BUILD_ROOT%{_sbindir}/*.so.* $RPM_BUILD_ROOT%{_libdir}
231 #mv -f $RPM_BUILD_ROOT%{_sbindir}/*.so $RPM_BUILD_ROOT%{_libdir}
232
233 # Since now the html doc dir is managed by the doc macro and not installed
234 # by HylaFAX, the CVS stuff need to be deleted
235 rm -rf $(find ./html -type d -name CVS)
236 rm -f ./html/{.cvsignore,Makefile.in}
237
238 # Some tools (manpage, man2html, unquote)
239 rm -f html/tools/{unquote,man2html}
240
241 # If Linux, what else...? :-), delete unnecessary files
242 %ifos linux
243 rm -f $RPM_BUILD_ROOT%{_sbindir}/{faxsetup.irix,faxsetup.bsdi}
244 %endif
245
246 %clean
247 rm -rf $RPM_BUILD_ROOT
248
249 %post   libs -p /sbin/ldconfig
250 %postun libs -p /sbin/ldconfig
251
252 #%preun client
253 #%_preun_service hylafax
254 #
255 #%post client
256 #%_post_service hylafax
257 #%%{_sbindir}/faxsetup -client
258
259 %post server
260 /sbin/chkconfig --add hylafax
261 if [ -f /var/lock/subsys/hylafax ]; then
262         /etc/rc.d/init.d/hylafax restart
263 else
264         echo "Run \"/etc/rc.d/init.d/hylafax start\" to start hylafax daemons." >&2
265 fi
266
267 cat /etc/inittab | grep -i "faxgetty entry" || \
268 echo -e "# FaxGetty Entry\n#t0:23:respawn:%{_sbindir}/faxgetty ttyS0" >> /etc/inittab
269 echo "Please check if new fax entry in /etc/inittab is correct."
270 echo "Run \"%{_sbindir}/faxsetup -server\" to configure your fax server"
271 echo "Run \"/sbin/telinit q\" to start faxgetty"
272
273 %preun server
274 if [ "$1" = "0" ] ; then
275         if [ -f /var/lock/subsys/hylafax ]; then
276                 /etc/rc.d/init.d/hylafax stop >&2
277         fi
278         /sbin/chkconfig --del hylafax
279         sed -i -e 's!^.*faxgetty.*$!!' /etc/inittab
280         /sbin/telinit q
281 fi
282
283 %files
284 %defattr(644,root,root,755)
285 %doc README TODO VERSION
286 %attr(755,root,root) %{_sbindir}/faxsetup
287 %attr(755,root,root) %{_sbindir}/faxsetup.linux
288 %dir %{_datadir}/fax
289
290 %files client
291 %defattr(644,root,root,755)
292 %attr(755,root,root) %{_bindir}/sendfax
293 %attr(755,root,root) %{_bindir}/sendpage
294 %attr(755,root,root) %{_bindir}/faxstat
295 %attr(755,root,root) %{_bindir}/faxalter
296 %attr(755,root,root) %{_bindir}/faxcover
297 %attr(755,root,root) %{_bindir}/faxmail
298 %attr(755,root,root) %{_bindir}/faxrm
299 %attr(755,root,root) %{_sbindir}/edit-faxcover
300 %attr(755,root,root) %{_sbindir}/textfmt
301 %attr(755,root,root) %{_sbindir}/faxlock
302 %{_datadir}/fax/pagesizes
303 %config(noreplace) %verify(not size mtime md5) %{_datadir}/fax/faxcover.ps
304 %config(noreplace) %verify(not size mtime md5) %{_datadir}/fax/typerules
305 %config(noreplace) %verify(not size mtime md5) %{_datadir}/fax/hyla.conf
306 %{_mandir}/man1/*
307
308 %files server
309 %defattr(644,root,root,755)
310 %attr(754,root,root) /etc/rc.d/init.d/hylafax
311 %attr(750,root,root) %config(noreplace) %verify(not size mtime md5) /etc/cron.daily/hylafax
312 %attr(750,root,root) %config(noreplace) %verify(not size mtime md5) /etc/cron.hourly/hylafax
313 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/hylafax
314 %dir %{faxspool}
315 %dir %{faxspool}/bin
316 %attr(755,uucp,uucp) %dir %{faxspool}/client
317 %dir %{faxspool}/config
318 %dir %{faxspool}/dev
319 %dir %{faxspool}/etc
320 %attr(755,uucp,uucp) %dir %{faxspool}/info
321 %attr(755,uucp,uucp) %dir %{faxspool}/log
322 %attr(755,uucp,uucp) %dir %{faxspool}/recvq
323 %attr(755,uucp,uucp) %dir %{faxspool}/status
324 %attr(755,uucp,uucp) %dir %{faxspool}/sendq
325 %attr(755,uucp,uucp) %dir %{faxspool}/doneq
326 %attr(755,uucp,uucp) %dir %{faxspool}/docq
327 %attr(755,uucp,uucp) %dir %{faxspool}/tmp
328 %attr(755,uucp,uucp) %dir %{faxspool}/pollq
329 %attr(755,uucp,uucp) %dir %{faxspool}/archive
330
331 %attr(600,uucp,uucp) %{faxspool}/FIFO
332 %{faxspool}/COPYRIGHT
333 %attr(644,uucp,uucp) %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/xferfaxlog
334 %attr(600,uucp,root) %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/hosts.hfaxd
335 %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/lutRS18.pcf
336 %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/dpsprinter.ps
337 %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/cover.templ
338 %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/dialrules*
339
340 %attr(755,root,root) %{faxspool}/bin/*
341 %{faxspool}/config/*
342
343 %attr(755,root,root) %{_sbindir}/hfaxd
344 %attr(755,root,root) %{_sbindir}/hylafax
345 %attr(755,root,root) %{_sbindir}/faxdeluser
346 %attr(755,root,root) %{_sbindir}/faxadduser
347 %attr(755,root,root) %{_sbindir}/choptest
348 %attr(755,root,root) %{_sbindir}/cqtest
349 %attr(755,root,root) %{_sbindir}/dialtest
350 %attr(755,root,root) %{_sbindir}/faxabort
351 %attr(755,root,root) %{_sbindir}/faxaddmodem
352 %attr(755,root,root) %{_sbindir}/faxanswer
353 %attr(755,root,root) %{_sbindir}/faxconfig
354 %attr(755,root,root) %{_sbindir}/faxcron
355 %attr(755,root,root) %{_sbindir}/faxgetty
356 %attr(755,root,root) %{_sbindir}/faxinfo
357 %attr(755,root,root) %{_sbindir}/faxlock
358 %attr(755,root,root) %{_sbindir}/faxmodem
359 %attr(755,root,root) %{_sbindir}/faxmsg
360 %attr(755,root,root) %{_sbindir}/faxq
361 %attr(755,root,root) %{_sbindir}/faxqclean
362 %attr(755,root,root) %{_sbindir}/faxquit
363 %attr(755,root,root) %{_sbindir}/faxsend
364 %attr(755,root,root) %{_sbindir}/faxstate
365 %attr(755,root,root) %{_sbindir}/faxwatch
366 %attr(755,root,root) %{_sbindir}/lockname
367 %attr(755,root,root) %{_sbindir}/ondelay
368 %attr(755,root,root) %{_sbindir}/pagesend
369 %attr(755,root,root) %{_sbindir}/probemodem
370 %attr(755,root,root) %{_sbindir}/recvstats
371 %attr(755,root,root) %{_sbindir}/tagtest
372 %attr(755,root,root) %{_sbindir}/tiffcheck
373 %attr(755,root,root) %{_sbindir}/tsitest
374 %attr(755,root,root) %{_sbindir}/typetest
375 %attr(755,root,root) %{_sbindir}/xferfaxstats
376
377 %{_datadir}/fax/faxmail.ps
378 %config(noreplace) %verify(not size mtime md5) %{_datadir}/fax/hfaxd.conf
379
380 %{_mandir}/man5/*
381 %{_mandir}/man8/*
382
383 %files libs
384 %defattr(644,root,root,755)
385 %doc COPYRIGHT
386 %attr(755,root,root) %{_libdir}/*.so.*.*
387
388 %files devel
389 %defattr(644,root,root,755)
390 %doc html
391 %attr(755,root,root) %{_libdir}/*.so
This page took 0.06749 seconds and 3 git commands to generate.