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