What is HylaFAX?
HylaFAX is an enterprise-class system for sending and receiving facsimiles as well as for sending alpha-numeric pages.
The software is designed around a client-server architecture. Fax modems may reside on a single machine on a network and clients can submit an outbound job from any other machine on the network. Client software is designed to be lightweight and easy to port.
HylaFAX is designed to be very robust and reliable. The fax server is designed to guard against unexpected failures in the software, in the configuration, in the hardware and in general use. HylaFAX can support multiple modems and a heavy traffic load.
If you expect to send more than a few facsimiles a day, then HylaFAX is the fax package for you!
Why we need to build from scratch?
When talking about installing an application / packages in debian/ubuntu, the simple way is to use synaptic manager or “apt-get install
” from terminal. But if we compare the version with repository and the original vendor (in this case hylafax.org), the version in repository would be quite old and some packages might be classified as “universal” or “multiversal” which some people wont install in production server.
This is the situation that happen to me. In my organization, we are using Ubuntu 6.06-1 LTS and the Hylafax in repository is not the latest one. Then, i decided to compile the Hylafax from source code based on Debian / Ubuntu way. Below is the steps that i did.
The first thing you’re going to do is install a few packages with the utilities you’ll need to build packages. Obviously you need to be “root” user.
root@server:~# apt-get install build-essential dh-make devscripts fakeroot
You may also want to install a few additional packages, depending on whether you’re going to be integrating patches, and if you plan to submit packages to the Debian project. Odds are you have the patch utilities installed anyway, but if not grab the following packages:
root@server:~# apt-get install patch diff patchutils autotools-dev dpatch libpam-dev
Debian also offers automated policy checking applications called Lintian and Linda, which examine a Debian package to see if it complies with Debian policy. I think Linda is more user-friendly when describing potential errors in a package, so I’d recommend starting with it:
root@server:~# apt-get install lintian
Packages to build .deb file is installed and now we need to install the dependencies packages for Hylafax.
root@server:~# apt-get install libtiff4-dev libtiff4 libtiff-tools gs gs-common gsfonts gs-esp sharutils libpaper-utils enscript
Download the HylaFAX source code from http://www.hylafax.org, extract and modify the source code based on our requirements. Below is the list of files that i modified:
I’ve replaced everything with below
hylafax (4.4.4-cpmd-01) stable; urgency=low * Added standard debian packaging rules to upstream CVS * Changed debian/rules in order to expand pathname according to C locale -- Anandharaj <firstname.lastname@example.org> Tue, 23 Oct 2007 14:05:00 +0800
- Maintainer: Giuseppe Sacco <email@example.com> + Maintainer: Anandharaj <firstname.lastname@example.org> - Standards-Version: 4.4.2 # old version + Standards-Version: 4.4.4 # change to new version - Architecture: any # dont change if you are not sure + Architecture: amd64 # for both hylafax-server and hylafax-client section - Depends: bla bla bla, metamail + Depends: bla bla bla # remove the metamail dependency - Tag: works-with::fax, hardware::modem, bla bla bla + # remove it from all section (hylafax-server, hylafax-client, hylafax-doc)
- debian/copyright (optional)
Copyright: HylaFAX Facsimile Software Copyright (c) 2008 MyCompany HylaFAX is a trademark of Silicon Graphics, Inc.
- Type: error + Type: text
Append the following lines after –with-QPENCODE=”/usr/bin/mimencode -q” # append “/” at the end of this line
--with-PAGESIZE="ISO A4" \ --with-LIBDB="-ldb" \ --with-DBLIBINC="/usr/include" \ --with-PKG_EMAIL="email@example.com" \ --with-PKG_VENDOR="Raj2U.Net"
- chmod 600 $(d_server)/etc/hylafax/hosts.hfaxd + chmod 644 $(d_server)/etc/hylafax/hosts.hfaxd
# to check for upstream updates and more. version=4 ftp://ftp.hylafax.org/source/hylafax-4*\.tar\.gz debian uupdate
After complete the modification, run the following command:
root@server:~# debuild -us -uc
If everything goes fine without any errors, then you should see three HylaFAX packages created by the build process.
root@server:~# ls *.deb hylafax-client_4.4.4-cpmd-01_amd64.deb hylafax-doc_4.4.4-cpmd-01_all.deb hylafax-server_4.4.4-cpmd-01_amd64.deb
Now its time to install it.
root@server:~# dpkg -i hylafax-doc_4.4.4-cpmd-01_all.deb root@server:~# dpkg -i hylafax-client_4.4.4-cpmd-01_amd64.deb root@server:~# dpkg -i hylafax-server_4.4.4-cpmd-01_amd64.deb