]> git.pld-linux.org Git - packages/hylafax.git/blob - hylafax.spec
- up to 4.2.2
[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.2.2
5 Release:        1
6 License:        distributable
7 Group:          Applications/Communications
8 Source0:        ftp://ftp.hylafax.org/source/%{name}-%{version}.tar.gz
9 # Source0-md5:  356328a6289d0a26775f33d6bfb75368
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 %if 0
253 #%preun client
254 #%_preun_service hylafax
255 #
256 #%post client
257 #%_post_service hylafax
258 #%%{_sbindir}/faxsetup -client
259 %endif
260
261 %post server
262 /sbin/chkconfig --add hylafax
263 if [ -f /var/lock/subsys/hylafax ]; then
264         /etc/rc.d/init.d/hylafax restart
265 else
266         echo "Run \"/etc/rc.d/init.d/hylafax start\" to start hylafax daemons." >&2
267 fi
268
269 cat /etc/inittab | grep -i "faxgetty entry" || \
270 echo -e "# FaxGetty Entry\n#t0:23:respawn:%{_sbindir}/faxgetty ttyS0" >> /etc/inittab
271 echo "Please check if new fax entry in /etc/inittab is correct."
272 echo "Run \"%{_sbindir}/faxsetup -server\" to configure your fax server"
273 echo "Run \"/sbin/telinit q\" to start faxgetty"
274
275 %preun server
276 if [ "$1" = "0" ] ; then
277         if [ -f /var/lock/subsys/hylafax ]; then
278                 /etc/rc.d/init.d/hylafax stop >&2
279         fi
280         /sbin/chkconfig --del hylafax
281         sed -i -e 's!^.*faxgetty.*$!!' /etc/inittab
282         /sbin/telinit q
283 fi
284
285 %files
286 %defattr(644,root,root,755)
287 %doc README TODO VERSION
288 %attr(755,root,root) %{_sbindir}/faxsetup
289 %attr(755,root,root) %{_sbindir}/faxsetup.linux
290 %dir %{_datadir}/fax
291
292 %files client
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_bindir}/sendfax
295 %attr(755,root,root) %{_bindir}/sendpage
296 %attr(755,root,root) %{_bindir}/faxstat
297 %attr(755,root,root) %{_bindir}/faxalter
298 %attr(755,root,root) %{_bindir}/faxcover
299 %attr(755,root,root) %{_bindir}/faxmail
300 %attr(755,root,root) %{_bindir}/faxrm
301 %attr(755,root,root) %{_sbindir}/edit-faxcover
302 %attr(755,root,root) %{_sbindir}/textfmt
303 %attr(755,root,root) %{_sbindir}/faxlock
304 %{_datadir}/fax/pagesizes
305 %config(noreplace) %verify(not size mtime md5) %{_datadir}/fax/faxcover.ps
306 %config(noreplace) %verify(not size mtime md5) %{_datadir}/fax/typerules
307 %config(noreplace) %verify(not size mtime md5) %{_datadir}/fax/hyla.conf
308 %{_mandir}/man1/*
309
310 %files server
311 %defattr(644,root,root,755)
312 %attr(754,root,root) /etc/rc.d/init.d/hylafax
313 %attr(750,root,root) %config(noreplace) %verify(not size mtime md5) /etc/cron.daily/hylafax
314 %attr(750,root,root) %config(noreplace) %verify(not size mtime md5) /etc/cron.hourly/hylafax
315 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/hylafax
316 %dir %{faxspool}
317 %dir %{faxspool}/bin
318 %attr(755,uucp,uucp) %dir %{faxspool}/client
319 %dir %{faxspool}/config
320 %dir %{faxspool}/dev
321 %dir %{faxspool}/etc
322 %attr(755,uucp,uucp) %dir %{faxspool}/info
323 %attr(755,uucp,uucp) %dir %{faxspool}/log
324 %attr(755,uucp,uucp) %dir %{faxspool}/recvq
325 %attr(755,uucp,uucp) %dir %{faxspool}/status
326 %attr(755,uucp,uucp) %dir %{faxspool}/sendq
327 %attr(755,uucp,uucp) %dir %{faxspool}/doneq
328 %attr(755,uucp,uucp) %dir %{faxspool}/docq
329 %attr(755,uucp,uucp) %dir %{faxspool}/tmp
330 %attr(755,uucp,uucp) %dir %{faxspool}/pollq
331 %attr(755,uucp,uucp) %dir %{faxspool}/archive
332
333 %attr(600,uucp,uucp) %{faxspool}/FIFO
334 %{faxspool}/COPYRIGHT
335 %attr(644,uucp,uucp) %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/xferfaxlog
336 %attr(600,uucp,root) %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/hosts.hfaxd
337 %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/lutRS18.pcf
338 %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/dpsprinter.ps
339 %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/cover.templ
340 %config(noreplace) %verify(not size mtime md5) %{faxspool}/etc/dialrules*
341
342 %attr(755,root,root) %{faxspool}/bin/*
343 %{faxspool}/config/*
344
345 %attr(755,root,root) %{_sbindir}/hfaxd
346 %attr(755,root,root) %{_sbindir}/hylafax
347 %attr(755,root,root) %{_sbindir}/faxdeluser
348 %attr(755,root,root) %{_sbindir}/faxadduser
349 %attr(755,root,root) %{_sbindir}/choptest
350 %attr(755,root,root) %{_sbindir}/cqtest
351 %attr(755,root,root) %{_sbindir}/dialtest
352 %attr(755,root,root) %{_sbindir}/faxabort
353 %attr(755,root,root) %{_sbindir}/faxaddmodem
354 %attr(755,root,root) %{_sbindir}/faxanswer
355 %attr(755,root,root) %{_sbindir}/faxconfig
356 %attr(755,root,root) %{_sbindir}/faxcron
357 %attr(755,root,root) %{_sbindir}/faxgetty
358 %attr(755,root,root) %{_sbindir}/faxinfo
359 %attr(755,root,root) %{_sbindir}/faxlock
360 %attr(755,root,root) %{_sbindir}/faxmodem
361 %attr(755,root,root) %{_sbindir}/faxmsg
362 %attr(755,root,root) %{_sbindir}/faxq
363 %attr(755,root,root) %{_sbindir}/faxqclean
364 %attr(755,root,root) %{_sbindir}/faxquit
365 %attr(755,root,root) %{_sbindir}/faxsend
366 %attr(755,root,root) %{_sbindir}/faxstate
367 %attr(755,root,root) %{_sbindir}/faxwatch
368 %attr(755,root,root) %{_sbindir}/lockname
369 %attr(755,root,root) %{_sbindir}/ondelay
370 %attr(755,root,root) %{_sbindir}/pagesend
371 %attr(755,root,root) %{_sbindir}/probemodem
372 %attr(755,root,root) %{_sbindir}/recvstats
373 %attr(755,root,root) %{_sbindir}/tagtest
374 %attr(755,root,root) %{_sbindir}/tiffcheck
375 %attr(755,root,root) %{_sbindir}/tsitest
376 %attr(755,root,root) %{_sbindir}/typetest
377 %attr(755,root,root) %{_sbindir}/xferfaxstats
378
379 %{_datadir}/fax/faxmail.ps
380 %config(noreplace) %verify(not size mtime md5) %{_datadir}/fax/hfaxd.conf
381
382 %{_mandir}/man5/*
383 %{_mandir}/man8/*
384
385 %files libs
386 %defattr(644,root,root,755)
387 %doc COPYRIGHT
388 %attr(755,root,root) %{_libdir}/*.so.*.*
389
390 %files devel
391 %defattr(644,root,root,755)
392 %doc html
393 %attr(755,root,root) %{_libdir}/*.so
This page took 0.084603 seconds and 4 git commands to generate.