--- hylafax-4.4.4.orig/debian/changelog
+++ hylafax-4.4.4/debian/changelog
@@ -1,9 +1,146 @@
-hylafax (2:4.3.4~cvs) unstable; urgency=low
+hylafax (2:4.4.4-7~bpo40+1) unstable; urgency=low
 
-  * Added standard debian packaging rules to upstream CVS
-  * Changed debian/rules in order to expand pathname according to C locale
+  * First backport release. remove dpkg dependency
 
- -- Giuseppe Sacco <eppesuig@debian.org>  Sat, 17 Mar 2007 16:37:44 +0100
+ -- Giuseppe Sacco <eppesuig@debian.org>  Sat, 28 Jun 2008 00:03:09 +0200
+
+hylafax (2:4.4.4-7) unstable; urgency=low
+
+  * Corrected support for hfaxd run via inetd adding a new
+    parameter HFAXD_FROM_INET in /etc/default/hylafax (Closes: #470910)
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Wed, 09 Apr 2008 14:52:35 +0200
+
+hylafax (2:4.4.4-6) unstable; urgency=low
+
+  * Added support for g++4.3 (Closes: #474899)
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Tue, 08 Apr 2008 09:55:46 +0200
+
+hylafax (2:4.4.4-5) unstable; urgency=low
+
+  * Fixed a few lintian reported errors in debian/* files
+  * Removed a bashism (Closes: #464990)
+  * Changed Makefiles in order to only link with required libraries
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Mon, 11 Feb 2008 02:19:21 +0100
+
+hylafax (2:4.4.4-4) unstable; urgency=low
+
+  * Run faxgetty daemon in background! (Closes: #464558)
+  * Removed message in /etc/init.d/hylafax about faxgetty if no
+    lines are configured.
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Fri, 08 Feb 2008 08:14:53 +0100
+
+hylafax (2:4.4.4-3) unstable; urgency=low
+
+  * Add FAXGETTYARGS="-D" in default config file. (Closes: #462459)
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Sun, 27 Jan 2008 21:56:26 +0100
+
+hylafax (2:4.4.4-2) unstable; urgency=low
+
+  * Updated standard-version to 3.7.3 (only changed binary-version in control file)
+  * Added Homepage, Vcs-Cvs, and Vcs-Browser in control file.
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Thu, 03 Jan 2008 11:25:52 +0100
+
+hylafax (2:4.4.4-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Thu, 27 Dec 2007 10:44:52 +0100
+
+hylafax (2:4.4.3-2) unstable; urgency=low
+
+  * Corrected a problem with shlibdeps on the server package
+  * Remove dependency on mimencode since now uses BASE64ENCODE, QPENCODE
+    or UUENCODE from packages sharutils or internally provided.
+  * Added scripts for b64-encode and qp-encode
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Mon, 10 Dec 2007 14:15:06 +0100
+
+hylafax (2:4.4.3-1) unstable; urgency=low
+
+  * New upstream release
+  * Removed patches already included upstream (700_trap-in-shell-scripts.dpatch)
+  * Added patch 400 for building with parallel make (-j option) on some buildd
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Thu, 06 Dec 2007 23:21:53 +0100
+
+hylafax (2:4.4.2-3) unstable; urgency=low
+
+  * Applied patch from hylafax+ in order to better control the access rights
+    on received fax queue.
+  * Change dependency from 'gs' to 'ghostscript' because of package rename
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Sat, 27 Oct 2007 19:42:50 +0200
+
+hylafax (2:4.4.2-2) unstable; urgency=low
+
+  * Remove temporary files when leaving shell scripts (Closes: #443070)
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Tue, 16 Oct 2007 00:11:39 +0200
+
+hylafax (2:4.4.2-1) unstable; urgency=low
+
+  * New upstream release
+  * Added a "syncing directories..." step in init script, in order to give an
+    initial status progress on very slow machines.
+  * Removed patch 700_* because already included in new upstream source.
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Sat, 13 Oct 2007 12:59:47 +0200
+
+hylafax (2:4.4.1-2) unstable; urgency=low
+
+  * Added a few notes about PAM authentication in README.Debian
+  * Changed init script in order to wait more time for daemon shutdown
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Thu, 23 Aug 2007 22:33:14 +0200
+
+hylafax (2:4.4.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Fixes problem with PNG rule using \x in typerules (Closes: #425191)
+  * Reworked patch 700_man_typos.dpatch in order to olny fix mispelled words
+  * Removed a bashish from postinst
+  * Removed recommends on metamail since hylafax-server now depends on metamail
+  * Added lsb section to /etc/init.d/hylafax
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Thu, 23 Aug 2007 00:02:24 +0200
+
+hylafax (2:4.4.0-2) unstable; urgency=low
+
+  * Added pt translation (Closes: #435734)
+  * Fixed a lot of typos in manual pages (Closes: #437970, #437971, #437972, #437973, #437974, #437975, #437976, #437985, #437986, #437987, #437988, #437989, #437990, #437991, #437992, #437993, #437994, #437995, #437996)
+  * Used ispell on all manual pages.
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Wed, 15 Aug 2007 14:52:34 +0200
+
+hylafax (2:4.4.0-1) unstable; urgency=low
+
+  * New upstream release
+  * Shipped /usr/sbin/lockname that was missing from previous debian packages
+  * Remove unnecessary patches already included upstream
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Wed, 08 Aug 2007 21:46:46 +0200
+
+hylafax (2:4.3.4-2) unstable; urgency=low
+
+  * Added spanish debconf translation (Closes: #423677)
+  * Check for userdel command in postrm (Closes: #431578)
+  * Correct BASE64ENCODE during upgrade (Closes: #429614)
+  * Added support for IMPRIP converter (Closes: #420266)
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Wed, 04 Jul 2007 14:26:52 +0200
+
+hylafax (2:4.3.4-1) unstable; urgency=low
+
+  * New upstream release
+  * Added psrip in suggested packages for hylafax-server
+
+ -- Giuseppe Sacco <eppesuig@debian.org>  Fri, 15 Jun 2007 22:30:45 +0200
 
 hylafax (2:4.3.3-1) unstable; urgency=low
 
--- hylafax-4.4.4.orig/debian/NEWS
+++ hylafax-4.4.4/debian/NEWS
@@ -1,37 +1,37 @@
 hylafax (2:4.3.0-9) unstable; urgency=low
 
-This new version uses lsb functions to manage start/stop daemons output, and
-it also changes the FROM address of all emails that are now from "faxmaster".
-If you wish to change it, you may as usual, customize /etc/hylafax/FaxNotify
-and add FROMADDR="username@domain.tld".
+  This new version uses lsb functions to manage start/stop daemons output, and
+  it also changes the FROM address of all emails that are now from "faxmaster".
+  If you wish to change it, you may as usual, customize /etc/hylafax/FaxNotify
+  and add FROMADDR="username@domain.tld".
 
  -- Giuseppe Sacco <eppesuig@debian.org>  Tue, 19 Sep 2006 09:48:04 +0200
 
 hylafax (2:4.3.0-4) unstable; urgency=low
 
-This Debian version of hylafax will support PAM.  To enable such support,
-you need to install an appropriate file under /etc/pam.d/.  An example
-of such a file is in /usr/share/doc/hylafax-server/examples/.
+  This Debian version of hylafax will support PAM.  To enable such support,
+  you need to install an appropriate file under /etc/pam.d/.  An example
+  of such a file is in /usr/share/doc/hylafax-server/examples/.
 
  -- Giuseppe Sacco <eppesuig@debian.org>  Thu,  13 Jun 2006 12:34:14 +0200
 
 hylafax (2:4.3.0-1) unstable; urgency=low
 
-All versions of hylafax disabled PAM when installed.
-This new version ships a very simple configuration file
-in /usr/share/doc/hylafax-server/examples/pam-hylafax. To enable
-PAM support just copy this file in /etc/pam.d and name it hylafax.
+  All versions of hylafax disabled PAM when installed.
+  This new version ships a very simple configuration file
+  in /usr/share/doc/hylafax-server/examples/pam-hylafax. To enable
+  PAM support just copy this file in /etc/pam.d and name it hylafax.
 
  -- Giuseppe Sacco <eppesuig@debian.org>  Thu,  1 Jun 2006 11:49:11 +0200
 
 hylafax (1:4.2.1-1) unstable; urgency=high
 
-Many hylafax installations have insecure entries in hosts.hfaxd.  The
-problem is that if you enter "username" it will also match
-"otherusername"; "host" will also match "hostname".
+  Many hylafax installations have insecure entries in hosts.hfaxd.  The
+  problem is that if you enter "username" it will also match
+  "otherusername"; "host" will also match "hostname".
 
-Unless you intend such behavior, you should modify your hosts.hfaxd to
-use start and end delimiters as in the following examples:
+  Unless you intend such behavior, you should modify your hosts.hfaxd to
+  use start and end delimiters as in the following examples:
 
   @192.168.0.[0-9]+$
   ^username@:uid:pass:adminpass
@@ -41,68 +41,68 @@
 
 hylafax (1:4.2.0-16) unstable; urgency=medium
 
-A script for storing cover pages is now added in the
-/usr/share/doc/hylafax-server/examples directory. It should be
-called in place of the supplied faxsend. It will merge the
-cover page and the document and then call the real faxsend.
-
-This workaround is taken from hylafax bug #603
-(http://bugs.hylafax.org/bugzilla/show_bug.cgi?id=603)
-but it should be pointed that this is not really a bug, while a
-wish that my users hope to be accepted by hylafax authors.
-
-In order to use it, just copy it in any directory, like
-/usr/local/bin/retainfaxcover.sh and add the following line to
-/etc/hylafax/config:
+  A script for storing cover pages is now added in the
+  /usr/share/doc/hylafax-server/examples directory. It should be
+  called in place of the supplied faxsend. It will merge the
+  cover page and the document and then call the real faxsend.
+
+  This workaround is taken from hylafax bug #603
+  (http://bugs.hylafax.org/bugzilla/show_bug.cgi?id=603)
+  but it should be pointed that this is not really a bug, while a
+  wish that my users hope to be accepted by hylafax authors.
+
+  In order to use it, just copy it in any directory, like
+  /usr/local/bin/retainfaxcover.sh and add the following line to
+  /etc/hylafax/config:
 
   SendFaxCmd /usr/local/bin/retainfaxcover.sh
 
-the restart hylafax calling '/etc/init.d/hylafax force-reload'
+  the restart hylafax calling '/etc/init.d/hylafax force-reload'
 
  -- Giuseppe Sacco <eppesuig@debian.org>  Tue, 14 Dec 2004 16:53:10 +0100
 
 hylafax (1:4.2.0-8) unstable; urgency=low
 
-The new init script that starts and stop hylafax have been changed
-in order to better handle upgrade from previous versions of the sarge
-package. This means that after calling start-stop-daemon, the script
-will check if processes are still pending and will try to kill them.
-
-I believe that this might be a problem if you are running many hylafax
-servers in parallel (i.e., in different chroot environment). If you
-happen to fall in ths case then please use the old script or modify
-the new one.
+  The new init script that starts and stop hylafax have been changed
+  in order to better handle upgrade from previous versions of the sarge
+  package. This means that after calling start-stop-daemon, the script
+  will check if processes are still pending and will try to kill them.
+
+  I believe that this might be a problem if you are running many hylafax
+  servers in parallel (i.e., in different chroot environment). If you
+  happen to fall in ths case then please use the old script or modify
+  the new one.
 
  -- Giuseppe Sacco <eppesuig@debian.org>  Tue, 12 Oct 2004 13:45:23 +0200
 
 hylafax (1:4.2.0-7) unstable; urgency=low
 
-Two Directories
-----------------
+  Two Directories
+  ----------------
 
-In Debian Sarge release of hylafax, the client and server packages
-have been completely reworked in order to fix many important bugs.
+  In Debian Sarge release of hylafax, the client and server packages
+  have been completely reworked in order to fix many important bugs.
 
-The major refactoring completely separated the environment where
-the server run from the host machine. The server is run in a 
-chroot environment starting at /var/spool/hylafax.
-
-Since Debian policy requires that all configuration files must
-be put in /etc, the chroot environment can not access them.
-Hylafax used to be able to do so via links from 
-/var/spool/hylafax/etc.
-
-The two directories /var/spool/hylafax/etc and /etc/hylafax must
-always contain identical files. All programs that update these files,
-now update both copies at once.
-
-Every file is "resynced" when the server starts, but to be more
-safe in order to never overwrite a potencial "good" file, I decided
-to write a statement about files not in sync and
-ask for a bug report during the execution of /etc/init.d/hylafax.
-The master copy of the files is /etc/hylafax when the server starts
-via /etc/init.d/hylafax, but switch to /var/spool/hylafax/etc when
-the server is running.
+  The major refactoring completely separated the environment where
+  the server run from the host machine. The server is run in a 
+  chroot environment starting at /var/spool/hylafax.
+
+  Since Debian policy requires that all configuration files must
+  be put in /etc, the chroot environment can not access them.
+  Hylafax used to be able to do so via links from 
+  /var/spool/hylafax/etc.
+
+  The two directories /var/spool/hylafax/etc and /etc/hylafax must
+  always contain identical files. All programs that update these files,
+  now update both copies at once.
+
+  Every file is "resynced" when the server starts, but to be more
+  safe in order to never overwrite a potencial "good" file, I decided
+  to write a statement about files not in sync and
+  ask for a bug report during the execution of /etc/init.d/hylafax.
+  The master copy of the files is /etc/hylafax when the server starts
+  via /etc/init.d/hylafax, but switch to /var/spool/hylafax/etc when
+  the server is running.
 
  -- Giuseppe Sacco <eppesuig@debian.org>  Wed,  4 Sep 2004 07:54:00 +0200
 
--- hylafax-4.4.4.orig/debian/README.Debian
+++ hylafax-4.4.4/debian/README.Debian
@@ -15,11 +15,6 @@
 * hylafax-client:  the tools necessary to operate a local or remote HylaFAX
   server.  Install this package on networked clients.
 
-* hylafax-doc:     HTML documentation on HylaFAX.  Please note, that
-  hylafax-server and hylafax-client come with manpages for the programs they
-  contain, whereas this is a more extensive manual.
-
-
 1. Quick Start
 --------------
 
@@ -150,7 +145,7 @@
 9. PAM support
 --------------
 
-This Debian version of hylafax will support PAM.  To enable such support,
+This Debian version of hylafax supports PAM.  To enable such support,
 you need to install an appropriate file under /etc/pam.d/.  An example
 of such a file is in /usr/share/doc/hylfax-server/examples/.
 
@@ -158,8 +153,14 @@
 have to use faxadduser, faxdeluser to modify hosts.hfaxd. All account
 known to the system via PAM will be accepted as normal user.
 
-Please note that remote administration isn't managed via PAM, so you
-may still have to setup an ADMIN password with faxadduser.
+When PAM authentication is used, you may optionally create a unix group
+that will have admin rights on hylafax. If you setup such group than add
+it in /etc/hylafax/config with "AdminGroup: groupname".
+
+Please note that if you are storing your passwords in /etc/shadow, you
+have to add the uucp user to the shadow group, otherwise the hylafax
+daemon will not be able to check the passwords. If your PAM uses an
+LDAP as backend, then this is not required.
 
 10. e-mail encoding
 -------------------
--- hylafax-4.4.4.orig/debian/control
+++ hylafax-4.4.4/debian/control
@@ -2,17 +2,18 @@
 Maintainer: Giuseppe Sacco <eppesuig@debian.org>
 Section: comm
 Priority: extra
-Standards-Version: 3.7.2
-Build-Depends: debhelper (>= 4.1.16), libtiff4-dev (>= 3.6.1-3), libtiff-tools (>= 3.6.1-3), zlib1g-dev (>= 0.95), ed, autotools-dev, dpatch, libpam-dev, gsfonts, gs, bash
+Standards-Version: 3.7.3
+Homepage: http://www.hylafax.org
+Vcs-Cvs: :pserver:cvs@cvs.hylafax.org:/cvsroot
+Vcs-Browser: http://git.hylafax.org/HylaFAX
+Build-Depends: debhelper (>= 4.1.16), libtiff4-dev (>= 3.6.1-3), libtiff-tools (>= 3.6.1-3), zlib1g-dev (>= 0.95), ed, autotools-dev, dpatch, libpam-dev | libpam0g-dev, gsfonts, ghostscript | gs
 
 Package: hylafax-server
 Architecture: any
 Section: comm
-Depends: ${shlibs:Depends}, ${misc:Depends}, libtiff-tools (>= 3.6.1-3), hylafax-client (= ${Source-Version}), mailx, psmisc, sed (>= 4.1.2), gs, sharutils, adduser, lsb-base (>= 3.0-6), metamail
-Recommends: metamail
-Suggests: hylafax-doc, mgetty
+Depends: ${shlibs:Depends}, ${misc:Depends}, libtiff-tools (>= 3.6.1-3), hylafax-client (= ${binary:Version}), mailx, psmisc, sed (>= 4.1.2), ghostscript | gs, adduser, lsb-base (>= 3.0-6)
+Suggests: mgetty, psrip
 Conflicts: mgetty-fax, capi4hylafax (<< 1:01.02.03-4)
-Tag: works-with::fax, hardware::modem, interface::daemon, works-with::mail, network::server, implemented-in::c++, interface::commandline, use::transmission, role::program
 Description: Flexible client/server fax software - server daemons
  This package support the sending and receiving of facsimiles, the polled
  retrieval of facsimiles and the send of alphanumeric pages.
@@ -30,20 +31,8 @@
 Suggests: mgetty-viewfax
 Recommends: netpbm, transfig
 Conflicts: mgetty-fax
-Tag: works-with::fax, implemented-in::c++, network::client, interface::commandline, use::transmission, role::program, scope::application
 Description: Flexible client/server fax software - client utilities
  The HylaFAX client software communicates with a HylaFAX server via TCP/IP.
  .
  HylaFAX support the sending and receiving of facsimiles, the polled
  retrieval of facsimiles and the send of alphanumeric pages.
-
-Package: hylafax-doc
-Architecture: all
-Section: doc
-Suggests: www-browser, man2html, httpd-cgi
-Tag: hardware::modem, interface::commandline, made-of::data:html, role::documentation, use::transmission, works-with::fax
-Description: Flexible client/server fax software - HTML Documentation
- HTML version of HylaFAX documentation and manpages.
- .
- HylaFAX support the sending and receiving of facsimiles, the polled
- retrieval of facsimiles and the send of alphanumeric pages.
--- hylafax-4.4.4.orig/debian/hylafax-server.hylafax.default
+++ hylafax-4.4.4/debian/hylafax-server.hylafax.default
@@ -8,6 +8,10 @@
 	USE_FAXGETTY=yes
 fi
 
+# Arguments for faxgetty command. At least -D should be specified
+# as explained in debian bug #462459.
+FAXGETTYARGS="-D"
+
 # In a send only installation you may want to use faxgetty
 # or faxmodem on lines already configured with faxaddmodem.
 # faxgetty is the new default, faxmodem the old one.
@@ -45,3 +49,8 @@
 # NEWPROT="-i 4559"
 # SNPP="-s 444"
 
+#
+# hfaxd may be run from inetd while faxq should still be executed
+# by the init script. If you run hfax via inetd or xinetd then
+# uncomment the following line
+# HFAXD_FROM_INET=true
--- hylafax-4.4.4.orig/debian/hylafax-server.hylafax.init
+++ hylafax-4.4.4/debian/hylafax-server.hylafax.init
@@ -6,6 +6,20 @@
 # It is driver by a configuration file sourced by this shell
 # and called /etc/default/hylafax.
 
+### BEGIN INIT INFO
+# Provides:          hylafax
+# Required-Start:    $syslog
+# Required-Stop:     $syslog
+# Should-Start:      $local_fs $network
+# Should-Stop:       $local_fs $network
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start and stop the hylafax server
+# Description:       Synchronize the /etc/hylafax directory with
+#                    /var/spool/hylafax/etc and then start hylafax
+#		     daemons. Otherwise stop all hylafax daemons.
+### END INIT INFO
+
 # 28-Dec-2003 Ross Boylan
 # Add "init" option to USE_FAXGETTY
 # This will cause this script to assume that faxgetty is already
@@ -57,12 +71,15 @@
   exit 1
 fi
 
-if [ -z "$OLDPROT$NEWPROT$SNPP" ]
+if [ -z "$OLDPROT$NEWPROT$SNPP" -a "$1" != stop ]
 then
-  echo "You must specify at least one protocol OLD, NEW or SNPP in"
-  echo "/etc/hylafax/setup.cache using the command faxsetup,"
-  echo "otherwise you might only run hylafax via inetd."
-  exit 1
+  if [ -z "$HFAXD_FROM_INET" -o "$HFAXD_FROM_INET" != true ]
+  then
+    echo "You must specify at least one protocol OLD, NEW or SNPP in"
+    echo "/etc/hylafax/setup.cache using the command faxsetup,"
+    echo "otherwise you might only run hylafax via inetd."
+    exit 1
+  fi
 fi
 
 if [ -r /etc/default/hylafax ]; then
@@ -206,12 +223,12 @@
         killall faxgetty 2> /dev/null || true
     fi
 
-    # wait maximum three seconds for server processes to shutdown
+    # wait maximum sixty seconds for server processes to shutdown
     try=0
-    while [ $try -lt 3 -a 0 -lt $(ps --no-headers -Chfaxd,faxq | wc -l) ]
+    while [ $try -lt 60 ] && [ 0 -lt $(ps --no-headers -Chfaxd,faxq | wc -l) ]
     do
        sleep 1
-       try=$((try+1))
+       try=$(($try+1))
     done
 
     if [ 0 -eq "$(ps --no-headers -Chfaxd,faxq | wc -l)" ]
@@ -233,22 +250,26 @@
 
     if [ $count -eq 0 ];
     then
+      log_daemon_msg "Starting HylaFAX" "syncing directories..."
       copy_slash_etc
-      log_daemon_msg "Starting HylaFAX" faxq
+      log_progress_msg "faxq"
       start-stop-daemon --start --exec /usr/sbin/faxq
 
-      log_progress_msg "hfaxd"
-      start-stop-daemon --start --exec /usr/sbin/hfaxd -- $BINDTO $NEWPROT $OLDPROT $SNPP
+      if [ -z "$HFAXD_FROM_INET" -o "$HFAXD_FROM_INET" != true ]
+      then
+        log_progress_msg "hfaxd"
+        start-stop-daemon --start --exec /usr/sbin/hfaxd -- $BINDTO $NEWPROT $OLDPROT $SNPP
+      fi
 
       cd ${HYLAFAX_HOME}/etc
       devices="`echo_fax_devices`"
-      if [ ${USE_FAXGETTY} = "yes" ]; then
+      if [ ${USE_FAXGETTY} = "yes" ] && [ -n "$devices" ]; then
         log_progress_msg "faxgetty"
         for device in $devices none; do
           [ "$device" = none ] && continue
-          ${FAXGETTY} `echo $device | cut -d . -f 2` >/dev/null 2>&1 </dev/null &
+          ${FAXGETTY} $FAXGETTYARGS `echo $device | cut -d . -f 2` &
         done
-      elif [ ${USE_FAXGETTY} != "init" ]; then
+      elif [ ${USE_FAXGETTY} != "init" ] && [ -n "$devices" ]; then
         log_progress_msg "faxmodem"
         for device in $devices none; do
           [ "$device" = none ] && continue
--- hylafax-4.4.4.orig/debian/hylafax-server.postinst
+++ hylafax-4.4.4/debian/hylafax-server.postinst
@@ -179,12 +179,8 @@
 
 	setupcache=/etc/hylafax/setup.cache
 	[ ! -e $setupcache ] && setupcache=/var/spool/hylafax/etc/setup.cache
-	sed -i -e 's@^\(DPSRIP\|IMPRIP\)=.*$@\1=@' $setupcache
+	sed -i -e 's@^DPSRIP=.*$@DPSRIP=@' $setupcache
 	sed -i -e "s@^AWK='/bin/awk'@AWK='/usr/bin/awk'@" $setupcache
-	sed -i -e "s@^MIMENCODE='base64-encode'@MIMENCODE='/usr/bin/mimencode'@" $setupcache
-	sed -i -e "s@^MIMENCODE='/usr/bin/base64-encode'@MIMENCODE='/usr/bin/mimencode'@" $setupcache
-	sed -i -e "s@^MIMENCODE='/usr/bin/uuencode'@MIMENCODE='/usr/bin/mimencode'@" $setupcache
-	sed -i -e "s@^BASE64ENCODE='/usr/bin/uuencode'@BASE64ENCODE='/usr/bin/mimencode'@" $setupcache
 	sed -i -e "s@^ENCODING=''@ENCODING='base64'@" $setupcache
 	sed -i -e "s@^MANDIR='/usr/local/man'@MANDIR='/usr/share/man'@" $setupcache
 	sed -i -e "s@^FONTPATH='/usr/local/lib/ghostscript/common:/usr/local/lib/ghostscript/7.07:/usr/local/lib/ghostscript/fonts:/usr/local/share/ghostscript/common:/usr/local/share/ghostscript/7.07:/usr/local/share/ghostscript/fonts:/var/lib/defoma/gs.d/dirs/fonts:/usr/share/ghostscript/common:/usr/share/gs/7.07'@FONTPATH='/usr/share/enscript/afm:/usr/share/fonts/afms/adobe:/usr/share/fonts/type1/gsfonts'@" $setupcache
@@ -203,16 +199,23 @@
 		fi
 	fi
 
-	[ -x /usr/bin/tty ] && grep -q '^TTYCMD=' $setupcache || echo "TTYCMD='/usr/bin/tty'" >> $setupcache
+	# bug #429614
+	# check for uuencode used for base64encoding. Change it to use mimencode
+	if [ -x /usr/bin/mimencode ]
+	then
+		sed -i -e "s@BASE64ENCODE='/usr/bin/uuencode'@BASE64ENCODE='/usr/bin/mimencode'@" $setupcache
+		sed -i -e "s@BASE64ENCODE='/usr/bin/uuencode -m ===='@BASE64ENCODE='/usr/bin/mimencode'@" $setupcache
+	fi
 
-	enc1=$(grep MIMENCODING $setupcache | sed "s/^MIMENCODE='\(.*\)'$/\1/")
-	enc2=$(grep UUENCODE $setupcache | sed "s/^UUENCODE='\(.*\)'$/\1/")
-	if [ ! -x "$enc1" -a ! -x "$enc2" ]
+	# bug #425191
+	# Update psrip path
+	if [ -x /usr/bin/psrip ]
 	then
-		db_input medium hylafax-server/attachment || true
-		db_go
+		sed -i -e "s@IMPRIP='/usr/lib/print/psrip'@IMPRIP='/usr/bin/psrip'@" $setupcache
 	fi
 
+	[ -x /usr/bin/tty ] && grep -q '^TTYCMD=' $setupcache || echo "TTYCMD='/usr/bin/tty'" >> $setupcache
+
 	if invoke-rc.d hylafax stop 
 	then
 		restart=true
@@ -220,7 +223,29 @@
 		restart=false
 	fi
 	(echo; echo no; echo no) | /usr/sbin/faxsetup -server
-#	[ $restart == true ] && invoke-rc.d hylafax start
+#	[ $restart = true ] && invoke-rc.d hylafax start
+
+	# fix default values set by faxsetup without check on the real presence
+	# of the binary executable
+
+	uuenc=$(grep '^UUENCODE=' $setupcache | sed -e "s/^UUENCODE='\(.*\)'$/\1/" | (read a b; echo $a))
+	mmenc=$(grep '^MIMENCODE=' $setupcache | sed -e "s/^MIMENCODE='\(.*\)'$/\1/" | (read a b; echo $a))
+	baenc=$(grep '^BASE64ENCODE=' $setupcache | sed -e "s/^BASE64ENCODE='\(.*\)'$/\1/" | (read a b; echo $a))
+
+	if [ ! -x "$uuenc" ]
+	then
+		sed -i -e "s@UUENCODE='.*'@UUENCODE=''@" $setupcache
+	fi
+
+	if [ ! -x "$mmenc" ]
+	then
+		sed -i -e "s@MIMENCODE='.*'@MIMENCODE=''@" $setupcache
+	fi
+
+	if [ ! -x "$baenc" ]
+	then
+		sed -i -e "s@BASE64ENCODE='.*'@BASE64ENCODE=''@" $setupcache
+	fi
 
 	#
 	# Tell the user that he must use faxaddmodem in order to really use
@@ -251,7 +276,7 @@
 		# wrong and the server is not starting
 		# Closes: #357435
 		invoke-rc.d hylafax start || true
-	elif [ $restart == true ]; then
+	elif [ $restart = true ]; then
 		invoke-rc.d hylafax start
 	fi
 
--- hylafax-4.4.4.orig/debian/hylafax-server.postrm
+++ hylafax-4.4.4/debian/hylafax-server.postrm
@@ -2,10 +2,12 @@
 
 #DEBHELPER#
 
+USERDEL=/usr/sbin/userdel
+
 if [ "$1" = purge ]; then
     if getent passwd faxmaster >/dev/null 2>&1
     then
-	userdel faxmaster
+	[ -x $USERDEL ] && $USERDEL faxmaster
     fi
     # 
     # This will remove the directory that holds a copy of the real
--- hylafax-4.4.4.orig/debian/hylafax-server.templates
+++ hylafax-4.4.4/debian/hylafax-server.templates
@@ -6,16 +6,6 @@
  start it later manually, remember to change the value of RUN_HYLAFAX
  in /etc/default/hylafax.
 
-Template: hylafax-server/attachment
-Type: error
-_Description: Check base64 encoders
- Hylafax is able to send received faxes via email. These emails
- need to include base64 encoded attachments. Since this is not essential
- to hylafax to work, you need to do manually some further steps:
- you should install a package that provide encoders (like
- mime-codecs or sharutils) and run 'faxsetup -server' that will
- automatically check for those encoders and change its configuration.
-
 Template: hylafax-server/setup_failed
 Type: error
 _Description: Hylafax setup failed
--- hylafax-4.4.4.orig/debian/rules
+++ hylafax-4.4.4/debian/rules
@@ -5,7 +5,6 @@
 #export DH_VERBOSE=1
 
 export SHELL=/bin/bash
-export DH_COMPAT=4
 
 CFLAGS = -g
 
@@ -22,6 +21,7 @@
 configure-stamp: patch-stamp
 	cp -p /usr/share/misc/config.* .
 	yes | /bin/bash ./configure \
+		--with-HTML=yes \
 		--with-UTMP=auto \
 		--with-DIR_BIN="/usr/bin" \
 		--with-DIR_LIBDATA="/etc/hylafax" \
@@ -32,6 +32,9 @@
 		--with-DIR_LOCKS="/var/lock" \
 		--with-PATH_AFM="/usr/share/fonts/type1/gsfonts" \
 		--with-FONTMAP="/usr/share/gs-esp/8.15/lib:/usr/share/gs-esp/7.07/lib:/usr/share/gs/6.53" \
+		--with-DIR_HTML="/usr/share/doc/hylafax" \
+		--with-DIR_CGI="/usr/lib/cgi-bin" \
+		--with-HTMLPATH="/doc/hylafax" \
 		--with-SYSGID="root" \
 		--with-SYSUID="root" \
 		--with-PATH_GETTY="/etc/hylafax/getty-link" \
@@ -47,23 +50,23 @@
 		--with-LIBZ="-lz" \
 		--with-ZLIBINC="-I/usr/include" \
 		--with-CONFIG_MAXGID="65534" \
-		--with-AWK="/usr/bin/awk" \
 		--with-CMP="/usr/bin/cmp" \
 		--with-COL="/usr/bin/col" \
 		--with-MKFIFO="/usr/bin/mkfifo" \
 		--with-SORT="/usr/bin/sort" \
 		--with-OPTIMIZER="$(CFLAGS)" \
-		--with-FUSER="/bin/fuser" \
 		--with-MANDIR="/usr/share/man" \
-		--with-IMPRIP="/usr/bin/psrip" \
-		--with-BASE64ENCODE="/usr/bin/mimencode" \
-		--with-MIMENCODE="/usr/bin/mimencode" \
-		--with-UUENCODE="/usr/bin/uuencode" \
-		--with-QPENCODE="/usr/bin/mimencode -q"
+		--with-PATH_IMPRIP="/usr/bin/psrip"
+#		--with-FUSER="/bin/fuser" \
+#		--with-AWK="/usr/bin/awk" \
+#		--with-BASE64ENCODE="/usr/bin/mimencode" \
+#		--with-MIMENCODE="/usr/bin/mimencode" \
+#		--with-UUENCODE="/usr/bin/uuencode" \
+#		--with-QPENCODE="/usr/bin/mimencode -q"
 
 	touch configure-stamp
 
-build: build-arch build-indep
+build: build-arch
 
 build-arch: build-arch-stamp
 build-arch-stamp: configure-stamp
@@ -71,15 +74,11 @@
 	$(MAKE) all
 	touch build-arch-stamp
 
-build-indep: build-indep-stamp
-build-indep-stamp: configure-stamp
-	touch build-indep-stamp
-
 clean: clean1 unpatch
 clean1:
 	dh_testdir
 	dh_testroot
-	rm -f build-arch-stamp build-indep-stamp configure-stamp
+	rm -f build-arch-stamp configure-stamp
 	[ ! -f Makefile ] || make distclean
 	[ ! -d man/cman.apps ] \
 	    || rmdir man/cman.apps man/cman.files man/sman.apps man/sman.files
@@ -91,19 +90,11 @@
 PWD		:= $(shell pwd)
 p_client	= hylafax-client
 p_server	= hylafax-server
-p_doc		= hylafax-doc
 
 d_client	= debian/$(p_client)
 d_server	= debian/$(p_server)
-d_doc		= debian/$(p_doc)
 
-install: install-server install-client install-doc
-install-doc:
-	dh_testdir
-	dh_testroot
-	dh_clean -k -p$(p_doc)
-	dh_installdirs -p$(p_doc) \
-		usr/share/doc/$(p_doc)
+install: install-client install-server
 
 install-server:
 	dh_testdir
@@ -127,6 +118,7 @@
 	    $(d_server)/etc/hylafax/.
 	cp -p debian/hylafax.config $(d_server)/etc/hylafax/config
 	cp -pR etc/templates $(d_server)/etc/hylafax/
+	rm -r $(d_server)/etc/hylafax/templates/html-sample1
 
 	cp -p util/{faxmsg,faxconfig,faxmodem,faxstate,faxwatch} \
 		util/{faxinfo,tiffcheck,typetest,dialtest,faxadduser,faxdeluser} \
@@ -135,6 +127,7 @@
 		faxd/choptest \
 		hfaxd/hfaxd \
 		etc/ondelay \
+		etc/lockname \
 	    $(d_server)/usr/sbin/.
 	for i in \
 	  util/xferfaxstats.sh util/recvstats.sh util/faxcron.sh \
@@ -146,14 +139,15 @@
 	for i in \
 	  util/{ps2fax.gs.sh,pdf2fax.gs.sh,pcl2fax.sh,tiff2fax.sh,tiff2pdf.sh} \
 	  util/{archive.sh,notify.sh,notify-4.1.sh,faxrcvd.sh,pollrcvd.sh,mkcover.sh,wedged.sh} \
-	  util/{common-functions.sh,dictionary.sh}; \
+	  util/{common-functions.sh,dictionary.sh,qp-encode.awk,b64-encode.awk}; \
 	do \
 	  b=`basename $$i .sh`; \
 	  install -p $$i $(d_server)/var/spool/hylafax/bin/$$b; \
 	done
 	install -p util/notify.awk $(d_server)/var/spool/hylafax/bin/.
+	chmod a-x $(d_server)/var/spool/hylafax/bin/{dictionary,common-functions}
 
-	env LC_ALL=C LANG=C sh -c "cp -p config/[a-z]* $(d_server)/var/spool/hylafax/config/."
+	cp -p config/[a-z]* $(d_server)/var/spool/hylafax/config/.
 
 	ln -sf faxmsg $(d_server)/usr/sbin/faxanswer
 	ln -sf faxmsg $(d_server)/usr/sbin/faxabort
@@ -184,7 +178,7 @@
 	dh_installexamples -p$(p_server) debian/examples/*
 
 	install --mode=a+rx -p debian/copy_configuration_from_spool $(d_server)/usr/lib/hylafax/bin/
-	dh_install
+	dh_install -p$(p_server) --list-missing
 
 install-client:
 	dh_testdir
@@ -239,26 +233,10 @@
 	# needed by sendfax ...
 	mkdir -p $(d_client)/usr/sbin
 	ln -sf ../bin/textfmt $(d_client)/usr/sbin/textfmt
-	dh_install
-
-# Build architecture independant packages using the common target.
-binary-indep: build-indep install-doc
-	dh_testdir
-	dh_testroot
-	dh_installdocs -i -A \
-		debian/README.mgetty debian/README.Debian \
-		TODO CONTRIBUTORS
-	dh_installchangelogs -i doc/RELEASENOTES-4.4.txt
-	dh_installexamples -i
-	dh_compress -i
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
+	dh_install -p$(p_client) --list-missing
 
 # Build architecture dependant packages using the common target.
-binary-arch: build-arch install-server install-client
+binary-arch: build-arch install-client install-server
 	dh_testdir
 	dh_testroot
 	dh_installchangelogs -a doc/RELEASENOTES-4.4.txt
@@ -294,7 +272,7 @@
 		debian/hylafax-client/usr/bin/sendfax \
 		debian/hylafax-client/usr/bin/sendpage \
 		debian/hylafax-client/usr/bin/textfmt
-	dh_shlibdeps -phylafax-server \
+	dh_shlibdeps -L libfaxutil -phylafax-server \
 		debian/hylafax-server/usr/sbin/choptest \
 		debian/hylafax-server/usr/sbin/cqtest \
 		debian/hylafax-server/usr/sbin/dialtest \
@@ -312,6 +290,7 @@
 		debian/hylafax-server/usr/sbin/faxwatch \
 		debian/hylafax-server/usr/sbin/hfaxd \
 		debian/hylafax-server/usr/sbin/ondelay \
+		debian/hylafax-server/usr/sbin/lockname \
 		debian/hylafax-server/usr/sbin/pagesend \
 		debian/hylafax-server/usr/sbin/tagtest \
 		debian/hylafax-server/usr/sbin/tiffcheck \
@@ -323,5 +302,5 @@
 
 include /usr/share/dpatch/dpatch.make
 
-binary: binary-arch binary-indep
-.PHONY: build clean clean1 binary-indep binary-arch binary install install-client install-server install-doc configure patch unpatch
+binary: binary-arch
+.PHONY: build clean clean1 binary-arch binary install install-client install-server configure patch unpatch
--- hylafax-4.4.4.orig/debian/patches/00list
+++ hylafax-4.4.4/debian/patches/00list
@@ -1,3 +1,4 @@
+400_parallel_makefile.dpatch
 500_two_dirs_config.dpatch
 600_setupclient.dpatch
 602_xferstat.dpatch
@@ -8,9 +9,8 @@
 654_faxsetup_gs.dpatch
 655_faxaddmodem_message.dpatch
 657_typerules.dpatch
-658_oldnotify_awk
-659_notify_from_address
-#670_patch_desireddf_bug402171.dpatch
-#671_grep_in_notify.dpatch
-#672_ps2pdf_output.dpatch
-#673_configure_quote_commands.dpatch
+658_oldnotify_awk.dpatch
+659_notify_from_address.dpatch
+#700_trap-in-shell-scripts.dpatch
+701_RecvqProtection.dpatch
+702_g++4.3_support.dpatch
--- hylafax-4.4.4.orig/debian/patches/602_xferstat.dpatch
+++ hylafax-4.4.4/debian/patches/602_xferstat.dpatch
@@ -2,7 +2,7 @@
 ##  by Giuseppe Sacco <eppesuig@debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description
+## DP: change directory for xferfaxstats file
 
 if [ $# -lt 1 ]; then
     echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
@@ -73,6 +73,22 @@
  in the spooling area, unless filenames are
  specified on the command line.
  .PP
+@@ -149,13 +149,13 @@
+ .TP
+ .B \-nomap
+ Do not perform the account name mapping by which
+-statistics for the ``root'' and ``guest'' acounts are 
++statistics for the ``root'' and ``guest'' accounts are 
+ merged and leading hostname part of domain names are stripped.
+ This is the default behavior.
+ .TP
+ .B \-map
+ Perform the account name mapping by which
+-statistics for the ``root'' and ``guest'' acounts are 
++statistics for the ``root'' and ``guest'' accounts are 
+ merged and leading hostname part of domain names are stripped.
+ .TP
+ .B \-send*
 @@ -198,7 +198,7 @@
  .nf
  .ta \w'${SPOOL}    'u
--- hylafax-4.4.4.orig/debian/patches/657_typerules.dpatch
+++ hylafax-4.4.4/debian/patches/657_typerules.dpatch
@@ -37,19 +37,20 @@
  0	short		017436		error	packed data support not configured
  0	short		017635		error	compressed data support not configured
  0	short		0x0506		ps	showcase -p -f %i
-@@ -107,7 +106,10 @@
+@@ -107,7 +106,11 @@
  0	short		0xf702		ps	dvips -q -o %o %i
  0	string		GIF		tiff
  >3	string		87a		tiff	gif2tiff -%f -v %V %i %o
 ->3 	string		89a		error	GIF (version 89a) support not configured
 +>3 	string		89a		ps	gif2ps <%i >%o
-+0	string		\x89PNG		ps	pngtopnm < %i| ppmtopgm | \
++0	byte		0x89		ps
++>1	string		PNG		ps	pngtopnm < %i| ppmtopgm | \
 +						pnmscale -xysize %w %l | \
 +						pnmtops -dpi %R -equalpixels >%o
  0	long		0x59a66a95	tiff	ras2tiff -%f -v %V %i %o
  #
  # HylaFAX now has server-side PDF conversion, so no need for pdf2ps.
-@@ -125,25 +127,41 @@
+@@ -125,25 +128,41 @@
  #
  0	string		begin		error	uuencoded file support not configured
  0	string		xbtoa		error	btoa'd file support not configured
@@ -102,7 +103,7 @@
  
  #
  # Japanization (should help other iso-2022 variants too)
-@@ -155,7 +173,7 @@
+@@ -155,7 +174,7 @@
  #
  # This causes anything else with ascii-only data to be treated as text.
  #
@@ -111,7 +112,7 @@
  						-Ml=0.4in -p 11 -s %s >%o <%i
  
  #
-@@ -174,5 +192,5 @@
+@@ -174,5 +193,5 @@
  
  #  Support 7-bit text which would otherwise be seen as binary.
  #
--- hylafax-4.4.4.orig/debian/patches/658_oldnotify_awk.dpatch
+++ hylafax-4.4.4/debian/patches/658_oldnotify_awk.dpatch
@@ -0,0 +1,41 @@
+#!/bin/sh -e
+##  by Giuseppe Sacco <eppesuig@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix a problem when using the old notify script. See #386036.
+## DP: patch by Paolo (from the bug report)
+
+if [ $# -lt 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+                exit 1;;
+esac
+
+exit 0
+
+diff -urNad hylafax-4.3.0~/util/notify.awk hylafax-4.3.0/util/notify.awk
+--- hylafax-4.3.0~/util/notify.awk	2004-08-16 14:58:22.000000000 +0200
++++ hylafax-4.3.0/util/notify.awk	2006-09-19 08:27:29.000000000 +0200
+@@ -99,9 +99,10 @@
+ 	    print ""
+ 	    printf "%-20s %8s %s\n", "Filename", "Size", "Type";
+ 	    for (i = 0; i < nfiles; i++) {
+-		"wc -c " files[i] | getline;
++		cmd="wc -c "files[i];
++		cmd | getline;
+ 		printf "%-20s %8d %s\n", files[i], $1, docType(files[i]);
+-		close("wc -c " files[i]);
++		close(cmd);
+ 	     }
+ 	}
+     } else if (jobType == "pager") {
--- hylafax-4.4.4.orig/debian/patches/659_notify_from_address.dpatch
+++ hylafax-4.4.4/debian/patches/659_notify_from_address.dpatch
@@ -0,0 +1,87 @@
+#!/bin/sh -e
+##  by Giuseppe Sacco <eppesuig@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Change from address in all e-mail from fax to faxmaster
+## DP: See debian bug #386071
+
+if [ $# -lt 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+                exit 1;;
+esac
+
+exit 0
+
+#@DPATCH@
+#EOF
+diff -urNad hylafax-4.3.2~/util/faxrcvd.sh.in hylafax-4.3.2/util/faxrcvd.sh.in
+--- hylafax-4.3.2~/util/faxrcvd.sh.in	2007-02-21 18:18:29.000000000 +0100
++++ hylafax-4.3.2/util/faxrcvd.sh.in	2007-02-21 18:18:30.000000000 +0100
+@@ -65,7 +65,7 @@
+ FAX2PS=$TIFFBIN/fax2ps
+ TIFF2PS=tiff2ps
+ TOADDR=FaxMaster
+-FROMADDR=fax
++FROMADDR=FaxMaster
+ TIFFINFO=tiffinfo
+ NOTIFY_FAXMASTER=always
+ 
+diff -urNad hylafax-4.3.2~/util/notify-4.2.sh.in hylafax-4.3.2/util/notify-4.2.sh.in
+--- hylafax-4.3.2~/util/notify-4.2.sh.in	2006-12-24 02:43:49.000000000 +0100
++++ hylafax-4.3.2/util/notify-4.2.sh.in	2007-02-21 18:27:05.000000000 +0100
+@@ -97,7 +97,7 @@
+ PS2FAX=bin/ps2fax
+ PDF2FAX=bin/pdf2fax
+ TOADDR=FaxMaster
+-FROMADDR=fax
++FROMADDR=FaxMaster
+ NOTIFY_FAXMASTER=never
+ RETURNFILETYPE=
+ MIMEBOUNDARY="NextPart$$"
+diff -urNad hylafax-4.3.2~/util/notify.sh.in hylafax-4.3.2/util/notify.sh.in
+--- hylafax-4.3.2~/util/notify.sh.in	2007-02-08 22:33:19.000000000 +0100
++++ hylafax-4.3.2/util/notify.sh.in	2007-02-21 18:18:30.000000000 +0100
+@@ -71,7 +71,7 @@
+ PS2FAX=bin/ps2fax
+ PDF2FAX=bin/pdf2fax
+ TOADDR=FaxMaster
+-FROMADDR=fax
++FROMADDR=FaxMaster
+ NOTIFY_FAXMASTER=never
+ RETURNFILETYPE=
+ MIMEBOUNDARY="NextPart$$" RETURNTECHINFO=yes 
+diff -urNad hylafax-4.3.2~/util/pollrcvd.sh.in hylafax-4.3.2/util/pollrcvd.sh.in
+--- hylafax-4.3.2~/util/pollrcvd.sh.in	2007-02-08 22:33:19.000000000 +0100
++++ hylafax-4.3.2/util/pollrcvd.sh.in	2007-02-21 18:26:03.000000000 +0100
+@@ -66,7 +66,7 @@
+ FAX2PS=$TIFFBIN/fax2ps
+ TIFF2PS=tiff2ps
+ TOADDR=FaxMaster
+-FROMADDR=fax
++FROMADDR=FaxMaster
+ TIFFINFO=tiffinfo
+ NOTIFY_FAXMASTER=always
+ 
+diff -urNad hylafax-4.3.2~/util/wedged.sh.in hylafax-4.3.2/util/wedged.sh.in
+--- hylafax-4.3.2~/util/wedged.sh.in	2006-12-24 02:43:49.000000000 +0100
++++ hylafax-4.3.2/util/wedged.sh.in	2007-02-21 18:18:31.000000000 +0100
+@@ -73,7 +73,7 @@
+ # Variables customizable through etc/FaxDispatch
+ #
+ TOADDR=FaxMaster
+-FROMADDR=fax
++FROMADDR=FaxMaster
+ WEDGED_EMAIL_INTERVAL=5		# minutes: at most 1 wedged email every X mins
+ WEDGED_DISABLE_FAXGETTY=	# if set, faxgetty disabled from inittab
+ 
--- hylafax-4.4.4.orig/debian/patches/700_trap-in-shell-scripts.dpatch
+++ hylafax-4.4.4/debian/patches/700_trap-in-shell-scripts.dpatch
@@ -0,0 +1,83 @@
+#!/bin/sh -e
+##  by Giuseppe Sacco <eppesuig@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix for debian #443070
+
+if [ $# -lt 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+                exit 1;;
+esac
+
+exit 0
+
+#@DPATCH@
+#EOF
+diff -urNad hylafax-4.4.2~/etc/faxaddmodem.sh.in hylafax-4.4.2/etc/faxaddmodem.sh.in
+--- hylafax-4.4.2~/etc/faxaddmodem.sh.in	2007-10-15 23:53:25.000000000 +0200
++++ hylafax-4.4.2/etc/faxaddmodem.sh.in	2007-10-16 00:00:08.000000000 +0200
+@@ -258,7 +258,7 @@
+ done
+ 
+ JUNK="$OUT"
+-trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; exit 1" 1 2 15
++trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; exit 1" 1 2 15 EXIT
+ 
+ if [ ! -d $UUCP_LOCKDIR ]; then
+     cat<<EOF
+@@ -881,7 +881,7 @@
+ 	echo ""
+ 	echo "Hmm, something seems to be hung, check your modem eh?"
+      done)& nagpid=$!
+-    trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; kill $nagpid \$catpid; exit 1" 1 2 15
++    trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; kill $nagpid \$catpid; exit 1" 1 2 15 EXIT
+     SendToModem "AT+FCLASS=?" 			# ask for class support
+ 
+     exec 3>&2 2> /dev/null  # Mute stderr against child death
+@@ -889,7 +889,7 @@
+     wait $nagpid            # Really waits its end
+     exec 2>&3 3>&-          # Restore stderr
+ 
+-    trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; test \"\$catpid\" && kill \$catpid; exit 1" 1 2 15
++    trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; test \"\$catpid\" && kill \$catpid; exit 1" 1 2 15 EXIT
+     sleep 1
+ 
+     RESULT=`tr -ds '\015' '\012' < $OUT | $SED -n '$p'`
+@@ -2029,5 +2029,6 @@
+ exec >/dev/null 2>&1
+ 
+ # cleanup
++trap - EXIT
+ $RMCMD $JUNK; $RMCMD -r $TMPDIR
+ exit 0
+diff -urNad hylafax-4.4.2~/etc/faxsetup.sh.in hylafax-4.4.2/etc/faxsetup.sh.in
+--- hylafax-4.4.2~/etc/faxsetup.sh.in	2007-10-15 23:53:24.000000000 +0200
++++ hylafax-4.4.2/etc/faxsetup.sh.in	2007-10-16 00:03:51.000000000 +0200
+@@ -925,7 +925,7 @@
+     (umask 077 ; mkdir $TMPDIR) || exit 1
+ 
+     JUNK="etc/setup.tmp"
+-    trap "$RM \$JUNK; $RM -r \$TMPDIR; exit 1" 1 2 15
++    trap "$RM \$JUNK; $RM -r \$TMPDIR; exit 1" 1 2 15 EXIT
+ 
+     exec 5>etc/setup.tmp
+     echo '# Warning, this file was automatically generated by faxsetup' >&5
+@@ -2381,6 +2381,7 @@
+ Note "Done verifying system setup."
+ 
+ if onServer; then
++    trap - EXIT
+     $RM $JUNK
+     $RM -r $TMPDIR
+ fi
--- hylafax-4.4.4.orig/debian/patches/701_RecvqProtection.dpatch
+++ hylafax-4.4.4/debian/patches/701_RecvqProtection.dpatch
@@ -0,0 +1,126 @@
+#!/bin/sh -e
+##  by Giuseppe Sacco <eppesuig@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: add RecvqProtection for hfaxd, as in hylafax+
+
+if [ $# -lt 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+                exit 1;;
+esac
+
+exit 0
+
+#@DPATCH@
+#EOF
+diff -urNad hylafax-4.4.2~/hfaxd/HylaFAXServer.c++ hylafax-4.4.2/hfaxd/HylaFAXServer.c++
+--- hylafax-4.4.2~/hfaxd/HylaFAXServer.c++	2007-01-25 16:50:15.000000000 +0100
++++ hylafax-4.4.2/hfaxd/HylaFAXServer.c++	2007-10-27 19:18:26.000000000 +0200
+@@ -627,6 +627,7 @@
+ { "maxadminattempts",	&HylaFAXServer::maxAdminAttempts,	5 },
+ { "maxconsecutivebadcmds",&HylaFAXServer::maxConsecutiveBadCmds,10 },
+ { "jobprotection",	&HylaFAXServer::jobProtection,		0444 },
++{ "recvqprotection",	&HylaFAXServer::recvqProtection,	0444 },
+ };
+ 
+ void
+diff -urNad hylafax-4.4.2~/hfaxd/HylaFAXServer.h hylafax-4.4.2/hfaxd/HylaFAXServer.h
+--- hylafax-4.4.2~/hfaxd/HylaFAXServer.h	2007-06-04 19:12:02.000000000 +0200
++++ hylafax-4.4.2/hfaxd/HylaFAXServer.h	2007-10-27 19:18:48.000000000 +0200
+@@ -206,6 +206,7 @@
+     time_t	discTime;		// time to disconnect service
+     time_t	denyTime;		// time to deny service
+     u_int	jobProtection;		// Protection to use on Jobs
++    u_int	recvqProtection;	// Protection to use on Recvq
+     /*
+      * User authentication and login-related state.
+      */
+diff -urNad hylafax-4.4.2~/hfaxd/RecvQueue.c++ hylafax-4.4.2/hfaxd/RecvQueue.c++
+--- hylafax-4.4.2~/hfaxd/RecvQueue.c++	2006-07-19 09:35:46.000000000 +0200
++++ hylafax-4.4.2/hfaxd/RecvQueue.c++	2007-10-27 19:21:36.000000000 +0200
+@@ -209,10 +209,22 @@
+     return (true);
+ }
+ 
++#define A_READ   004
++#define A_WRITE  002
++#define A_MODIFY 001
++
+ bool
+-HylaFAXServer::isVisibleRecvQFile(const char* filename, const struct stat&)
++HylaFAXServer::isVisibleRecvQFile(const char* filename, const struct stat& sb)
+ {
+-    return (strncmp(filename, "fax", 3) == 0);
++    if (strncmp(filename, "fax", 3) == 0 || strncmp(filename, FAX_SEQF, 4) == 0) {
++	if (recvqProtection & A_READ)					// other/public access
++	    return (true);
++	if (IS(PRIVILEGED) && ((recvqProtection>>3) & A_READ))		// administrative access
++	    return (true);
++	if (((u_int) sb.st_gid == uid) && ((recvqProtection>>6) & A_READ))	// owner access
++	    return (true);
++    }
++    return (false);
+ }
+ 
+ RecvInfo*
+@@ -251,14 +263,16 @@
+     struct dirent* dp;
+     while ((dp = readdir(dir))) {
+ 	struct stat sb;
+-	if (!isVisibleRecvQFile(dp->d_name, sb))
+-	    continue;
+ 	fxStr qfile(path | dp->d_name);
+-	RecvInfo* rip;
+-	if (FileCache::update(qfile, sb) && (rip = getRecvInfo(qfile, sb))) {
+-	    Rprintf(fd, recvFormat, *rip, sb);
+-	    fputs("\r\n", fd);
+-	}
++	if (FileCache::update(qfile, sb)) {
++	    if (!isVisibleRecvQFile(dp->d_name, sb))
++		continue;
++	    RecvInfo* rip;
++	    if ((rip = getRecvInfo(qfile, sb))) {
++		Rprintf(fd, recvFormat, *rip, sb);
++		fputs("\r\n", fd);
++	    }
++	}
+     }
+ }
+ 
+diff -urNad hylafax-4.4.2~/man/hfaxd.1m hylafax-4.4.2/man/hfaxd.1m
+--- hylafax-4.4.2~/man/hfaxd.1m	2007-09-17 19:37:50.000000000 +0200
++++ hylafax-4.4.2/man/hfaxd.1m	2007-10-27 19:23:26.000000000 +0200
+@@ -417,6 +417,7 @@
+ PagerIDMapFile	string	\s-1${SPOOL}/etc/pagermap\s+1	name of file for mapping pager IDs (\s-1SNPP\s+1)
+ PriorityMap	string	\s-1\fIsee below\fP\s+1	mapping from service level to job priority (\s-1SNPP\s+1)
+ RcvFmt	string	\s-1\fIsee below\fP\s+1	format string for received facsimile status results
++RecvqProtection	octal	\s-10444\s+1	permissions for client access to recvq
+ RetryTimeMap	string	\s-1\fIsee below\fP\s+1	mapping from service level to job retry time (\s-1SNPP\s+1)
+ ServerTracing	integer	\s-11\s+1	server tracing control vector
+ ShutdownFile	string	\s-1${SPOOL}/etc/shutdown\s+1	name of shutdown control file
+@@ -716,6 +717,14 @@
+ that construct headers from the format string can constrain the width of
+ column title strings.
+ .TP 10
++.B RecvqProtection
++The permissions setting for administrator, owners, and users for viewing files in
++the \*(Fx receive queue.  The default setting of ``0444'' allows all users to view all
++files in the queues.  A setting of ``0440'' allows only the job owner and the 
++administrator to view files.  A setting of ``0040'' allows only the administrator 
++to view the files.  If a user doesn't have permissions 
++on the file, the file will not be visible to them when viewing the queue.
++.TP 10
+ .B RetryTimeMap
+ The mapping from \s-1SNPP\s+1 service level (0-11) to job retry time.
+ A mapping is specified as a string of space-separate numbers where each
--- hylafax-4.4.4.orig/debian/patches/400_parallel_makefile.dpatch
+++ hylafax-4.4.4/debian/patches/400_parallel_makefile.dpatch
@@ -0,0 +1,91 @@
+#!/bin/sh -e
+##  by Giuseppe Sacco <eppesuig@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: correct dependencies in Makefiles
+## DP: so that package may be built with parallel make (-j)
+## DP: changes also a few link command in order to select only
+## DP: required libraries
+
+if [ $# -lt 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+                exit 1;;
+esac
+
+exit 0
+
+#@DPATCH@
+#EOF
+diff -urNad hylafax-4.4.3.orig/man/Makefile.in hylafax-4.4.3/man/Makefile.in
+--- hylafax-4.4.3.orig/man/Makefile.in
++++ hylafax-4.4.3/man/Makefile.in
+@@ -113,7 +113,8 @@
+ 	sman.files/status.4f	\
+ 	sman.files/tsi.4f	\
+ 	sman.files/xferfaxlog.4f
+-TARGETS=cman.apps/Makefile cman.files/Makefile \
++TARGETS=cman.apps cman.files sman.apps sman.files \
++	cman.apps/Makefile cman.files/Makefile \
+ 	sman.apps/Makefile sman.files/Makefile
+ 
+ #
+diff -urNad hylafax-4.4.3.orig/util/Makefile.in hylafax-4.4.3/util/Makefile.in
+--- hylafax-4.4.3.orig/util/Makefile.in
++++ hylafax-4.4.3/util/Makefile.in
+@@ -112,6 +112,8 @@
+ 	${RANLIB} $@
+ ../util/libfaxutil.a: libfaxutil.a
+ 
++LIBS	+= libfaxutil.${DSO}
++
+ faxmsg: ${SRCDIR}/faxmsg.c ${LIBS}
+ 	${CCF} -o $@ ${SRCDIR}/faxmsg.c ${LDFLAGS}
+ faxstate: ${SRCDIR}/faxstate.c ${LIBS}
+--- hylafax-4.4.4.orig/defs.in
++++ hylafax-4.4.4/defs.in
+@@ -134,7 +134,8 @@
+ 
+ # default definitions for programs--overide them as desired
+ LIBS		= ${LIBUTIL}
+-LLDLIBS		= ${LIBS} @PAMLIBS@ @LIBJBIG@ ${LIBTIFF} ${LIBZ} ${LIBREGEX} ${LIBPORT} ${MACHDEPLIBS}
++ALLLLDLIBS		= ${LIBS} @PAMLIBS@ @LIBJBIG@ ${LIBTIFF} ${LIBZ} ${LIBREGEX} ${LIBPORT} ${MACHDEPLIBS}
++LLDLIBS	= ${LIBS}
+ #
+ # Override this definition to eliminate shared library use.
+ #
+@@ -256,9 +257,11 @@
+ #     line such as "SHDLIBC=".
+ #
+ LDFLAGS		= ${LDOPTS} ${LDLIBS}
++ALLLDFLAGS	= ${LDOPTS} ${ALLLDLIBS}
+ 
+ LDOPTS		= ${VLDOPTS} ${LLDOPTS} ${GLDOPTS}
+-LDLIBS		= ${VLDLIBS} ${LLDLIBS} ${GLDLIBS}
++ALLLDLIBS	= ${VLDLIBS} ${ALLLLDLIBS} ${GLDLIBS}
++LDLIBS		= ${VLDLIBS} ${GLDLIBS}
+ 
+ GLDOPTS	= -L/usr/local/lib
+ GLDLIBS	= ${SHDLIBC}
+--- hylafax-4.4.4.orig/hfaxd/Makefile.in
++++ hylafax-4.4.4/hfaxd/Makefile.in
+@@ -78,7 +78,7 @@
+ @MAKEINCLUDE@ @MAKELQUOTE@${COMMONRULES}@MAKERQUOTE@
+ 
+ hfaxd: ${OBJECTS} FaxRequest.o FaxItem.o ${LIBS}
+-	${C++F} -o $@ ${OBJECTS} FaxRequest.o FaxItem.o ${LDFLAGS}
++	${C++F} -o $@ ${OBJECTS} FaxRequest.o FaxItem.o ${ALLLDFLAGS}
+ 
+ #
+ # Private versions are built so that we do not need
+
--- hylafax-4.4.4.orig/debian/patches/702_g++4.3_support.dpatch
+++ hylafax-4.4.4/debian/patches/702_g++4.3_support.dpatch
@@ -0,0 +1,40 @@
+#!/bin/sh -e
+##  by Giuseppe Sacco <eppesuig@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix for using g++ 4.3 on configure
+
+if [ $# -lt 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+                exit 1;;
+esac
+
+exit 0
+
+#@DPATCH@
+#EOF
+diff -urNad hylafax-4.4.4~/configure hylafax-4.4.4/configure
+--- hylafax-4.4.4~/configure	2007-11-21 15:45:23.000000000 +0100
++++ hylafax-4.4.4/configure	2008-04-08 10:53:17.000000000 +0200
+@@ -1418,8 +1418,8 @@
+ CheckForCXXRuntime()
+ {
+ cat>t.c++<<EOF
+-#include "iostream.h"
+-int main(){ cout << "Hello World!" << endl; return 0;}
++#include <iostream>
++int main(){ std::cout << "Hello World!" << std::endl; return 0;}
+ EOF
+     runMake t "t:; ${C++F} ${C++FILE} t.c++"
+ }
--- hylafax-4.4.4.orig/debian/po/es.po
+++ hylafax-4.4.4/debian/po/es.po
@@ -0,0 +1,79 @@
+# hylafax po-debconf translation to Spanish
+# Copyright (C) 2005 Software in the Public Interest
+# This file is distributed under the same license as the hylafax package.
+#
+# Changes:
+#  - Initial translation
+#         César Gómez Martín <cesar.gomez@gmail.com>
+# 
+# Revision:
+#
+#         Rudy Godoy Guillén <rudy@stone-head.org>, 2007
+#
+#   Traductores, si no conoce el formato PO, merece la pena leer la
+#   documentación de gettext, especialmente las secciones dedicadas a este
+#   formato, por ejemplo ejecutando:
+#          info -n '(gettext)PO Files'
+#          info -n '(gettext)Header Entry'
+# Equipo de traducción al español, por favor, lean antes de traducir
+# los siguientes documentos:
+#
+#  - El proyecto de traducción de Debian al español
+#    http://www.debian.org/intl/spanish/
+#    especialmente las notas de traducción en
+#    http://www.debian.org/intl/spanish/notas
+#
+#  - La guía de traducción de po's de debconf:
+#    /usr/share/doc/po-debconf/README-trans
+#    o http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: hylafax 2:4.2.2-1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-08-04 00:06+0200\n"
+"PO-Revision-Date: 2007-05-13 15:41-0500\n"
+"Last-Translator: César Gómez Martín <cesar.gomez@gmail.com>\n"
+"Language-Team: Debian l10n spanish <debian-l10n-spanish@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Spanish\n"
+"X-Poedit-Country: SPAIN\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#. Type: note
+#. Description
+#: ../hylafax-server.templates:3
+msgid "Don't forget to setup a modem line"
+msgstr "No olvide configurar una línea de módem"
+
+#. Type: note
+#. Description
+#: ../hylafax-server.templates:3
+msgid "Hylafax is now installed as a server but you still have to configure at least a modem in order to send or receive faxes. Please use faxaddmodem in order to define a modem and then restart hylafax so that it will use the new configuration."
+msgstr "Ahora hylafax está instalado como servidor, pero todavía tiene que configurar, como mínimo, un módem para enviar o recibir faxes. Por favor, utilice faxaddmodem para definir un módem y después reinicie hylafax para que use la nueva configuración."
+
+#. Type: boolean
+#. Description
+#: ../hylafax-server.templates:12
+msgid "Start the HylaFAX daemon now?"
+msgstr "¿Desea iniciar el demonio HylaFAX ahora?"
+
+#. Type: boolean
+#. Description
+#: ../hylafax-server.templates:12
+msgid "Hylafax is already configured and may be started now. If you specify to start it later manually, remember to change the value of RUN_HYLAFAX in /etc/default/hylafax."
+msgstr "Hylafax ya está configurado y puede iniciarse ahora. Si prefiere iniciarlo manualmente con posterioridad, recuerde cambiar el valor de RUN_HYLAFAX en /etc/default/hylafax."
+
+#. Type: note
+#. Description
+#: ../hylafax-server.templates:19
+msgid "Check base64 encoders"
+msgstr "Comprobar los codificadores base64"
+
+#. Type: note
+#. Description
+#: ../hylafax-server.templates:19
+msgid "Hylafax is able to send received faxes via email. These emails need to include base64 encoded attachments. Since this is not essential to hylafax to work, you need to do manually some further steps: you should install a package that provide encoders (like mime-codecs or sharutils) and run 'faxsetup -server' that will automatically check for those encoders and change its configuration."
+msgstr "Hylafax puede enviar los faxes recibidos a través de correo electrónico. Estos correos necesitan incluir ficheros adjuntos codificados en base64. Puesto que esto no es esencial para que hylafax funcione, tiene que realizar manualmente algunos pasos: debería instalar un paquete que proporcione codificadores (como mime-codecs o sharutils) y ejecutar «faxsetup -server», que comprobará automáticamente los codificadores y cambiará su configuración."
--- hylafax-4.4.4.orig/debian/po/pt.po
+++ hylafax-4.4.4/debian/po/pt.po
@@ -0,0 +1,81 @@
+# translation of hylafax debconf to Portuguese
+# Copyright (C) 2007 Américo Monteiro
+# This file is distributed under the same license as the hylafax package.
+#
+# Américo Monteiro <a_monteiro@netcabo.pt>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: hylafax 2:4.3.4-2\n"
+"Report-Msgid-Bugs-To: eppesuig@debian.org\n"
+"POT-Creation-Date: 2006-11-23 10:48+0100\n"
+"PO-Revision-Date: 2007-08-02 22:20+0100\n"
+"Last-Translator: Américo Monteiro <a_monteiro@netcabo.pt>\n"
+"Language-Team: Portuguese <traduz@debianpt.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: boolean
+#. Description
+#: ../hylafax-server.templates:1001
+msgid "Start the HylaFAX daemon now?"
+msgstr "Arrancar o deamon HylaFAX agora?"
+
+#. Type: boolean
+#. Description
+#: ../hylafax-server.templates:1001
+msgid ""
+"Hylafax is already configured and may be started now. If you specify to "
+"start it later manually, remember to change the value of RUN_HYLAFAX in /etc/"
+"default/hylafax."
+msgstr ""
+"O Hylafax já está configurado e pode ser arrancado agora. Se você especificar "
+"arrancá-lo mais tarde manualmente, lembre-se de alterar o valor de "
+"RUN_HYLAFAX em /etc/default/hylafax."
+
+#. Type: error
+#. Description
+#: ../hylafax-server.templates:2001
+msgid "Check base64 encoders"
+msgstr "Verificar codificadores base64 (encoders)."
+
+#. Type: error
+#. Description
+#: ../hylafax-server.templates:2001
+msgid ""
+"Hylafax is able to send received faxes via email. These emails need to "
+"include base64 encoded attachments. Since this is not essential to hylafax "
+"to work, you need to do manually some further steps: you should install a "
+"package that provide encoders (like mime-codecs or sharutils) and run "
+"'faxsetup -server' that will automatically check for those encoders and "
+"change its configuration."
+msgstr ""
+"O Hylafax é capaz de enviar por email faxes recebidos. Estes emails precisam "
+"de incluir anexos codificados em base64. Como isto não é essencial para o "
+"hylafax funcionar, você precisa tratar dalguns passos manualmente: "
+"deverá instalar um pacote que forneça codificadores (como o mime-codecs "
+"ou o sharutils) e correr 'faxsetup-server' que automaticamente irá procurar "
+"por estes codificadores e alterar a sua configuração."
+
+#. Type: error
+#. Description
+#: ../hylafax-server.templates:3001
+msgid "Hylafax setup failed"
+msgstr "Configuração do Hylafax falhou."
+
+#. Type: error
+#. Description
+#: ../hylafax-server.templates:3001
+msgid ""
+"While installing hylafax a script called 'faxsetup' failed. This can be "
+"caused by many reasons and cannot be fixed automatically so the hylafax-"
+"server package is now unconfigured. Please fix the problem, run 'faxsetup -"
+"server' as root and reconfigure hylafax-server manually."
+msgstr ""
+"Durante a instalação do Hylafax, um script chamado 'faxsetup' falhou. Isto "
+"pode ser causado por muitas razões e não pode ser resolvido automaticamente, "
+"então o pacote hylafax-server está por configurar. Por favor, corrija o "
+"problema, corra 'faxsetup-server' como root e reconfigure o hylafax-server "
+"manualmente."
+
--- hylafax-4.4.4.orig/debian/html-patch
+++ hylafax-4.4.4/debian/html-patch
@@ -0,0 +1,25 @@
+#!/bin/sh
+ROOT=${1-/usr/share/doc/hylafax}
+CGI=${2-/cgi-bin/man}
+PATTERN="@[a-zA-Z][a-zA-Z]*@"
+
+patch()
+{
+chmod a+w $1
+ed - $1<<EOF
+g;@CGIPATH@/manpage;s;;$CGI/man2html;g
+g;@CGIPATH@;s;;$CGI;g
+g;@HTMLPATH@;s;;$ROOT;g
+w
+q
+EOF
+chmod a-w $1
+}
+
+FILES=`grep -l "$PATTERN" *.html */*.html`
+test "$FILES" && {
+for i in $FILES
+   do
+       echo $i; patch $i;
+   done
+}
--- hylafax-4.4.4.orig/debian/hylafax-doc.doc-base
+++ hylafax-4.4.4/debian/hylafax-doc.doc-base
@@ -0,0 +1,11 @@
+Document: hylafax
+Title: HylaFAX Documentation
+Author: HylaFAX
+Abstract:  HTML version of HylaFAX documentation and manpages.
+ HylaFAX supports the sending and receiving of facsimiles, the polled
+ retrieval of facsimiles and the send of alphanumeric pages.
+Section: Comm
+
+Format: HTML
+Index: /usr/share/doc/hylafax-doc/html/index.html
+Files: /usr/share/doc/hylafax-doc/html/*.html
--- hylafax-4.4.4.orig/debian/compat
+++ hylafax-4.4.4/debian/compat
@@ -0,0 +1 @@
+5
