--- efax-0.9a.orig/debian/README.Debian +++ efax-0.9a/debian/README.Debian @@ -0,0 +1,18 @@ +efax-0.9a for Debian +-------------------- + +* Configuration: + +The "efax" usually will not work at all until you adapt its configuration +in "/etc/efax.rc" to your local needs. + +To give unprivileged users permission to send and receive fax documents +using the fax(1) command you have to add them to group "dialout". + + +* Notes/patches: + +This Debian version contains some enhancements by Masaki Shinomiya +. Source: http://shino.pos.to/linux/efax.html + + -- Muhammad Hussain Yusuf , Sat, 20 Jul 2002 10:10:44 +0100 --- efax-0.9a.orig/debian/README.efax2mail +++ efax-0.9a/debian/README.efax2mail @@ -0,0 +1,20 @@ + +Avery Pennarun has provided the script efax-convert (included in the examples +directory) to convert incoming faxes into MIME'ed emails. If this script is +saved as /usr/local/bin/efax-convert, it can be activated via the $NOTIFY +variable in /etc/efax.rc as follows: + + NOTIFY='/usr/local/bin/efax-convert "$REMID" $FILES' + +Notice that it will move faxes from $FAXDIR (usually /var/spool/fax/) into a +subdirectory $FAXDIR/done which the weekly cron job for the efax package still +clean. + +The fax(1) program itself also provides a faxmail() function which can be +used via $NOTIFY, please see /usr/bin/fax and /etc/efax.rc + +Also note there is a Fax-Server mini-HOWTO which describes how to use efax as +a print filter for outgoing faxes. + + + -- Dirk Eddelbuettel Sun, 11 Apr 1999 12:33:06 -0400 --- efax-0.9a.orig/debian/README.source +++ efax-0.9a/debian/README.source @@ -0,0 +1,7 @@ +README.source for efax +====================== + +This package uses dpatch to manage patches, use +fakeroot debian/rules patch +to get a patched sourcetree after dpkg-source -x and use dpatch-edit-patch to +generate new patches. --- efax-0.9a.orig/debian/changelog +++ efax-0.9a/debian/changelog @@ -0,0 +1,388 @@ +efax (1:0.9a-20) unstable; urgency=medium + + * QA upload. + * Set Debian QA Group as maintainer. (see: #871240) + * Using new DH level format. Consequently: + - debian/compat: removed. + - debian/control: changed from 'debhelper' to 'debhelper-compat' in + Build-Depends field and bumped level to 13. + * debian/control: bumped Standards-Version to 4.5.0. + * debian/rules: + - Added DEB_CFLAGS_MAINT_APPEND variable as a workaround to fix a FTBFS + with GCC-10. (Closes: #957167) + - Removed superseded package 'gs' from Suggests field. + - Using dh_prep instead of dh_clean -k. + + -- Joao Eriberto Mota Filho Mon, 21 Sep 2020 21:19:22 -0300 + +efax (1:0.9a-19.1) unstable; urgency=medium + + * Non-maintainer upload. + * Update DH level to 10. (Closes: #817447) + * debian/compat: updated to 10. + * debian/control: + - Bumped Standards-Version to 3.9.8. + + -- Giovani Augusto Ferreira Thu, 15 Dec 2016 10:12:26 -0200 + +efax (1:0.9a-19) unstable; urgency=low + + * debian/patches/00list: apply patch from DEXTARR and brown paper bag + + -- MJ Ray (Debian) Mon, 23 Jan 2006 12:57:58 +0000 + +efax (1:0.9a-18) unstable; urgency=low + + * Check and update to Standards-Version 3.6.2.0 + * Update FSF address in copyright file + * Patch from DEXTARR to handle case when fax device is stopped + * Remove dependency on libpaperg (Closes: #346578) + + -- MJ Ray (Debian) Sat, 14 Jan 2006 13:29:33 +0000 + +efax (1:0.9a-17) unstable; urgency=low + + * Correct log directory (Closes: #333077) + + -- MJ Ray (Debian) Tue, 18 Oct 2005 15:46:31 +0100 + +efax (1:0.9a-16) unstable; urgency=low + + * New maintainer (Closes: #280691) + * Patch from Joerg Dorchain to correct faxmail and attach faxes + (Closes: #238136) + * Patch to read other CONFIGFILES from Paolo P. (Closes: #198149) + * Make efax logfiles end .efax.log because mgetty-fax is using our + spool too (Closes: #207911) + * Add version to libpaperg dependency (Closes: #322255) + * Update website URL in man efax (Closes: #322258) + * Correct example in man fax (Closes: #322259) + * Give better error message when non-fax-capable modem supports + +FCLASS command (Closes: #202668) + * Add debconf-2.0 as an alternative for debconf + * Small typing fix to Description + + -- MJ Ray (Debian) Mon, 3 Oct 2005 16:47:22 +0100 + +efax (1:0.9a-15) unstable; urgency=low + + * QA upload + * New patch 04crashpowerpc.diff by Matteo Frigo to fix a segfault on PowerPC + (Closes: #280271) + * Remove duplicate Build-Depends line in debian/control + * List new upstream URL in debian/copyright (Closes: #243577) + * Do not run weekly cronjob if efax is uninstalled (but not purged). + (Closes: #201392) + * Use -print0 | xargs -0 instead of plain find|xargs in cronjob. + * Stop debconf abuse, by dropping the config-script and templates, both + notes belong to README.Debian, where I've added the information to + (Closes: #194560). This also does away with the need to incorporate the + Japanese debconf translation (Closes: #214042) + * Invoke db_purge on upgrades. + * Clean up packaging (debhelper v1), by repackaging from scratch with + dh_make and dpatch. - Standards-Version: 3.6.1 + + -- Andreas Metzler Thu, 2 Dec 2004 09:08:48 +0100 + +efax (1:0.9a-14) unstable; urgency=low + + * Changed Maintainer contact e-mail. + + -- Francesco Paolo Lovergine Mon, 1 Mar 2004 22:53:24 +0100 + +efax (1:0.9a-13) unstable; urgency=low + + * debian/patches: 02fax_notify.diff - Fixed REMID and FILES values in + NOTIFY fax script (Closes: #130614) + * debian/patches: 03fax_send.diff - Added feedback when user forgets to + specify the file to send with fax script (Closes: #144406) + + -- Filippo Panessa Fri, 18 Apr 2003 17:44:01 +0200 + +efax (1:0.9a-12) unstable; urgency=low + + * New maintainer + * New debian build scripts + * debian/templates: Added Russian (ru_RU.KOI8-R) text using patch by Ilgiz + Kalmetev (Closes: #137162) + * debian/templates: Added Danish (da_DK) text using patch by Morten + Brix Pedersen (Closes: #176007) + * debian/templates: Added Italian (it_IT) text + * debian/patches: 00fax_locale.diff - Fixed fax (view|make|send) for + all locales (Closes: #160926, #165832) + * debian/patches: 01faxmail-mime.diff - Fixed wrong MIME generates from + fax scripts in faxmail function (Closes: #140114) + + -- Filippo Panessa Mon, 14 Apr 2003 00:16:59 +0200 + +efax (1:0.9a-11) unstable; urgency=low + + * Orphaned: maintainer set to QA team. + * Added a libpaper-utils dependency. Not a real error, anyway libpaperg + is a dummy package, so a direct dependency is better. + (closes: #180440) + * Short description rephrased. + * Policy updated. + + -- Francesco Paolo Lovergine Mon, 7 Apr 2003 16:35:10 +0200 + +efax (1:0.9a-10) unstable; urgency=low + + * Changed paper sizes in fax to mm using fix by Masaki Shinomiya + . Closes: #153537 + * Added patch from Masaki Shinomiya to efax.c for + Sparc. + + -- Muhammad Hussain Yusuf Sat, 20 Jul 2002 10:39:42 +0100 + +efax (1:0.9a-9) unstable; urgency=low + + * New Maintainer. Closes: #133293 + + -- Muhammad Hussain Yusuf Wed, 20 Feb 2002 14:31:10 +0000 + +efax (1:0.9a-8) unstable; urgency=low + + * efax.c: Applied patch by briand@zipcon.net (Closes: #132280) + * debian/control: Changed Priority: to Optional as per overrides file + + -- Dirk Eddelbuettel Mon, 4 Feb 2002 20:10:41 -0600 + +efax (1:0.9a-7) unstable; urgency=low + + * debian/templates: Added Brazilian portuguese (pt_BR) text (Closes: 108527) + * debian/copyright: Debian/GNU Linux typo fix (lintian) + * debian/control: Upgraded to Standards-Version 3.5.0 + + -- Dirk Eddelbuettel Fri, 14 Dec 2001 20:23:09 -0600 + +efax (1:0.9a-6) unstable; urgency=low + + * debian/templates: New debconf text in spanish (Closes: #102814) + * debian/control: Added make to Depends (Closes: #106243) + * debian/templates: Changed Type from text to note (Closes: #106335) + + -- Dirk Eddelbuettel Tue, 31 Jul 2001 22:04:11 -0500 + +efax (1:0.9a-5) unstable; urgency=low + + * efax.rc: Set OWNER and MODE to empty strings to prevent the from being + reset by /usr/bin/fax (Closes: #89239) + + -- Dirk Eddelbuettel Mon, 12 Mar 2001 14:17:05 -0600 + +efax (1:0.9a-4) unstable; urgency=low + + * debian/templates: New debconf text for sv and de (Closes: #83676, #86215) + * debian/conffiles: Added /etc/cron.weekly/efax as a conffile + + -- Dirk Eddelbuettel Fri, 16 Feb 2001 21:46:06 -0600 + +efax (1:0.9a-3) unstable; urgency=low + + * Upgraded to the last development release 0.9a-001114 + * Also re-applied pdf patch from the 0.9-6 Debian release + + -- Dirk Eddelbuettel Wed, 15 Nov 2000 21:54:41 -0600 + +efax (1:0.9a-2) unstable; urgency=low + + * Reupload correcting a problem with 0.9a-1 (Closes: #76202) + + -- Dirk Eddelbuettel Sun, 5 Nov 2000 22:56:59 -0600 + +efax (1:0.9a-1) unstable; urgency=low + + * Upgraded to the last development release 0.9a-990411 (Closes: #76202) + * Also applied patches from the 0.9 releases 0.9-5 and 0.9-6 + + -- Dirk Eddelbuettel Sat, 4 Nov 2000 16:17:20 -0600 + +efax (1:0.9-6) unstable; urgency=low + + * fax: Modified to allow usage of .pdf files as suggested by Barak + in bug report #70641. The more encompassing change to use file and + magic2mime is left for another time (Closes: #70641) + + -- Dirk Eddelbuettel Sun, 8 Oct 2000 10:31:38 -0500 + +efax (1:0.9-5) unstable; urgency=low + + * efix.1: Applied two character patch to correct a paragraph (Closes: #58742) + * debian/control: Added Build-Depends + + -- Dirk Eddelbuettel Tue, 22 Feb 2000 20:49:25 -0500 + +efax (1:0.9-4) unstable; urgency=low + + * debian/control: Added imagemagick and mgetty-viewfax to xloadimage in + Suggests: for a fax viewer (Closes: #52369) + + -- Dirk Eddelbuettel Wed, 15 Dec 1999 19:43:25 -0500 + +efax (1:0.9-3) unstable; urgency=low + + * debian/rules: Now uses debconf for messages + * debian/rules: Adapted to use /usr/share/ following the recommendation + on FHS transition from the Technical Committee + * debian/rules: Test for debhelper >= 2.0.50 for FHS compliance + * debian/control: Upgraded to Debian Policy 3.1.0 + + -- Dirk Eddelbuettel Fri, 8 Oct 1999 22:53:09 -0400 + +efax (1:0.9-2) unstable; urgency=low + + * Rebuilt package with the upstream sources efax_0.9.orig.tar.gz in the + proper place: above the sources directory, not in it. (Closes: #44176) + + -- Dirk Eddelbuettel Sat, 4 Sep 1999 23:47:49 -0400 + +efax (1:0.9-1) unstable; urgency=low + + * Upgraded to the new 0.9 release from metalab.unc.edu + * Rewrote /etc/efax.rc to include all user configurable variables + * Changed version number to major.minor scheme along with upstream + source; this required adding an epoch + * Wrote README.fax2mail, and added efax-convert by Avery Pennarun + in the examples/ directory + + -- Dirk Eddelbuettel Mon, 12 Apr 1999 21:39:38 -0400 + +efax (08b-1.990217) experimental; urgency=low + + * Made test release of efax for the experimental distribution. This + corresponds to the upstream author's desire of beta testing, but not + in the context of an official distribution (cf README) + + -- Dirk Eddelbuettel Sun, 21 Feb 1999 20:50:23 -0500 + +efax (08a-6) unstable; urgency=low + + * Changed the last reference to /dev/cua? to /dev/ttyS? (fixes #21905) + * Changed efax.rc to use PAGE=`paperconf` and added a Depends: on + libpaper to debian/control (fixes #21905) + + -- Dirk Eddelbuettel Fri, 1 May 1998 20:28:13 -0400 + +efax (08a-5) unstable; urgency=low + + * Changed permissions of postinst and preinst (lintian) + * Updated FSF address in copyright (lintian) + * Upgraded to Debian Policy 2.4.0.0 (lintian) + * Converted debian/rules to debhelper + + -- Dirk Eddelbuettel Thu, 16 Apr 1998 21:51:52 -0400 + +efax (08a-4) unstable; urgency=low + + * Compiled with GNU libc2 aka libc6 (which required two small changes + to two header files which were proposed by the upstream author) + * efax_08a.orig.tar.gz is now a copy of the original efax08a.tar.gz + * Finally did 's/cua/ttyS/g' on efax.1, fax and fax.1 + * Removed conversion functions (for transition from efax_07a-{0,1} + of Debian 0.93R6) from {pre,post}inst (closes #11738) + + -- Dirk Eddelbuettel Thu, 7 Aug 1997 21:48:44 -0400 + +efax (08a-3) unstable; urgency=low + + * Changed '-' in preinst function identifier to '_' (fixes bugs #8056,#8115) + + -- Dirk Eddelbuettel Mon, 17 Mar 1997 12:02:48 -0500 + +efax (08a-2) unstable; urgency=low + + * Changed '-' in postinst function identifiers to '_' (fixes bug #7753) + + -- Dirk Eddelbuettel Tue, 11 Mar 1997 21:31:38 -0500 + +efax (08a-1) unstable; urgency=low + + * New upstream release efax08a (fixes bug #4539) + * Debian package is no longer patched for qfax support + + * Converted package management files to new Debian-1.2 style + * Changed maintainer email address to + + -- Dirk Eddelbuettel Mon, 21 Oct 1996 14:36:34 -0400 + +Fri Apr 12 11:39:08 1996 Dirk Eddelbuettel + + * efax-07a-6 release + + * efax.rc: FAXLOGDIR=/var/log/efax (fixes bug #2594) + + * debian.postinst: move logfiles to new location /var/log/efax + + * added cron.weekly script to delete old logfiles + + * debian.control: added Architecture: field + +Tue Jan 16 13:51:30 1996 Dirk Eddelbuettel + + * efax-07a-5 release + + * debian.rules: permissions on /var/spool/fax/* dirs now 2770 + + * fax: changed DATAINIT variable to contain &C1; fax calls still + get &C0 from the INIT variable (bug #1949) + + * fax: changed FAXDIR to FAXINDIR on line 427 (bug #2100) + + * efix.c: applied patch by Ed Casas + +Sun Dec 17 16:34:41 1995 Dirk Eddelbuettel + + * efax-07a-4 release + + * debian.rules: include missing debian.preinst (bug #2041) and + really create the directories in /var/spool/fax + + * debian.postinst: quoted strings (bug #2041) + +Sat Dec 16 14:26:19 1995 Dirk Eddelbuettel + + * efax-07a-3 release + + * efax.rc: (no real change) FAXINDIR, FAXOUTDIR, FAXLOGDIR use + /var/spool/* and not /usr/spool/* as this looks better (bug #2033) + + * debian.rules: creates directories recvq, sendq and log in + /var/spool/fax with mode 2775 and group dialout (bug #2033) + + * debian.postinst, debian.control: suggests "/etc/efax.rc" for + local changes instead of /usr/bin/fax (bug #2033) + + * debian.postinst, debian.preinst: save existing fax script and + deal with it; /usr/bin/fax is no longer a conffile (bug #2033) + +Mon Dec 11 20:27:42 1995 Dirk Eddelbuettel + + * efax-07a-2 release + + * efax.c: version string reflects Debian upon author's request + + * efax.c and fax patched with qfax patches from ftp.renaissoft.com + This version of efax can now be used with the qfax program suite + that adds an e-mail-to-fax gateway to efax, a phonebook database + system, automated cover page generation, and fax spooling for + delayed transmission of faxes. + + * fax: now sources /etc/efax.rc and/or ~/.efaxrc, manpage updated + + * debian.postinst: warn if no user in group dialout + + * debian.control: ELF release, depends on libc5 + +Tue Sep 26 13:50:50 1995 Dirk Eddelbuettel + + * efax-07a-1 release + + * debian.control: Changes Depends: gs to Suggests: gs and reworded + the description to explain that only ascii text can be faxed + without ghostscript + +Thu Sep 7 23:05:53 1995 Dirk Eddelbuettel + + * efax-07a-0: Initial Debian release, added package maintenance + files, edited Makefile and /usr/bin/fax slightly to Debian standards --- efax-0.9a.orig/debian/control +++ efax-0.9a/debian/control @@ -0,0 +1,23 @@ +Source: efax +Section: comm +Priority: optional +Maintainer: Debian QA Group +Build-Depends: debhelper-compat (= 13), dpatch +Standards-Version: 4.5.0 + +Package: efax +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libpaper-utils, debconf (>= 0.5) | debconf-2.0, make +Suggests: xloadimage | imagemagick | mgetty-viewfax +Description: programs to send and receive fax messages + efax is a small ANSI C/POSIX program that provides the data transport + function for fax applications using any Class 1 or Class 2 fax modem + Another program, efix, converts between fax, text, bitmap and grayscale + formats. fax, a shell script, provides a simple user interface to the efax + and efix programs. It allows you to send text or Postscript files as faxes + and receive, print or preview received faxes. + . + The ghostscript package is needed to fax Postscript files, and an image + viewing program like xloadimage is needed to view incoming faxes. + . + Note that you probably have to adapt /etc/efax.rc to your needs. --- efax-0.9a.orig/debian/copyright +++ efax-0.9a/debian/copyright @@ -0,0 +1,44 @@ + +This is Debian GNU/Linux's prepackaged version of the 'efax' utility. +'efax' permits to send, receive, view and print fax messages. 'efax' was +written by Ed Casas . + +Homepage and Download location: http://www.cce.com/efax/ + +This package was put together by Dirk Eddelbuettel + +Small changes that were made as adding the Debian package maintenance system +as well as editing some files to follow Debian and FSSTND conventions. + +The copyright statement for efax follows: + + Copyright (C) 1995 Ed Casas + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The source files also contain the following two paragraphs: + + Please contact the author if you wish to use efax or efix in + ways not covered by the GNU GPL. + + You may contact the author by e-mail at: edc@cce.com, by mail + at: 2629 West 3rd Ave, Vancouver, BC, Canada, V6K 1M4, or by + fax at: +1 604 734 5291. + + + --- efax-0.9a.orig/debian/cron.weekly +++ efax-0.9a/debian/cron.weekly @@ -0,0 +1,12 @@ +#!/bin/sh +# +# cron script to delete efax logfiles that are older than six weeks +# +# Written by Dirk Eddelbuettel + +[ -e /usr/bin/efax ] || exit 0 + +nice find /var/spool/fax /var/log/efax -type f -name \*.efax.log -mtime +42 -print0 |\ + xargs -0r rm -f + +exit 0 --- efax-0.9a.orig/debian/dirs +++ efax-0.9a/debian/dirs @@ -0,0 +1,8 @@ +usr/bin +etc +etc/cron.weekly +usr/bin +usr/share/man/man1 +usr/share/doc/efax +var/log +var/spool --- efax-0.9a.orig/debian/docs +++ efax-0.9a/debian/docs @@ -0,0 +1,2 @@ +README +debian/README.efax2mail --- efax-0.9a.orig/debian/efax-convert +++ efax-0.9a/debian/efax-convert @@ -0,0 +1,69 @@ +#!/bin/bash +# +# fax conversion script for the efax package: +# called by /usr/bin/fax when a fax is received. Convert it to a +# multipage compressed postscript document and e-mail it to $MAILTO +# (default is postmaster) +# +# Copyright 1998, 1999 by Avery Pennarun +# Use, modify, and redistribute freely. +# + +SENDMAIL=/usr/sbin/sendmail +FAXMGR=root +FAXDIR=/var/spool/fax + +# override all options from the efax config file +source /etc/efax.rc + +# process the command line +REMID="$(echo "$1" | sed 's/\(^\| \) */\1/g')" +shift +FILES="$*" + +#set -x + +xmit() +{ + SUBJECT="$1" + + ( + cat <<-EOF + From: + MIME-Version: 1.0 + Subject: $SUBJECT + Content-Type: multipart/mixed; boundary="xyz" + Content-Transfer-Encoding: 7bit + + This is a MIME encoded message. Use a MIME-compatible e-mail + package if you want to read it. + + EOF + + cat <<-EOF + --xyz + Content-Type: application/postscript; name="fax.ps.gz" + Content-Disposition: attachment; filename="$(basename fax.ps.gz)" + Content-Transfer-Encoding: base64 + + EOF + + shift + cat | gzip -c | mimencode + + echo "--xyz" + + ) | $SENDMAIL $FAXMGR +} + +set -e + +cd $FAXDIR + +PAGES="$(echo $FILES | wc -w | sed 's/[ ]*//g')" + +echo "Processing fax from $REMID ($PAGES pages)" +efix -ops $FILES /dev/null \ + | xmit "Fax: $PAGES pages from "\""$REMID"\" +mkdir done 2>/dev/null || true +mv $FILES done/ 2>/dev/null || true --- efax-0.9a.orig/debian/efax.install +++ efax-0.9a/debian/efax.install @@ -0,0 +1 @@ +debian/efax.rc etc --- efax-0.9a.orig/debian/efax.rc +++ efax-0.9a/debian/efax.rc @@ -0,0 +1,421 @@ +# efax.rc +# +# Resource file for the fax(1) program by Ed Casas +# +# This file can be used for settings that are specific to the setup of +# the machine on which fax is used -- for example information about the +# modem being used, how to proint the header information on outgoing faxes +# etc. See the manual page fax(1) and the script /usr/bin/fax for details. +# +# This file was written by Dirk Eddelbuettel based mostly +# on the configuration settings of /usr/bin/fax, and adapted to reflected +# Debian specific settings. In particular, +# -- use of paperconf (from the libpaperg package) to determine papersize +# -- use of binary-format lockfiles +# +# Please send Debian-specific comments or requests to + + +# --- Start of user configuration section --- + +# +# Notes: +# +# - do not put spaces before or after the equal (=) signs. +# +# - variables can also be set on the command line, for example: +# fax DEV=ttyS0 send file.ps +# or in a configuration file (see CONFIGFILES below) +# + +# The names of the fax script, efax and efix, including full path +# if necessary. + +FAX=fax +EFAX=efax +EFIX=efix + +# The device to which the fax modem is connected (e.g. ttya for +# /dev/ttya). Use a dial-out (ttyS?) device if available. If +# there are links to this device then all programs must use same +# name or the UUCP locking mechanism will fail. For example, if +# /dev/modem is a link to /dev/ttyS1, then getty, uucp, kermit, +# pppd, dip, etc. must *all* use either /dev/modem or /dev/ttyS1. + +DEV=ttyS1 + +# Your fax number in international format, 20 characters maximum. +# Use only digits, spaces, and the "+" character. + +FROM="+1 800 555 5555" + +# Your name as it should appear on the page header. + +NAME="Put Your Name Here" + +# The preferred page size for creating and printing faxes. +# Allowed values are "letter", "legal", and "a4". + +# PAGE=letter +# PAGE=legal +# PAGE=a4 +# PAGE determines the paper size, we use Debian's libpaper to get the value +PAGE=`paperconf` + +# The type of printer. Use 'pcl' for HP-PCL or 'ps' for +# Postscript. See definition of PRINT (below) for more options. + +PRTYPE=ps # Postscript (e.g. Apple LaserWriter) +# PRTYPE=pcl # HP-PCL (e.g. HP LaserJet) + +# The command to print image files from standard input. Typically +# this is "lpr" or "lp". + +PRCMD="lpr" + +# The command to view a Portable Gray Map (PGM) image from the +# standard input. Typically "xv -" or "xloadimage stdin". + +VIEWCMD="xloadimage stdin" # best +# VIEWCMD="pnmtoxwd | xwud" # slower alternative +# VIEWCMD="xv -" # much slower alternative + +# The name of the Ghostscript executable including full path if +# necessary. Only required if faxing Postscript files. + +GS=gs + +# Dial string prefix and suffix such as T for tone dialing, P for +# pulse dialing, 9 to get an external line, commas for delays or +# W to wait for dial tone. See definition of TELCVT below if you +# have more complex requirements. + +DIALPREFIX="T" +DIALSUFFIX="" + +# The name(s) of lock file(s) according to your system's +# conventions. Protect with single quotes for delayed evaluation. +# Add a leading '#' to the file name to use binary format. + +LOCK='-x /var/lock/LCK..$DEV' # modern systems +# LOCK='-x /usr/spool/uucp/LCK..$DEV' # older systems +# LOCK='-x /var/lock/LCK..$DEV -x /var/spool/uucp/LCK..$DEV' # both +# LOCK='-x #/usr/spool/uucp/LCK..$DEV' # binary format +# LOCK='-x /usr/spool/locks/LK.047.040.011' # SysV style names +# LOCK='' # no lock file + + +# Uncomment one of the following lines to force xon/xoff flow +# control only if you have one of the types of modems listed. + +# FCINIT='-j\Q4' # AT&T (Dataport, Paradyne) +# FCINIT='-j\Q1' # Motorola (Power Modem, 3400 Pro,...) +# FCINIT='-j*F1' # QuickComm (Spirit II) +# FCINIT='-j&H2' # USR (Courier, Sportster) +# FCINIT='-or' # Multi-Tech (for bit reversal) + +# **************************************************************** +# The remaining options probably won't need to be changed. +# **************************************************************** + +# Configuration files that are sourced if they exist. Comment +# out if you don't need to use config files. Warning: any type of +# shell command in these files will be executed. + +CONFIGFILES="/etc/efax.rc ${HOME:-~}/.efaxrc ./.efaxrc" + +# A command that will generate unique names for logs and received +# files. 'date +%m%d%H%M%S' works on most systems. Protect with +# single quotes. + +TSTAMP='date +%m%d%H%M%S' +# TSTAMP='echo $$' # alternative - use process number + +# Shell command to convert aliases to phone numbers when sending +# faxes. When executed $1 will be the alias and $f the file name +# to search. The example below uses a directory file where alias +# lines start with the keyword "fax" followed by the alias in +# parentheses and a colon. The remainder of the line is taken to +# be the phone number. Other lines are ignored. For example, if +# one of the files in DIRFILES (defined below) contained the line +# "fax(kpmg): 691-3031", you could use the command "fax send kpmg +# invoice.24". Protect with single quotes. + +LOOKUP='eval sed -n -e "/^fax($1):/{" -e "s/^[^:]*://p" -eq -e"}" $f' + +# List of telephone directory file(s) to be searched. The +# default is the file .faxdir in the user's home directory. + +DIRFILES="${HOME:-.}/.faxdir" + +# Shell command to convert phone numbers to dial strings. This +# lets you to store numbers without the long distance or +# alternate carrier access codes, passwords, accounting digits, +# etc. In the examples below this is used to convert numbers +# beginning with '+'; the first substitution handles same-country +# calls and the second handles international calls. + +TELCVT='sed -e s/+1/1/ -e s/+/011/' # North America +# TELCVT='sed -e s/+61/0/ -e s/+/0011/' # Australia +# TELCVT='sed -e s/+44/0/ -e s/+/00/' # UK +# TELCVT='sed -e s/+49/0/ -e s/+/00/' # Germany +# TELCVT='sed -e s/+852// -e s/+/001/' # Hong Kong +# TELCVT='sed -e s/+33// -e s/+/19W/' # France (?) +# TELCVT='sed -e s/+34/0/ -e s/+/07W/' # Spain +# TELCVT='sed -e s/+1/10288/' # use AT&T +# TELCVT='sed -e s/+/T82W1682W9W/' # get out of PBX + +# efix options to use a bitmap font for text-to-fax conversion. +# The option -l66 puts 66 lines of text per page, -d1,1 sets 1 +# inch top & left margin. Comment these out to use the built-in +# font. Use "fax makefont" to make bitmap fonts from Postscript +# fonts. + +# TEXTFONT="-l66 -d1,1 -f /usr/bin/efaxfont" + +# efax options to specify a different font for headers. Generate +# using "fax makefont." + +# HDRFONT="-f /usr/bin/efaxfont" + +# Dimensions of page sizes. + +PAGE_letter="8.465x11in" # fax width x letter length +PAGE_legal="8.465x14in" # fax width x legal length +PAGE_a4="21x29.7cm" # ISO A4 + +# Default resolution for converting to fax format. Can only be +# 204x196 or 204x98. + +RES=204x196 # default "Fine" resolution (196 lpi) +# RES=204x98 # standard resolution (98 lpi) + +# When the print and view commands below are executed, $f will be +# the input file name and $PAGEDIM will be one of the above page +# dimensions. Protect with single quotes. + +# PRINT: A command to convert fax files to a printable format. +# For printers other than Postscript or PCL you can use efix's +# PBM output and an appropriate pbm filter (such as pbmtoepson) +# or efix's Postsript output and Ghostscript as a filter. Change +# the scaling (-s) and displacement (-d) options as required to +# fit the image onto the area your printer can print. + +PRINT='$EFIX -ve -p$PAGEDIM -r300 -s0.98 -d0,0.125 -o$PRTYPE $f' + +# example using pbm utilities: +# PRINT='$EFIX -ve -p$PAGEDIM -r60x72 -opbm $f | pbmtoepson' + +# example using Ghostscript: +# PRINT='$EFIX -ve -p$PAGEDIM -r120x144 -ops $f | \ +# $GS -q -sPAPERSIZE=$PAGE -sDEVICE=epson -r120x144 \ +# -dNOPAUSE -dSAFER -sOutputFile=- - ' + +# VIEW: A command to convert fax files to PGM format for +# previewing. efix's pgm output reduces image dimensions by 4X. + +# VIEW='$EFIX -ve -p$PAGEDIM -r200 -opgm $f' # 50dpi: fast, whole-page view +VIEW='$EFIX -ve -p$PAGEDIM -r300 -opgm $f' # 75dpi: slower, readable size + +# Commands to set up modem. "-iZ -i&FE&D2S7=120 -i&C0" +# works with almost all modems. See the efax(1) man page for +# details. + +INIT="-iZ -i&FE&D2S7=120 -i&C0" + +# Command(s) to reset modem when efax finishes. "-kZ" works in +# almost all cases. + +RESET="-kZ" +# RESET="-kZ -k&F+FCLASS=0" # for modems that stay in fax mode after reset + +# Speaker mode(M) and loudness(L). Mn sets speaker mode where n +# means: 0:never, 1:until carrier, 2:always, 3:on receive only. + +SPKR="-iM1L0" + +# Options to use a particular command sets. Normally efax +# selects the command set based on the modem's capabilities. Use +# -o1 to force Class 1, -o2 for Class 2 and -o0 for Class 2.0. + +# CLASSINIT="-o1" # Class 1 +# CLASSINIT="" # Class 2 +# CLASSINIT="-o0" # Class 2.0 + +# The modem's capabilities for sending faxes. Normally efax +# chooses these by querying the modem. "-c 1,3,0,0,0,0,0,0" +# forces 9600 bps maximum speed. See the efax(1) man page for a +# description of the fields. + +# TXCAP="-c 1,3,0,2,0,0,0,0" + +# Capabilities for receiving faxes. Usually the same as TXCAP. +# If your modem only receives at 4800 bps use "-c 1,1,0,0,0,0,0,0". + +# RXCAP="$TXCAP" + +# Additional options required only for transmit or only for +# receive. None normally required. + +RXINIT="" +TXINIT="" + +# Command to make a date for the page header. Protect with single +# quotes. 'date "+%Y/%m/%d %H:%M"' works on most systems. + +DATECMD='date "+%Y/%m/%d %H:%M"' # YYYY/MM/DD HH:MM (24hour) +# DATECMD='date' # longer, more readable + +# Page header format. You may use $DATE, $NAME, $FROM, $TO, and +# "%d/%d" (for page number and count). Protect with single +# quotes. Example: '$DATE $FROM $NAME p. %d/%d'. + +HDR='$DATE $FROM $NAME p. %d/%d' + +# BUSYRETRIES is a list of delays in seconds between attempts to +# redial busy numbers. Comment out if you don't want to retry +# busy numbers. + +BUSYRETRIES="30 60 120 300 60 600 60 60 1200 60 60" + +# FAILRETRIES is a list of delays in seconds between attempts to +# retry failed transmissions. Retries are only attempted if at +# least one page was sent in the previous attempt. Retries +# include only pages not already sent. Comment out if you don't +# want to retry failed transmissions. + +FAILRETRIES="300 300" # try two more times at 5 minute intervals + +# Command to run another program (efax) at a higher-than-normal +# scheduling priority. This command isn't used if it fails +# (e.g. because the current user isn't privileged). Comment this +# out if it causes problems. + +NICE="nice -n -10" + +# Standard versions of commands that are often aliased. + +RM="/bin/rm -f" +LS="/bin/ls" + +# Messages to display. VERB sets the messages displayed (stderr) +# and VERBLOG the messages written to log files (stdout). + +VERB="ewin" # show errors, warnings, progress & negotiation +VERBLOG="chewmainrxtf" # log everything + +# **************************************************************** +# The remaining configuration options apply only to the `fax +# answer' command. You can ignore these if you will only be +# running efax manually. See "USING INIT TO RUN EFAX" in the +# efax man page for more information. +# **************************************************************** + +# device or file where fatal error messages should be written + +CONSOLE=/dev/console + +# The directory to store incoming faxes and log files. This directory +# should already exist and be writable by the user(s) of this script. + +FAXDIR=/var/spool/fax +#LOGDIR=/var/log/fax +LOGDIR=/var/log/efax + +# The strftime(3) pattern that generates the file name for +# received files. For example, at 10:45:36 on February 25, +# "%m%d%H%M%S" would produce 0225104536, "%j-%H%M" would produce +# 056-1045, and %d%b%H%M 25Feb1045. + +ANSFNAME="%m%d%H%M%S" + +# umask for received files. Use 022 to allow anyone to retrieve faxes. + +UMASK=022 + +# The user to be sent mail when a fax is received. + +FAXMGR=root + +# The sendmail executable including full path if necessary. Only +# required if forwarding received faxes by e-mail in $NOTIFY. + +SENDMAIL=/usr/sbin/sendmail + +# The command to execute when a fax is received. Normally this +# sends FAXMGR e-mail or prints the received fax. The variable +# $f will be the name of the log file, $FILES will contain the +# names of the received files, and $REMID will have the remote ID +# string or '?' if none. The faxmail function will e-mail the fax +# as MIME image/tiff attachments. Comment this out to do +# nothing. Protect with single quotes. + +NOTIFY='faxmail "$REMID" "$f" $FILES | $SENDMAIL $FAXMGR' +# NOTIFY='mail -s "fax/message from $REMID: $FILES" $FAXMGR <$f' +# NOTIFY='lpr $f ; $FAX print $OPT $FILES' +# NOTIFY='/usr/local/bin/efax-convert "$REMID" $FILES' + +# The number of rings to wait before answering. + +ANSRINGS=1 + +# If you want to enable fax/data adaptive answer (AA) read the +# efax man page and define DATAINIT to be the options that enable +# AA. Note: AA does not work properly on some (2400/9600) modems +# unless the modem initialization is done at 2400 bps (not +# possible with efax). USR modems do not support modem adaptive +# answer (+FAE=) in Class 1. &C1 enables most modems' DCD line +# so a signal can be sent to shells when a call is dropped. You +# must also define DCMD (see below). + +DATAOPT="-j&C1 -j+FCLASS=0 -jS7=30" +# DATAINIT="$DATAOPT -j+FAE=1" # Class 1 modem adaptive answer +# DATAINIT="$DATAOPT -j+FAA=1" # Class 2[.0] modem adaptive answer +# DATAINIT="$DATAOPT -oa" # software adaptive answer +# DATAINIT="$DATAOPT" # data-only answer + +# If you have a voice modem and want to answer in voice mode +# define VOICEINIT to be the options that enable voice mode. You +# must also set VCMD below. Voice support is not yet available. + +# VOICEINIT="-j#CLS=8" # Rockwell voice modems +# VOICEINIT="-jM2L2#CLS=8#VLS=4" # with speaker on + +# Argument to exec(2) of "/bin/sh -c" for incoming data calls. +# This command will usually exec getty(8) but can include other +# commands to set up the serial port, etc. Up to 6 %d arguments +# are replaced by the baud rate following the CONNECT response +# from the modem or 19200 if none. If using getty_ps ensure +# /etc/gettydefs has entries for all possible %d values +# (e.g. 19200). Use 'nice' if required to reduce any special +# priority set by NICE. + +DCMD="exec /sbin/getty -h $DEV %d vt100" # for getty_ps (Linux) +# DCMD="exec /sbin/agetty -h $DEV %d vt100" # for agetty (Linux) +# DCMD="exec pppd $DEV %d" # start PPP server + +# Argument to exec(2) of "/bin/sh -c" for incoming voice calls. +# This command will usually be a shell script that interacts with +# the caller by using efone to play/record audio and detect DTMF +# tones. Up to 6 %d arguments are replaced by the modem file +# descriptor. VCMD can "exec fax reanswer" to switch to fax or +# data mode if required. + +FONE=/usr/bin/fone # minimal voice mail +VCMD="exec $FONE %d" + +# The owner.group and mode to which "fax answer" sets the serial +# device. This allows non-root processes to grab the device from +# efax even if a previous process (e.g. login) has changed it. +# Comment out if you don't need to reset device ownership. +# +# Set to empty strings for prevent resetting. If you need special owner +# or modes settings, specify them here. +OWNER="" +MODE="" + +# Regular expression for efax exit codes in log files that will +# *not* be saved. For example, use [145] to ignore exits due to +# `locked' (1), `no modem' (4), and `signal' (5) conditions + +NOLOG='[145]' --- efax-0.9a.orig/debian/examples +++ efax-0.9a/debian/examples @@ -0,0 +1 @@ +debian/efax-convert --- efax-0.9a.orig/debian/patches/00fax_locale.dpatch +++ efax-0.9a/debian/patches/00fax_locale.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh -e +## 00fax_locale by Filippo Panessa +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fixed fax (view|make|send) for all locales (Closes: #160926, #165832) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +diff -Nuar efax-0.9a.orig/efix.c efax-0.9a/efix.c +--- efax-0.9a.orig/efix.c 2000-02-06 23:36:25.000000000 +0100 ++++ efax-0.9a/efix.c 2003-04-10 18:58:30.000000000 +0200 +@@ -249,7 +249,7 @@ + + argv0 = argv[0] ; + +- setlocale ( LC_ALL, "" ) ; ++ // setlocale ( LC_ALL, "" ) ; + + /* process arguments */ + --- efax-0.9a.orig/debian/patches/00list +++ efax-0.9a/debian/patches/00list @@ -0,0 +1,11 @@ +00fax_locale +01faxmail-mime +02fax_notify +03fax_send +04crashpowerpc +05attachfax.dpatch +06configfiles.dpatch +07logfilenames.dpatch +08manpages.dpatch +09nonfaxFCLASSerror.dpatch +10device_halted.dpatch --- efax-0.9a.orig/debian/patches/01faxmail-mime.dpatch +++ efax-0.9a/debian/patches/01faxmail-mime.dpatch @@ -0,0 +1,33 @@ +#! /bin/sh -e +## 01faxmail-mime by Filippo Panessa +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fixed wrong MIME generates from fax scripts in faxmail function +## DP: (Closes: #140114) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +diff -Nuar efax-0.9a.orig/fax efax-0.9a/fax +--- efax-0.9a.orig/fax 2003-04-11 01:01:27.000000000 +0200 ++++ efax-0.9a/fax 2003-04-11 01:01:53.000000000 +0200 +@@ -488,7 +488,7 @@ + echo "Content-Disposition: attachment; filename=\"$f.tiff\"" + echo "" + $EFIX -M <$f +- echo "--EFAX_MAIL--" ++ # echo "--EFAX_MAIL--" + done + echo "--EFAX_MAIL--" + } --- efax-0.9a.orig/debian/patches/02fax_notify.dpatch +++ efax-0.9a/debian/patches/02fax_notify.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh -e +## 02fax_notify by Filippo Panessa +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fixed REMID and FILES values in NOTIFY fax script (Closes: #130614) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +diff -Nuar efax-0.9a.orig/fax efax-0.9a/fax +--- efax-0.9a.orig/fax 2003-04-14 00:13:01.000000000 +0200 ++++ efax-0.9a/fax 2003-04-14 00:13:40.000000000 +0200 +@@ -335,7 +335,7 @@ + # as MIME image/tiff attachments. Comment this out to do + # nothing. Protect with single quotes. + +-NOTIFY='faxmail | $SENDMAIL $FAXMGR' ++NOTIFY='faxmail "$REMID" "$f" $FILES | $SENDMAIL $FAXMGR' + # NOTIFY='mail -s "fax/message from $REMID: $FILES" $FAXMGR <$f' + # NOTIFY='lpr $f ; $FAX print $OPT $FILES' + --- efax-0.9a.orig/debian/patches/03fax_send.dpatch +++ efax-0.9a/debian/patches/03fax_send.dpatch @@ -0,0 +1,35 @@ +#! /bin/sh -e +## 03fax_send by Filippo Panessa +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Added feedback when user forgets to specify the file to send with +## DP: fax script (Closes: #144406) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +diff -Nuar efax-0.9a/fax efax-0.9a.orig/fax +--- efax-0.9a/fax 2003-04-18 17:53:48.000000000 +0200 ++++ efax-0.9a.orig/fax 2003-04-18 17:56:39.000000000 +0200 +@@ -795,6 +795,10 @@ + 0) echo "missing phone number to call" ; ERR=2 ; break ;; + esac + ++ case $# in ++ 1) echo "missing file to send" ; ERR=2 ; break ;; ++ esac ++ + # look up names + + case $1 in --- efax-0.9a.orig/debian/patches/04crashpowerpc.dpatch +++ efax-0.9a/debian/patches/04crashpowerpc.dpatch @@ -0,0 +1,56 @@ +#! /bin/sh -e +## 03fax_send by Matteo Frigo +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix segfault on PowerPC #280271 + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +--- efax-0.9a-001114/efaxmsg.c 1999-03-19 22:38:20.000000000 -0600 ++++ efax-0.9a/efaxmsg.c 2004-11-27 19:20:04.083647672 -0600 +@@ -98,9 +98,6 @@ + int err=0, i, flags=0 ; + char *p ; + +- va_list ap ; +- va_start ( ap, fmt ) ; +- + if ( ! init ) { + logfile[0] = stderr ; + logfile[1] = stdout ; +@@ -111,6 +108,9 @@ + } + + for ( i=0 ; i&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +diff -Nuar efax-0.9a.orig/fax efax-0.9a/fax +--- efax-0.9a.orig/fax 2004-03-01 22:54:11.000000000 +0100 ++++ efax-0.9a/fax 2003-08-15 17:04:47.000000000 +0200 +@@ -482,13 +482,15 @@ + cat $f + for f in $FILES + do +- echo "--EFAX_MAIL" +- echo "Content-Type: image/tiff; name=\"$f.tiff\"" +- echo "Content-Transfer-Encoding: base64" +- echo "Content-Disposition: attachment; filename=\"$f.tiff\"" +- echo "" +- $EFIX -M <$f +- # echo "--EFAX_MAIL--" ++ if [ -r $f ] ; then ++ echo "--EFAX_MAIL" ++ echo "Content-Type: image/tiff; name=\"$f.tiff\"" ++ echo "Content-Transfer-Encoding: base64" ++ echo "Content-Disposition: attachment; filename=\"$f.tiff\"" ++ echo "" ++ $EFIX -M <$f ++ # echo "--EFAX_MAIL--" ++ fi + done + echo "--EFAX_MAIL--" + } +@@ -525,7 +527,10 @@ + 0) + $RM $f + ;; +- 1) FILES=`sed -n -e '/received ->/s/^.*-> \(.*\)$/\1/p' $f` ++ 1) ++# FILES=`sed -n -e '/received ->/s/^.*-> \(.*\)$/\1/p' $f` ++ FILES=`sed -n -e '/wrote /s/^.* wrote \(.*\) as .*$/\1/p' $f` ++ + FILES=`echo $FILES` + REMID=`sed -n -e '/remote ID ->/s/^.*-> \(.*\)$/\1/p' \ + -e tok -e b -e ':ok' -e q $f` --- efax-0.9a.orig/debian/patches/06configfiles.dpatch +++ efax-0.9a/debian/patches/06configfiles.dpatch @@ -0,0 +1,46 @@ +#! /bin/sh -e +## 06configfiles by Paolo P. +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Actually read other CONFIGFILES +## DP: (Closes: #198149) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +diff -Nuar efax-0.9a.orig/fax efax-0.9a/fax +--- efax-0.9a.orig/fax Sat Apr 19 00:00:00 2003 ++++ efax-0.9a.orig/fax Fri Jun 20 07:57:05 2003 +@@ -408,13 +408,17 @@ + # **************************************************************** + + # --- source configuration files +- +-for f in $CONFIGFILES +-do ++oCONFIGFILES= ++while [ "$CONFIGFILES" != "$oCONFIGFILES" ]; do ++# loop needed if we allow CONFIGFILES to change in default CONFIGFILES' ++ oCONFIGFILES=$CONFIGFILES ++ for f in $CONFIGFILES ++ do + if [ -r $f ] + then + . $f + fi ++ done + done + + # --- set any variables given on command line + --- efax-0.9a.orig/debian/patches/07logfilenames.dpatch +++ efax-0.9a/debian/patches/07logfilenames.dpatch @@ -0,0 +1,72 @@ +#! /bin/sh -e +## 07logfilenames by MJ Ray +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Make logfile names end with .efax.log instead of .log and change LOGDIR + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +diff -Nuar efax-0.9a.orig/fax efax-0.9a/fax +--- efax-0.9a.orig/fax 2005-10-02 14:34:48.000000000 +0100 ++++ efax-0.9a/fax 2005-10-02 14:36:09.000000000 +0100 +@@ -305,7 +305,7 @@ + # should already exist and be writable by the user(s) of this script. + + FAXDIR=/var/spool/fax +-LOGDIR=/var/log/fax ++LOGDIR=/var/log/efax + + # The strftime(3) pattern that generates the file name for + # received files. For example, at 10:45:36 on February 25, +@@ -531,8 +531,8 @@ + -e tok -e b -e ':ok' -e q $f` + case $REMID in '') REMID='?' ;; esac + eval $NOTIFY +- echo >>${LOGDIR}/${DEVN}.log && \ +- cat $f >>${LOGDIR}/${DEVN}.log && \ ++ echo >>${LOGDIR}/${DEVN}.efax.log && \ ++ cat $f >>${LOGDIR}/${DEVN}.efax.log && \ + $RM $f || \ + echo "Error: $FAX cannot save log files" >>$CONSOLE + ;; +@@ -871,8 +871,8 @@ + 0) ;; *) echo "Will try again in $s seconds" ; sleep $s ;; + esac + +-# logfile=`$TSTAMP`.log +- logfile="$TELNO".log ++# logfile=`$TSTAMP`.efax.log ++ logfile="$TELNO".efax.log + + for t in 0 $BUSYRETRIES ; do + +@@ -968,7 +968,7 @@ + r*) + + case $1 in '') file=`$TSTAMP` ;; *) file=$1 ;; esac +- logfile=${file}.log ++ logfile=${file}.efax.log + + $NICE $EFAX -v "$VERB" -v "$VERBLOG" -d/dev/$DEV $LOCK $INIT $SPKR \ + $CLASSINIT $FCINIT $RXINIT \ +@@ -1043,7 +1043,7 @@ + use VAR=value to set variables (e.g. "fax DEV=cua2 receive") + + session logs are written to a file with the date/time as the +- file name and extension of .log (except for automatic reception). ++ file name and extension of .efax.log (except for automatic reception). + + fax device is /dev/$DEV, incoming spool directory is $FAXDIR + --- efax-0.9a.orig/debian/patches/08manpages.dpatch +++ efax-0.9a/debian/patches/08manpages.dpatch @@ -0,0 +1,44 @@ +#! /bin/sh -e +## 08manpages by MJ Ray +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Update website URL and example in man pages +## DP: (Closes: #322258,#322259) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +diff -Nuar efax-0.9a.orig/efax.1 efax-0.9a/efax.1 +--- efax-0.9a.orig/efax.1 2000-02-24 15:35:30.000000000 +0000 ++++ efax-0.9a/efax.1 2005-10-02 14:44:05.000000000 +0100 +@@ -1177,7 +1177,7 @@ + patches is available at: + .IP + .ft CW +-http://casas.ee.ubc.ca/efax/ ++http://www.cce.com/efax/ + .ft P + .LP + +--- efax-0.9a.orig/fax.1 1999-03-04 16:07:56.000000000 +0000 ++++ efax-0.9a/fax.1 2005-10-02 14:47:31.000000000 +0100 +@@ -83,7 +83,7 @@ + + Assignments of the form \fIVARIABLE\fB=\fIvalue\fR may appear + before the command name to temporarily change the values of most +-fax script variables (e.g. ``fax PAGE=A4 print letter.001'') ++fax script variables (e.g. ``fax PAGE=a4 print letter.001'') + + + .SH DESCRIPTION --- efax-0.9a.orig/debian/patches/09nonfaxFCLASSerror.dpatch +++ efax-0.9a/debian/patches/09nonfaxFCLASSerror.dpatch @@ -0,0 +1,33 @@ +#! /bin/sh -e +## 09nonfaxFCLASSerror by Nigel Williams +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fixed error message when non-fax-capable modem supports +FCLASS command +## DP: (Closes: #202668) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +diff -r -U3 efax-0.9a/efax.c efax-0.9a+patch/efax.c +--- efax-0.9a/efax.c 2000-11-15 04:22:09.000000000 +1100 ++++ efax-0.9a+patch/efax.c 2003-07-24 16:56:08.000000000 +1000 +@@ -2069,6 +2069,7 @@ + if ( strinresp ( "2.0" ) ) c20 = 1 ; + else if ( strinresp ( "2" ) ) ; + else if ( strinresp ( "1" ) ) c1 = 1 ; ++ else if ( strinresp ( "0" ) ) err = msg ("E3 modem does not support fax" ) ; + else err = msg ("E3 can't determine fax modem class support" ) ; + if ( strstr ( model, "Sportster" ) ) { /* USR Sporsters are buggy */ + c1 = 1 ; + --- efax-0.9a.orig/debian/patches/10device_halted.dpatch +++ efax-0.9a/debian/patches/10device_halted.dpatch @@ -0,0 +1,82 @@ +#! /bin/sh -e +## 10device_halted by DEXTARR (at freemail.hu) +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: handle case when fax device is stopped (and so $logfile disappears) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac +exit 0 + +@DPATCH@ +--- efax-0.9a/fax 2005-10-28 14:46:29.000000000 +0200 ++++ efax-0.9a/fax 2006-01-06 15:31:19.000000000 +0100 +@@ -668,17 +668,21 @@ + cd $FAXDIR ; + case $? in 0) ;; *) echo "cannot cd to $FAXDIR" ; break ;; esac + +- n= ; for f in ${DEVN}.[0-9]* ; do logfile="$f" ; n=x$n ; done ++# if fax device is halted no infos are available ++ if [ ! -f ${DEVN}.stop ] ++ then ++ n= ; for f in ${DEVN}.[0-9]* ; do logfile="$f" ; n=x$n ; done ++ ++ case $n in ++ xx*) echo Warning: multiple logs for $DEV : ; ${LS} ${DEVN}.[0-9]* ;; ++ esac ++ ++ case $logfile in ++ *\*) echo no fax answer process for device $DEV ; break ;; ++ esac + +- case $n in +- xx*) echo Warning: multiple logs for $DEV : ; ${LS} ${DEVN}.[0-9]* ;; +- esac +- +- case $logfile in +- *\*) echo no fax answer process for device $DEV ; break ;; +- esac +- +- efaxpid=`echo $logfile | sed -e "s/${DEVN}\.//g"` ++ efaxpid=`echo $logfile | sed -e "s/${DEVN}\.//g"` ++ fi + + case $cmd in + +@@ -695,6 +699,13 @@ + + stop) + ++# if fax device is halted, just print message, no other infos are available ++ if [ -f ${DEVN}.stop ] ++ then ++ echo fax daemon for ${DEV} already stopped. ++ break ++ fi ++ + if [ ! -w . ] ; then echo "can't write `pwd`" ; break ; fi + touch ${DEVN}.stop + echo stopping fax daemon for ${DEV}, pid=$efaxpid +@@ -707,7 +718,12 @@ + + st*) + +- if [ -f ${DEVN}.stop ] ; then stat="(set to stop)" ; fi ++# if fax device is halted, just print message, no other infos are available ++ if [ -f ${DEVN}.stop ] ++ then ++ echo "(set to stop)" ++ break ++ fi + + if ps -u $efaxpid 2>/dev/null ; then : + else --- efax-0.9a.orig/debian/postinst +++ efax-0.9a/debian/postinst @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +# purge templates we dropped in 1:0.9a-15 +if [ "$1" = configure ] &&\ + dpkg --compare-versions "$2" lt-nl "1:0.9a-15" && \ + [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi + +#DEBHELPER# --- efax-0.9a.orig/debian/rules +++ efax-0.9a/debian/rules @@ -0,0 +1,79 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/dpatch/dpatch.make + +# -fcommon is a workaround for #957167 +CFLAGS = -Wall -g -DDEBIAN -fcommon + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + + +build: build-stamp + +build-stamp: patch-stamp + dh_testdir + + $(MAKE) efax CC="gcc" CFLAGS="$(CFLAGS)" + $(MAKE) efix CC="gcc" CFLAGS="$(CFLAGS)" + + touch build-stamp + +clean: clean1 unpatch +clean1: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + $(MAKE) install BINDIR=$(CURDIR)/debian/efax/usr/bin MANDIR=$(CURDIR)/debian/efax/usr/share/man + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_install + install -m 0770 -o root -g dialout -d \ + $(CURDIR)/debian/efax/var/spool/fax + install -m 0770 -o root -g dialout -d \ + $(CURDIR)/debian/efax/var/log/efax + dh_installcron + dh_strip + dh_compress + dh_fixperms -X/var/log/efax -X/var/spool/fax + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install patch unpatch clean1