How to build debian package for HylaFAX

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

Installation Steps

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, extract and modify the source code based on our requirements. Below is the list of files that i modified:

  • debian/changelog
    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 <> Tue, 23 Oct 2007 14:05:00 +0800
  • debian/control
- Maintainer: Giuseppe Sacco <>
+ Maintainer: Anandharaj <>
- 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)
HylaFAX Facsimile Software

Copyright (c) 2008 MyCompany
HylaFAX is a trademark of Silicon Graphics, Inc.
  • debian/hylafax-server.templates
- Type: error
+ Type: text
  • debian/rules
    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="" \
- chmod 600 $(d_server)/etc/hylafax/hosts.hfaxd
+ chmod 644 $(d_server)/etc/hylafax/hosts.hfaxd
  • debian/watch
# to check for upstream updates and more.
version=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