Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > by-pkgid > 547e6c97708d41e16270d61307774c29 > files > 12

hylafax-4.1-0.3mdk.src.rpm

%define name 		hylafax
%define version 	4.1beta2
%define rversion 	4.1
%define release 	0.3mdk
%define cvs		cvs-20000801
%define group 		Communications
BuildRequires: libjpeg-devel libtiff-devel zlib-devel


Summary:	HylaFAX(tm) is a sophisticated enterprise strength fax package
Name:		%{name}
Version:	%{rversion}
Release:	%{release}
Copyright: 	better than LGPL
Group:		%{group}
URL: 		http://www.hylafax.org/
Source:         ftp://ftp.hylafax.org/hylafax/source/BETA/%{name}-%{cvs}.tar.bz2
Source1:	hylafax_cron_entries.tar.bz2
Source2:	config_sample.tar.bz2
Source3:	dialrules_extras.tar.bz2
Source5:	README.rpm.bz2
Source6: 	hylafax.logrotate.bz2
Source7:	hylafax.init.bz2
Requires:	ghostscript >= 4.03
Requires:	libgr >= 2.0.13
Requires:	libgr-devel >= 2.0.13
Requires:	libgr-progs >= 2.0.13
Requires:	libtiff >= 3.5.5-2
Patch1:		hylafax-v4.1-dso.patch.bz2
Patch2:		hylafax-v4.1-typerules.patch.bz2
Patch3:		hylafax-v4.1-ps2fax.patch.bz2
Patch4:         hylafax-v4.1-sysvinit.patch.bz2
Patch5: hylafax-fix-sysvinit.patch.bz2

BuildRoot: 	%{_tmppath}/%{name}-%{version}-buildroot


%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: hylafax

%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: hylafax

%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.


%prep
%setup -n %{name}-%{cvs} -a 1 -a 2 -a 3 -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4
%patch5 -p0

%build

./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-DEFVRES=196 \
--with-DBLIBINC=%{_includedir} \
--with-DIR_AFM=%{_datadir}/fax/afm \
--with-LIBTIFF="-ltiff -ljpeg -lz" \
--with-DIR_HTML=%{_datadir}/doc/%{name}-%{version}/html \
--with-DIR_CGI=%{_datadir}/doc/%{name}-%{version}/html/cgi-bin \
--with-DIR_SPOOL=/var/spool/fax \
--with-LIBDB=-ldb \
--with-ZLIB=no \
--with-ZLIBINC=. \
--with-AFM=no \
--with-DSO=LINUX \
--with-DSOSUF=so \
--with-PATH_VGETTY=/sbin/vgetty \
--with-HTML=yes <<EOF
yes
EOF

make 


%install
rm -rf $RPM_BUILD_ROOT

install -d -m 755 $RPM_BUILD_ROOT/var/spool/fax/{config/defaults,bin} \
		  $RPM_BUILD_ROOT%{_mandir}/{man1,man5,man8} \
		  $RPM_BUILD_ROOT%{_datadir}/fax/afm \
		  $RPM_BUILD_ROOT%{_libdir} \
		  $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version} \
		  $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,cron.hourly,cron.daily} \
		  $RPM_BUILD_ROOT%{_initrddir}

make -e 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/var/spool/fax MAN=$RPM_BUILD_ROOT%{_mandir} HTMLDIR=$RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}/html CGIBIN=$RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}/html/cgi-bin INSTALL_ROOT=$RPM_BUILD_ROOT install

bzcat %{SOURCE7} > $RPM_BUILD_ROOT%{_initrddir}/hylafax
chmod a+x $RPM_BUILD_ROOT%{_initrddir}/hylafax

# defaults 
install -m 644 defaults/* $RPM_BUILD_ROOT/var/spool/fax/config/defaults/

# 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

# rockwell-56k support
#bzcat %{SOURCE7} > $RPM_BUILD_ROOT/var/spool/fax/config/rockwell-k56

# README.rpm
bzcat %{SOURCE5} > $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}/README.rpm

# dialrules extras
install -m 644 dialrules_extras/dialrules* $RPM_BUILD_ROOT/var/spool/fax/etc


ln -sf ../../fonts/default/Type1/a010013l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/AvantGarde-Book.afm
ln -sf ../../fonts/default/Type1/a010033l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/AvantGarde-BookOblique.afm
ln -sf ../../fonts/default/Type1/a010015l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/AvantGarde-Demi.afm
ln -sf ../../fonts/default/Type1/a010035l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/AvantGarde-DemiOblique.afm
ln -sf ../../fonts/default/Type1/b018015l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Bookman-Demi.afm
ln -sf ../../fonts/default/Type1/b018035l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Bookman-DemiItalic.afm
ln -sf ../../fonts/default/Type1/b018012l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Bookman-Light.afm
ln -sf ../../fonts/default/Type1/b018032l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Bookman-LightItalic.afm
ln -sf ../../fonts/default/Type1/n022004l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Courier-Bold.afm
ln -sf ../../fonts/default/Type1/n022024l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Courier-BoldOblique.afm
ln -sf ../../fonts/default/Type1/n022023l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Courier-Oblique.afm
ln -sf ../../fonts/default/Type1/n022003l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Courier.afm
ln -sf ../../fonts/default/Type1/n019004l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Helvetica-Bold.afm
ln -sf ../../fonts/default/Type1/n019024l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Helvetica-BoldOblique.afm
ln -sf ../../fonts/default/Type1/n019044l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Helvetica-Narrow-Bold.afm
ln -sf ../../fonts/default/Type1/n019064l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Helvetica-Narrow-BoldOblique.afm
ln -sf ../../fonts/default/Type1/n019063l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Helvetica-Narrow-Oblique.afm
ln -sf ../../fonts/default/Type1/n019043l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Helvetica-Narrow.afm
ln -sf ../../fonts/default/Type1/n019023l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Helvetica-Oblique.afm
ln -sf ../../fonts/default/Type1/n019003l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Helvetica.afm
ln -sf ../../fonts/default/Type1/c059016l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/NewCenturySchlbk-Bold.afm
ln -sf ../../fonts/default/Type1/c059036l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/NewCenturySchlbk-BoldItalic.afm
ln -sf ../../fonts/default/Type1/c059033l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/NewCenturySchlbk-Italic.afm
ln -sf ../../fonts/default/Type1/c059013l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/NewCenturySchlbk-Roman.afm
ln -sf ../../fonts/default/Type1/p052004l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Palatino-Bold.afm
ln -sf ../../fonts/default/Type1/p052024l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Palatino-BoldItalic.afm
ln -sf ../../fonts/default/Type1/p052023l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Palatino-Italic.afm
ln -sf ../../fonts/default/Type1/p052003l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Palatino-Roman.afm
ln -sf ../../fonts/default/Type1/s050000l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Symbol.afm
ln -sf ../../fonts/default/Type1/n021004l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Times-Bold.afm
ln -sf ../../fonts/default/Type1/n021024l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Times-BoldItalic.afm
ln -sf ../../fonts/default/Type1/n021023l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Times-Italic.afm
ln -sf ../../fonts/default/Type1/n021023l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Times-Oblique.afm
ln -sf ../../fonts/default/Type1/n021003l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/Times-Roman.afm
ln -sf ../../fonts/default/Type1/z003034l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/ZapfChancery-MediumItalic.afm
ln -sf ../../fonts/default/Type1/d050000l.afm $RPM_BUILD_ROOT%{_datadir}/fax/afm/ZapfDingbats.afm


ln -sf ps2fax.gs $RPM_BUILD_ROOT/var/spool/fax/bin/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


%post
/sbin/ldconfig

%post client
/sbin/ldconfig
/usr/sbin/faxsetup -client

%post server
/sbin/ldconfig
/sbin/chkconfig --add hylafax

# Adding faxgetty entry to /etc/inittab
logger adding FaxGetty entry to /etc/inittab
echo "# Faxgetty entry " >> /etc/inittab
echo "#t0:23:respawn:/usr/sbin/faxgetty ttyS0" >> /etc/inittab

echo "Please run \"/usr/sbin/faxsetup -server\" to configure your fax server"


%preun server
/sbin/chkconfig --del hylafax

# Removing faxgetty entries in /etc/inittab
sed -e '/[^[:space:]]*faxgetty.*$/d' /etc/inittab > /etc/inittab.$$
mv -f /etc/inittab.$$ /etc/inittab
/sbin/init q

# Stopping Fax Services
[ -f %{_initrddir}/hylafax ] && %{_initrddir}/hylafax stop


%postun 
/sbin/ldconfig

%postun client
/sbin/ldconfig

%postun server
/sbin/ldconfig


%clean
rm -rf $RPM_BUILD_ROOT


%files 
%defattr(-,root,root)
%doc README TODO VERSION COPYRIGHT
#%doc %{_datadir}/doc/%{name}-%{version}/README.rpm
%doc html/*
%{_libdir}/libfaxutil.so*
%{_sbindir}/faxsetup
%{_sbindir}/faxsetup.bsdi
%{_sbindir}/faxsetup.irix
%{_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/afm
%{_mandir}/man1/*


%files server
%defattr(-,root,root)
%config %{_sysconfdir}/*
%attr(-,uucp,uucp) %dir /var/spool/fax
%attr(-,uucp,uucp) %dir /var/spool/fax/bin
%attr(-,uucp,uucp) %dir /var/spool/fax/client
%attr(-,uucp,uucp) %dir /var/spool/fax/config
%attr(-,uucp,uucp) %dir /var/spool/fax/dev
%attr(-,uucp,uucp) %dir /var/spool/fax/etc
%attr(-,uucp,uucp) %dir /var/spool/fax/info
%attr(-,uucp,uucp) %dir /var/spool/fax/log
%attr(-,uucp,uucp) %dir /var/spool/fax/recvq
%attr(-,uucp,uucp) %dir /var/spool/fax/status
%attr(-,uucp,uucp) %dir /var/spool/fax/sendq
%attr(-,uucp,uucp) %dir /var/spool/fax/doneq
%attr(-,uucp,uucp) %dir /var/spool/fax/docq
%attr(-,uucp,uucp) %dir /var/spool/fax/tmp
%attr(-,uucp,uucp) %dir /var/spool/fax/pollq
%attr(-,uucp,uucp) %dir /var/spool/fax/archive
%attr(-,uucp,uucp) %config /var/spool/fax/etc/xferfaxlog
%attr(-,uucp,uucp) %config /var/spool/fax/etc/hosts.hfaxd
%attr(-,uucp,uucp) %config /var/spool/fax/etc/lutRS18.pcf
%attr(-,uucp,uucp) /var/spool/fax/FIFO
%attr(-,root,root) /var/spool/fax/COPYRIGHT

/var/spool/fax/bin/*
/var/spool/fax/config/*
/var/spool/fax/etc/dpsprinter.ps
/var/spool/fax/etc/cover.templ
/var/spool/fax/etc/dialrules*

%{_sbindir}/hfaxd
%{_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
%{_libdir}/libfaxserver.so*
%{_datadir}/fax/faxmail.ps
%{_datadir}/fax/hfaxd.conf

%{_mandir}/man5/* 
%{_mandir}/man8/*


%changelog
* 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