%define name hylafax %define rversion 4.1 %define version 4.1 %define release 6mdk #%define cvs cvs-20001203 %define group Communications %define major 4 %define libname lib%{name}%{major} %define faxspool %{_var}/spool/fax Summary: HylaFAX(tm) is a sophisticated enterprise strength fax package Name: %{name} Version: %{version} Release: %{release} License: LGPL-style Group: %{group} URL: http://www.hylafax.org/ #Source: %{name}-%{cvs}.tar.bz2 Source: %{name}-%{rversion}.tar.bz2 Source1: hylafax-v4.1-cron_entries.tar.bz2 Source2: hylafax-v4.1-defaults.tar.bz2 Source3: hylafax-v4.1-dialrules_extras.tar.bz2 #Source5: hylafax-v4.1-README.rpm.bz2 Source6: hylafax-v4.1-logrotate.bz2 Source7: hylafax-v4.1-init.bz2 Source8: hylafax-v4.1-hyla.conf.bz2 Patch1: hylafax-v4.1-dso.patch.bz2 Patch2: hylafax-v4.1-dso.chris.patch.bz2 Patch4: hylafax-v4.1-rings-cid-passing.patch.bz2 Patch5: hylafax-v4.1-mdk.patch.bz2 Patch6: hylafax-v4.1-topmargin.patch.bz2 Patch7: hylafax-v4.1-priority.patch.bz2 Requires: ghostscript >= 5.5 Requires: libtiff >= 3.5.5-7 Requires: gawk >= 3.0.6 BuildRequires: libjpeg-devel libtiff-devel zlib-devel Requires: %{libname} = %{version}, libtiff3-progs BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot Conflicts: mgetty-sendfax %description HylaFAX(tm) is a sophisticated enterprise-strength fax package for class 1 and 2 fax modems on unix systems. It provides spooling services and numerous supporting fax management tools. The fax clients may reside on machines different from the server and client implementations exist for a number of platforms including windows. You need this package if you are going to install hylafax-client and/or hylafax server. %package server Summary: The files for the HylaFAX(tm) fax server. Group: %{group} Requires: %{name} Requires: %{libname} = %{version} %description server HylaFAX(tm) is a sophisticated enterprise-strength fax package for class 1 and 2 fax modems on unix systems. It provides spooling services and numerous supporting fax management tools. The fax clients may reside on machines different from the server and client implementations exist for a number of platforms including windows. This is the server portion of HylaFAX. %package client Summary: The files for the HylaFAX(tm) fax client. Group: %{group} Requires: %{name} Requires: %{libname} = %{version} %description client HylaFAX(tm) is a sophisticated enterprise-strength fax package for class 1 and 2 fax modems on unix systems. It provides spooling services and numerous supporting fax management tools. The fax clients may reside on machines different from the server and client implementations exist for a number of platforms including windows. This is the client portion of HylaFAX. %package -n %{libname} Summary: Hylafax libraries Group: %{group} %description -n %{libname} HylaFAX(tm) is a sophisticated enterprise-strength fax package for class 1 and 2 fax modems on unix systems. It provides spooling services and numerous supporting fax management tools. The fax clients may reside on machines different from the server and client implementations exist for a number of platforms including windows. This is the shared librairies of HylaFAX. %package -n %{libname}-devel Summary: Hylafax libraries Group: %{group} Requires: %{libname} = %{version} Provides: lib%{name}-devel = %{version} %description -n %{libname}-devel HylaFAX(tm) is a sophisticated enterprise-strength fax package for class 1 and 2 fax modems on unix systems. It provides spooling services and numerous supporting fax management tools. The fax clients may reside on machines different from the server and client implementations exist for a number of platforms including windows. This is the shared librairies of HylaFAX. %prep #%setup -n %{name}-%{cvs} -a 1 -a 2 -a 3 -q %setup -n %{name}-%{rversion} -a 1 -a 2 -a 3 -q %patch1 -p1 %patch2 -p1 %patch4 %patch5 -p1 %patch6 -p1 %patch7 -p1 %build # - Can't use the configure macro because does not understand --prefix # - A patch makes configure not to ask for a confirmation. An alternative would # be to use --quiet, but this way all the configure output would be hidden # - --with-HTML is 'no' because the html dir is taken by the doc macro ./configure \ --with-DIR_BIN=%{_bindir} \ --with-DIR_SBIN=%{_sbindir} \ --with-DIR_LIBEXEC=%{_sbindir} \ --with-DIR_LIBDATA=%{_datadir}/fax \ --with-DIR_LOCKS=%{_var}/lock \ --with-TIFFINC=%{_includedir} \ --with-TIFFBIN=%{_bindir} \ --with-DIR_MAN=%{_mandir} \ --with-PATH_GSRIP=%{_bindir}/gs \ --with-DBLIBINC=%{_includedir} \ --with-LIBTIFF="-ltiff -ljpeg -lz" \ --with-DIR_SPOOL=%{faxspool} \ --with-LIBDB=-ldb \ --with-AFM=no \ --with-AWK=/usr/bin/gawk \ --with-DSO=LINUX \ --with-DSOSUF=so \ --with-PATH_VGETTY=/sbin/vgetty \ --with-PATH_GETTY=/sbin/mgetty \ --with-HTML=no \ --with-PAGESIZE=A4 \ --with-PATH_DPSRIP=%{faxspool}/bin/ps2fax \ --with-PATH_IMPRIP=%{_datadir}/fax/psrip \ --with-SYSVINIT=%{_initrddir}/hylafax \ --with-INTERACTIVE=no # CFLAGS is set up by the HylaFAX configure script; setting it up here the # standard way would break things. Since OPTIMIZER is included in CFLAGS # by the HylaFAX configure system, it's used here in place of CFLAGS #make CFLAGS="$RPM_OPT_FLAGS" make OPTIMIZER="$RPM_OPT_FLAGS" # THIS PACKAGE DON'T SUPPORT SMP BUILD: NO %make %install #find -name CVS|xargs rm -fr rm -rf $RPM_BUILD_ROOT install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,cron.hourly,cron.daily} install -d -m 755 $RPM_BUILD_ROOT%{_initrddir} install -d -m 755 $RPM_BUILD_ROOT%{_bindir} install -d -m 755 $RPM_BUILD_ROOT%{_sbindir} install -d -m 755 $RPM_BUILD_ROOT%{_libdir} install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/fax install -d -m 755 $RPM_BUILD_ROOT%{faxspool}/{etc,config/defaults,bin} install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/{man1,man5,man8} # install: binaries and man pages # FAXUSER, FAXGROUP, SYSUSER and SYSGROUP are set to the current user to # avoid warnings about chown/chgrp if the user building the SRPM is not root; # they are set to the correct values with the RPM attr macro %makeinstall -e \ FAXUSER=`id -u` \ FAXGROUP=`id -g` \ SYSUSER=`id -u` \ SYSGROUP=`id -g` \ BIN=$RPM_BUILD_ROOT%{_bindir} \ SBIN=$RPM_BUILD_ROOT%{_sbindir} \ LIBDATA=$RPM_BUILD_ROOT%{_datadir}/fax \ LIBEXEC=$RPM_BUILD_ROOT%{_sbindir} \ SPOOL=$RPM_BUILD_ROOT%{faxspool} \ MAN=$RPM_BUILD_ROOT%{_mandir} \ INSTALL_ROOT=$RPM_BUILD_ROOT # some hacks perl -pi -e 's!/usr/etc/inetd.conf!/etc/inetd.conf!g' $RPM_BUILD_ROOT%{_sbindir}/faxsetup perl -pi -e 's!/usr/lib/aliases!/etc/aliases!g' $RPM_BUILD_ROOT%{_sbindir}/faxsetup # init bzcat %{SOURCE7} > $RPM_BUILD_ROOT%{_initrddir}/hylafax chmod 755 $RPM_BUILD_ROOT%{_initrddir}/hylafax # defaults install -m 644 defaults/* $RPM_BUILD_ROOT%{faxspool}/config/defaults/ # hyla.conf bzcat %{SOURCE8} > $RPM_BUILD_ROOT%{_datadir}/fax/hyla.conf chmod 644 $RPM_BUILD_ROOT%{_datadir}/fax/hyla.conf # cron entries install -m 755 hylafax_daily.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/hylafax install -m 755 hylafax_hourly.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/hylafax # logrotate bzcat %{SOURCE6} > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/hylafax # dialrules extras install -m 644 dialrules_extras/dialrules* $RPM_BUILD_ROOT%{faxspool}/etc (cd $RPM_BUILD_ROOT%{faxspool}/bin; ln -s ps2fax.gs ps2fax) # The Makefile puts the .so file in /usr/sbin. Move them to /usr/lib mv $RPM_BUILD_ROOT%{_sbindir}/*.so.* $RPM_BUILD_ROOT%{_libdir} mv $RPM_BUILD_ROOT%{_sbindir}/*.so $RPM_BUILD_ROOT%{_libdir} # put execute permission on .so so that RPM doesn't warn chmod +x $RPM_BUILD_ROOT%{_libdir}/lib*.so.* chmod +x $RPM_BUILD_ROOT%{_libdir}/lib*.so # Since now the html doc dir is managed by the doc macro and not installed # by HylaFAX, the CVS stuff need to be deleted rm -rf $(find ./html -type d -name CVS) rm -f ./html/{.cvsignore,Makefile.in} # Some tools (manpage, man2html, unquote) rm -f html/tools/{unquote,man2html} # If Linux, what else...? :-), delete unnecessary files %ifos linux rm -f $RPM_BUILD_ROOT%{_sbindir}/{faxsetup.irix,faxsetup.bsdi} %endif %clean rm -rf $RPM_BUILD_ROOT %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %preun client %_preun_service hylafax %post client %_post_service hylafax %{_sbindir}/faxsetup -client %post server if [ $1 = 1 ] ; then /sbin/chkconfig --add hylafax; fi %_post_service hylafax # Adding faxgetty entry to %{_sysconfdir}/inittab logger adding FaxGetty entry to %{_sysconfdir}/inittab cat %{_sysconfdir}/inittab | grep -i "faxgetty entry" || \ echo -e "# FaxGetty Entry\n#t0:23:respawn:%{_sbindir}/faxgetty ttyS0" >> %{_sysconfdir}/inittab echo "Please run \"%{_sbindir}/faxsetup -server\" to configure your fax server" %preun server %_preun_service hylafax if [ $1 = 0 ] ; then # Removing faxgetty entries in %{_sysconfdir}/inittab perl -pi -e 's!^.*faxgetty.*$!!g' %{_sysconfdir}/inittab > %{_sysconfdir}/inittab.$$ /sbin/init q fi #%postun server #if [ $1 = 2 ]; then /sbin/service hylafax condrestart >/dev/null 2>&1; fi %files %defattr(-,root,root) %doc README TODO VERSION COPYRIGHT %{_sbindir}/faxsetup %{_sbindir}/faxsetup.linux %files client %defattr(-,root,root) %{_bindir}/sendfax %{_bindir}/sendpage %{_bindir}/faxstat %{_bindir}/faxalter %{_bindir}/faxcover %{_bindir}/faxmail %{_bindir}/faxrm %{_sbindir}/textfmt %{_datadir}/fax/pagesizes %{_datadir}/fax/faxcover.ps %{_datadir}/fax/typerules %{_datadir}/fax/hyla.conf %{_mandir}/man1/* %files server %defattr(-,root,root) %config(noreplace) %{_initrddir}/hylafax %config(noreplace) %{_sysconfdir}/cron.daily/hylafax %config(noreplace) %{_sysconfdir}/cron.hourly/hylafax %config(noreplace) %{_sysconfdir}/logrotate.d/hylafax %attr(-,uucp,uucp) %dir %{faxspool} %attr(-,uucp,uucp) %dir %{faxspool}/bin %attr(-,uucp,uucp) %dir %{faxspool}/client %attr(-,uucp,uucp) %dir %{faxspool}/config %attr(-,uucp,uucp) %dir %{faxspool}/dev %attr(-,uucp,uucp) %dir %{faxspool}/etc %attr(-,uucp,uucp) %dir %{faxspool}/info %attr(-,uucp,uucp) %dir %{faxspool}/log %attr(-,uucp,uucp) %dir %{faxspool}/recvq %attr(-,uucp,uucp) %dir %{faxspool}/status %attr(-,uucp,uucp) %dir %{faxspool}/sendq %attr(-,uucp,uucp) %dir %{faxspool}/doneq %attr(-,uucp,uucp) %dir %{faxspool}/docq %attr(-,uucp,uucp) %dir %{faxspool}/tmp %attr(-,uucp,uucp) %dir %{faxspool}/pollq %attr(-,uucp,uucp) %dir %{faxspool}/archive %attr(-,uucp,uucp) %{faxspool}/FIFO %attr(-,root,root) %{faxspool}/COPYRIGHT %attr(-,uucp,uucp) %config(noreplace) %{faxspool}/etc/xferfaxlog %attr(-,uucp,uucp) %config(noreplace) %{faxspool}/etc/hosts.hfaxd %attr(-,uucp,uucp) %config(noreplace) %{faxspool}/etc/lutRS18.pcf %attr(-,uucp,uucp) %config(noreplace) %{faxspool}/etc/dpsprinter.ps %attr(-,uucp,uucp) %config(noreplace) %{faxspool}/etc/cover.templ %attr(-,uucp,uucp) %config(noreplace) %{faxspool}/etc/dialrules* %{faxspool}/bin/* %{faxspool}/config/* %{_sbindir}/hfaxd %{_sbindir}/hylafax %{_sbindir}/faxdeluser %{_sbindir}/faxadduser %{_sbindir}/choptest %{_sbindir}/cqtest %{_sbindir}/dialtest %{_sbindir}/faxabort %{_sbindir}/faxaddmodem %{_sbindir}/faxanswer %{_sbindir}/faxconfig %{_sbindir}/faxcron %{_sbindir}/faxgetty %{_sbindir}/faxinfo %{_sbindir}/faxmodem %{_sbindir}/faxmsg %{_sbindir}/faxq %{_sbindir}/faxqclean %{_sbindir}/faxquit %{_sbindir}/faxsend %{_sbindir}/faxstate %{_sbindir}/faxwatch %{_sbindir}/lockname %{_sbindir}/ondelay %{_sbindir}/pagesend %{_sbindir}/probemodem %{_sbindir}/recvstats %{_sbindir}/tagtest %{_sbindir}/tiffcheck %{_sbindir}/tsitest %{_sbindir}/typetest %{_sbindir}/xferfaxstats %{_datadir}/fax/faxmail.ps %{_datadir}/fax/hfaxd.conf %{_mandir}/man5/* %{_mandir}/man8/* %files -n %{libname}-devel %defattr(-,root,root) %doc html COPYRIGHT %{_libdir}/*.so %files -n %{libname} %defattr(-,root,root) %doc COPYRIGHT %{_libdir}/*.so.* %changelog * Tue Oct 09 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-6mdk - qa-ize() srpm * Mon Aug 06 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-5mdk - add COPYRIGHT in %%libname{,devel} * Tue Jul 17 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-4mdk - clean %%preun (no need to do what %%_preun_service does) - Christian Zoffoli <czoffoli@linux-mandrake.com> did : - added hylafax-topmargin.patch - added hylafax-v4.1-priority.patch (BUG 153) - renamed & bzipped some patches * Wed Jul 11 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-3mdk - fix %%postun -p by removing next comment (rpm believed the comment was the shell to use :-( ) - fix license * Tue Jul 10 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-2mdk - add some fixes from jeff * Tue Jul 10 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-1mdk - final release - various spec fixes - security patch has been merged * Sun Jul 01 2001 Stefan van der Eijk <stefan@eijk.nu> 4.1-0.14mdk - BuildRequires: zlib-devel * Wed Jun 06 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-0.13mdk - add a requires on libtiff3-progs for tiffcp (needed by faxsetup) * Sat May 19 2001 Christian Zoffoli <czoffoli@linux-mandrake.com> 4.1-0.12mdk - rings-cid-passing.patch * Sun Apr 15 2001 Christian Zoffoli <czoffoli@linux-mandrake.com> 4.1-0.11mdk - SECURITY PATCH: hfaxd-vulnerability.patch - server macros * Thu Mar 15 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-0.10mdk - dso fix from Christian Zoffoli * Thu Mar 08 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-0.9mdk - s!Requires: %%{libname}!Requires: %%{libname} = %{version} - remove useless {%%post|%%postun} -n %{libname} : simplify others {pre,post}-scripts - %%{_libdir}/lib*.so go in %%{libname}-devel - %%{_libdir}/lib*.so.* go in %%{libname} - %%{libname}-devel provides lib%%{name}-devel = %%{version} - move the explaination why we don't use %%make near make - decribe deeper christian work - Christian Zoffoli <czoffoli@linux-mandrake.com> :! * Conflicts: mgetty-sendfax * add Requires: %%{libname} * fix a typo in previous "typo fix" changelog * Tue Feb 27 2001 Christian Zoffoli <czoffoli@linux-mandrake.com> 4.1-0.8mdk - beta 3 - fixed a typo * Fri Jan 26 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-0.7mdk - from Christian Zoffoli <czoffoli@linux-mandrake.com> - cvs-20001203 - many changes in spec - new init script * Thu Dec 07 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-0.6mdk - new lib scheme - make rpmlint happier (remove ~30 errors and ~40 warning, ie 50% of all my packages errors and warnings) * Wed Nov 08 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-0.5mdk - remove CVS garbage - uses optimizations * Wed Nov 08 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-0.4mdk - build release * Mon Sep 18 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 4.1-0.3mdk - remove duplicate installation of sysvinit script through configure/makefile - make it /var/lock/subsys compliant - use _initrddir * Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 4.1-0.2mdk - automatically added BuildRequires * Fri Aug 04 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.1-0.1mdk - Christian Zoffoli <czoffoli@linux-mandrake.com> : * cleaning in spec * added faxadduser faxdeluser * updated to cvs 20000801 * changes in spec * new hylafax init script * Mon Jul 31 2000 Christian Zoffoli <czoffoli@linux-mandrake.com> 4.0pl2.rjc11-5mdk - removed group - fixed man (comp. with other distro) - fixed macros - changed permissions - fixed fonts - fixed doc / html install - spec restyling - added libtiff 3.5 support (patch tiff-3.5-interfaces.patch - adapted) - added posix-rename.patch - added cvtDateTime.patch - added tagline-patch (adapted) - fixed libtiff 3.5 test - added some dialrules - fixed ldconfig in main package (making rpmlint happier) * Wed Jul 19 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 4.0pl2.rjc11-4mdk - BM * Tue May 9 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 4.0pl2.rjc11-3mdk - Add a lot of fixes from Christian Zoffoli <czoffoli@littlepenguin.org>. * Thu Apr 06 2000 Christopher Molnar <molnarc@mandrakesoft.com> 4.0pl2.rjc11-2mdk - changed group to Communications - bzipped patch files and additional source files - cleaned up spec file a bit * Tue Feb 22 2000 Brian J. Murrell <spec-maint@interlinx.bc.ca>4.0p12-1mdk - customized for Mandrake 7.0 - split into common, client and server subpackages - use urw-fonts package instead of ghostscript-fonts - patch up to rjc11 from CVS - change --with-DIR_AFM to --with-FONTMAP while configuring - prompt the "yes" into configure - force make install to install the startup script for the server - modify to support a "DESTDIR" install - put execute permissions on the created shared libs - change the compress manpages code to be much simpler - have the %post for server and client either run or prompt faxsetup to be run - update URL pointer * Tue Sep 29 1998 Darren Nickerson <darren@info.tpc.int> - added security fix proposed by Carsten Hoeger <choeger@suse.de> for potential race condition reported by Tobias Richter <tsr@cave.isdn.cs.tu-berlin.de> * Wed Sep 9 1998 Darren Nickerson <darren@info.tpc.int> - built the RPM on Redhat-5.0 to avoid dependency problems with libjpeg and libstdc++. * Tue May 26 1998 Darren Nickerson <darren@info.tpc.int> - removed .orig files from patch - they were 90 percent of it - removed oversimplified /dev/modem assumptions - faxcron was invoking xferstats, instead of new xferfaxstats - fixed - revised faxcron's manpage - HylaFAX was still writing etc/xferlog. Changed to etc/xferfaxlog as advertised by all supporting docs and scripts. - added hourly faxqclean and daily faxcron cron jobs, and xferlog rotation - hfaxd no longer hard-wired as running from inetd, faxsetup will handle this - no longer assumes /dev/modem and blindly inserts inittab entry - change naming scheme to differentiate rh4/rh5 - move documentation back into main rpm, instead of sub-packages - added Robert Colquhoun's textfmt-mailer patch - increased margin on LHS, was too close and getting clipped - make faxsetup warn that modem class = modem pool, not Class1/2/2.0 - use HylaFAX's init script, startup with new protocol only and no snpp - added -DFIXEDMEDIA to last command in ps2fax.gs, as posted by "Alan Sparks" <asparks@nss.harris.com> - added fixhtml patch, removed release from the doc dir, now just version - added Nico's skel patch, for class1/2/2.0 modem prototype files - added Robert Colquhoun's patch to hfaxd's tagline generation - fixes to build on 5.1, contributed by Richard Sharpe <sharpe@ns.aus.com> - faxrcvd now treated as a config file, preserved as .rpmsave - fixed ghostscript dependency to require fonts-std, not fonts. - remove requirement for mawk - use gawk instead. - faxsetup now detects is hfaxd is not driven from inetd, and starts it when restarting faxq using SysV init script (Robert Colquhoun) * Wed Mar 04 1998 Markus Pilzecker <mp@rhein-neckar.netsurf.de> - took ldconfig call out ouf %install section - minimized and compressed patch - arch rpm buildable as ordinary user - diverted subpackages for [un]compressed man pages - diverted subpackage for html documentation * Thu Jan 22 1998 Bernd Johannes Wuebben <wuebben@kde.org> - hylafax-4.0-8 - A previous version of this spec file was handed to me by Ramana Juvvadi (juvvadi@lekha.org) who unfortunately can no longer provide rpms of hylafax. Thanks so much for you work Ramana! Bernd * Fri Oct 24 1997 Ramana Juvvadi (juvvadi@lekha.org) - hylafax-4.0-6