HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: HylaFax & RedHat 6.0



Hello Shane,

this spec file works for me.
Get the latest cvs version and build it yourself.

Regards

Stephan


> I was wondering if anyone could tell me where i could get a copy of HylaFAX
> that will run on RedHat 6.0. I am looking for a stable version and age is
> not a problem, as long as it works!!
%define name hylafax
%define version 4.1beta2
%define release 2rh6
%define gs_font_dir /usr/share/ghostscript/fonts
%define group Applications/Communications
%define mansections 158

Summary:	HylaFAX(tm) is a sophisticated enterprise strength fax package
Name:		%{name}
Version:	%{version}
Release:	%{release}
Copyright:	better than LGPL
Group:		%{group}
Packager:	Darren Nickerson <darren@info.tpc.int>
URL:		http://www.hylafax.org/

Source:	ftp://ftp.hylafax.org/hylafax/source/BETA/%{name}-%{version}.tar.gz
#Source1:	hylafax_startup.tgz
#Source2:	hylasetup.sh
#Source3:	hylaunset.sh
Source4:	config
Source5:	config.modem
Source6:	setup.cache
Source7:	setup.modem
Source8:	README.rpm
Source9:	hylafax_daily.cron
Source10:	hylafax_hourly.cron
Source11:	hylafax.logrotate
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
#Requires:	%{name}-man
#Patch10:		hylafax-v4.1-dso.patch
#Patch11:		hylafax-v4.1-typerules.patch
#Patch12:		hylafax-v4.1-ps2fax.patch
#Patch1:		dbely-3rtn.patch

BuildRoot:	/tmp/%{name}-root

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

%changelog

* Wed Jun 16 1999 Darren Nickerson <darren@info.tpc.int>
  - hylafax-4.1beta1.tar.gz
  - added chkconfig support
  - removed libjpeg linking and dependency

%prep
%setup -n %{name}-%{version}
#%patch -p1
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
#%patch4 -p1
#%patch5
#%patch9 -p1
#%patch10 -p1
#%patch11 -p1
#%patch12 -p1
#%patch -p1
#%patch1
#%patch2 -p1

%build


# I had to resort to a little hack here. The configure script
# tries to check for the existence of libtiff by compiling a small
# 5 line program. The error is that it is not linking with 

# -ljpeg -lz -lm. I tried to set --with-LIBTIFF="-ltiff -lz -lm -ljpeg"
# but I couldn't figure out a way to do that. So I removed /usr/lib/libtiff.so
# during the configure phase and add it back after configure phase
# Let me know if there is a simpler way.
#

#./configure \
#--with-DIR_BIN=/usr/bin \
#--with-DIR_SBIN=/usr/sbin \
#--with-DIR_LIBEXEC=/usr/sbin \
#--with-DIR_LIBDATA=/usr/share/fax \
#--with-DIR_LOCKS=/var/lock \
#--with-TIFFINC=/usr/include \
#--with-TIFFBIN=/usr/bin \
#--with-DIR_MAN=/usr/man \
#--with-PATH_GSRIP=/usr/bin/gs \
#--with-DEFVRES=196 \
#--with-DBLIBINC=/usr/include \
#--with-DIR_AFM=/usr/share/fax/afm \
#--with-LIBTIFF=-ltiff \
#--with-DIR_HTML=/usr/doc/%{name}-$RPM_PACKAGE_VERSION/html \
#--with-DIR_CGI=/usr/doc/%{name}-$RPM_PACKAGE_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

./configure \
--with-PAGESIZE="ISO A4" \
--with-DIR_BIN=/usr/bin \
--with-DIR_SBIN=/usr/sbin \
--with-DIR_LIBEXEC=/usr/sbin \
--with-DIR_LIBDATA=/usr/share/fax \
--with-DIR_LOCKS=/var/lock \
--with-DIR_MAN=/usr/man \
--with-DBLIBINC=/usr/include \
--with-DIR_SPOOL=/var/spool/fax \
#--with-DSO=LINUX \
#--with-DSOSUF=so \
#--with-HTML=yes
#--with-TIFFINC=/usr/include \
#--with-TIFFBIN=/usr/bin \
#--with-PATH_GSRIP=/usr/bin/gs \
#--with-DEFVRES=98 \
#--with-DIR_AFM=/usr/share/fax/afm \
#--with-LIBTIFF=-ltiff \
#--with-DIR_HTML=/usr/doc/%{name}-$RPM_PACKAGE_VERSION/html \
#--with-DIR_CGI=/usr/doc/%{name}-$RPM_PACKAGE_VERSION/html/cgi-bin \
#--with-LIBDB=-ldb \
#--with-ZLIB=no \
#--with-ZLIBINC=. \
#--with-AFM=no \
#--with-PATH_VGETTY=/sbin/vgetty \

make 


%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/usr/doc/%{name}-${RPM_PACKAGE_VERSION} -m 755
mkdir -p $RPM_BUILD_ROOT/usr/share -m 755
for  sect in $(echo %{mansections} | sed 's/[0-9]/& /g')
#					 ^^^ split figures by blanks 
  do
    mkdir -p ${RPM_BUILD_ROOT}/usr/man/man${sect} -m 755
  done
mkdir -p $RPM_BUILD_ROOT/var/spool -m 755

mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d -m 755
install -m 644 $RPM_SOURCE_DIR/hylafax.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/hylafax
mkdir -p $RPM_BUILD_ROOT/etc/cron.daily -m 755
install -m 755 $RPM_SOURCE_DIR/hylafax_daily.cron $RPM_BUILD_ROOT/etc/cron.daily/hylafax
mkdir -p $RPM_BUILD_ROOT/etc/cron.hourly -m 755
install -m 755 $RPM_SOURCE_DIR/hylafax_hourly.cron $RPM_BUILD_ROOT/etc/cron.hourly/hylafax

make -e BIN=$RPM_BUILD_ROOT/usr/bin SBIN=$RPM_BUILD_ROOT/usr/sbin LIBDATA=$RPM_BUILD_ROOT/usr/share/fax LIBEXEC=$RPM_BUILD_ROOT/usr/sbin SPOOL=$RPM_BUILD_ROOT/var/spool/fax MAN=$RPM_BUILD_ROOT/usr/man HTMLDIR=$RPM_BUILD_ROOT/usr/doc/%{name}-$RPM_PACKAGE_VERSION/html CGIBIN=$RPM_BUILD_ROOT/usr/doc/%{name}-$RPM_PACKAGE_VERSION/html/cgi-bin install

mkdir -p $RPM_BUILD_ROOT/usr/share/fax/afm 
cd $RPM_BUILD_ROOT/usr/share/fax/afm 

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

strip  $RPM_BUILD_ROOT/usr/bin/* || echo Ignored strip on a non-binary file

cd $RPM_BUILD_ROOT
#tar xvzf $RPM_SOURCE_DIR/hylafax_startup.tgz
#cp $RPM_SOURCE_DIR/hylasetup.sh $RPM_BUILD_ROOT/var/spool/fax/bin/
#cp $RPM_SOURCE_DIR/hylaunset.sh $RPM_BUILD_ROOT/var/spool/fax/bin/
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m 755 $RPM_BUILD_DIR/hylafax-%{version}/etc/hylafax  $RPM_BUILD_ROOT/etc/rc.d/init.d/hylafax

mkdir $RPM_BUILD_ROOT/var/spool/fax/config/defaults

cp $RPM_SOURCE_DIR/config $RPM_BUILD_ROOT/var/spool/fax/config/defaults/
cp $RPM_SOURCE_DIR/config.modem $RPM_BUILD_ROOT/var/spool/fax/config/defaults/
cp $RPM_SOURCE_DIR/setup.cache $RPM_BUILD_ROOT/var/spool/fax/config/defaults/
cp $RPM_SOURCE_DIR/setup.modem $RPM_BUILD_ROOT/var/spool/fax/config/defaults/

cp $RPM_SOURCE_DIR/README.rpm $RPM_BUILD_ROOT/usr/doc/%{name}-${RPM_PACKAGE_VERSION}/

cd $RPM_BUILD_ROOT/var/spool/fax/bin
ln -s ps2fax.gs ps2fax

#The make file puts the .so file in /usr/sbin. Move them to /usr/lib
#cd $RPM_BUILD_ROOT/usr
#mkdir -p lib
#mv sbin/*.so.* lib
#mv sbin/*.so lib

# compress the man pages
for  i in  $(echo ${RPM_BUILD_ROOT}/usr/man/man?)
  do
    mkdir  $i.gz
    cp -ad $i/* $i.gz/
    gzip $i.gz/*
    cp -adu $i.gz/* $i/
  done



%post
/sbin/ldconfig
/sbin/chkconfig --add hylafax
#/var/spool/fax/bin/hylasetup.sh

%preun
#/var/spool/fax/bin/hylaunset.sh
/sbin/chkconfig --del hylafax

%postun
/sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT


%files
%attr(-,root,root) /usr/doc/%{name}-%{version}/README.rpm
%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(-,root,root) /var/spool/fax/bin/*
%attr(-,root,root) /var/spool/fax/config/*
%attr(-,root,root) /var/spool/fax/etc/dpsprinter.ps
%attr(-,root,root) /var/spool/fax/etc/cover.templ
%attr(-,root,root) /var/spool/fax/etc/dialrules*
%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

%attr(-,root,root) /etc
%attr(-,root,root) /usr/bin
%attr(-,root,root) /usr/sbin
%attr(-,root,root) /usr/share
#%attr(-,root,root) /usr/lib

#%files man
%attr(644,root,root) /usr/man/man[%{mansections}]/*.[%{mansections}]*

#%files man-gz
#%attr(644,root,root) /usr/man/man[%{mansections}]/*.[%{mansections}]*.gz

#%files htmldoc
#%attr(-,root,root) /usr/doc/%{name}-%{version}/html



Project hosted by iFAX Solutions