summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comms/efax/Makefile37
-rw-r--r--comms/efax/distinfo7
-rw-r--r--comms/efax/patches/patch-aa52
-rw-r--r--comms/efax/patches/patch-ab109
-rw-r--r--comms/efax/patches/patch-ac27
-rw-r--r--comms/efax/pkg/DEINSTALL17
-rw-r--r--comms/efax/pkg/DESCR20
-rwxr-xr-xcomms/efax/pkg/INSTALL10
-rw-r--r--comms/efax/pkg/MESSAGE8
-rw-r--r--comms/efax/pkg/PLIST7
10 files changed, 294 insertions, 0 deletions
diff --git a/comms/efax/Makefile b/comms/efax/Makefile
new file mode 100644
index 00000000000..4e7e443d735
--- /dev/null
+++ b/comms/efax/Makefile
@@ -0,0 +1,37 @@
+# $NetBSD: Makefile,v 1.1.1.1 2001/05/21 22:26:59 jtb Exp $
+
+DISTNAME= efax-0.9
+CATEGORIES= comms
+MASTER_SITES= ${MASTER_SITE_SUNSITE:=apps/serialcomm/fax/}
+
+MAINTAINER= packages@netbsd.org
+COMMENT= set of small programs for sending and receiving faxes
+
+.include "../../mk/bsd.prefs.mk"
+
+post-patch:
+ ${SED} -e 's:@PREFIX@:${PREFIX}:g; \
+ s:@LOCALBASE@:${LOCALBASE}:g; \
+ s:@SERIAL_DEVICE@:${DEFAULT_SERIAL_DEVICE:S,/dev/,,}:g' \
+ ${WRKSRC}/fax > ${WRKSRC}/fax.tmp
+ ${MV} -f ${WRKSRC}/fax.1 ${WRKSRC}/fax.1.dist
+ ${SED} -e 's:@PREFIX@:${PREFIX}:g; \
+ s:@SERIAL_DEVICE@:${DEFAULT_SERIAL_DEVICE:S,/dev/,,}:g' \
+ ${WRKSRC}/fax.1.dist > ${WRKSRC}/fax.1
+
+# XXX We need to split the `fax' script into `efax.rc' and a smaller
+# `fax' script so that the user doesn't need to edit the script itself
+# to set important variables.
+
+ ${HEAD} -n 5 ${WRKSRC}/fax.tmp > ${WRKSRC}/fax
+ ${TAIL} -n 649 ${WRKSRC}/fax.tmp >> ${WRKSRC}/fax
+ ${HEAD} -n 404 ${WRKSRC}/fax.tmp > ${WRKSRC}/efax.rc1
+ ${TAIL} -n 402 ${WRKSRC}/efax.rc1 > ${WRKSRC}/efax.rc
+
+post-install:
+ ${INSTALL_DATA_DIR} /var/spool/efax
+ ${CHMOD} 755 /var/spool/efax
+ ${INSTALL_DATA_DIR} /var/log/efax
+ ${CHMOD} 755 /var/log/efax
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/comms/efax/distinfo b/comms/efax/distinfo
new file mode 100644
index 00000000000..1702418b0c5
--- /dev/null
+++ b/comms/efax/distinfo
@@ -0,0 +1,7 @@
+SHA1 (patch-aa) = 902bb87c90179d599fe4fa1bf96d052432a0fb46
+
+SHA1 (efax-0.9.tar.gz) = 8965407996737e6ec2c8a198ba34811f5134b5d1
+Size (efax-0.9.tar.gz) = 96736 bytes
+SHA1 (patch-aa) = 902bb87c90179d599fe4fa1bf96d052432a0fb46
+SHA1 (patch-ab) = ea5a18f3558f28b71085a6dd2e13ddc5e17f5f26
+SHA1 (patch-ac) = afe6aaafe504f41c13a644aae4eb9c7584466db6
diff --git a/comms/efax/patches/patch-aa b/comms/efax/patches/patch-aa
new file mode 100644
index 00000000000..d5913a2f0e9
--- /dev/null
+++ b/comms/efax/patches/patch-aa
@@ -0,0 +1,52 @@
+$NetBSD: patch-aa,v 1.1.1.1 2001/05/21 22:27:00 jtb Exp $
+
+--- Makefile.orig Fri Mar 12 01:00:34 1999
++++ Makefile
+@@ -3,37 +3,35 @@
+ # Change the following to the name of your ANSI C compiler
+ # (normally gcc).
+
+-CC=gcc
++# CC=gcc
+
+ # Compile/load options. Add -DNO_STRERROR to CFLAGS if _strerror
+ # is undefined
+
+-CFLAGS=
+-LDFLAGS=
++# CFLAGS=
++# LDFLAGS=
+
+ # Change the following to the destination directories for
+ # binaries and man pages. Probably /usr/bin and /usr/man on
+ # Linux, /usr/local/{bin,man} on other systems.
+
+-BINDIR=/usr/bin
+-MANDIR=/usr/man
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $<
++BINDIR=${PREFIX}/bin
++MANDIR=${PREFIX}/man
++CONFDIR=${PREFIX}/etc
+
+ all: efax efix
+
+ efax: efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o
+ $(CC) -o efax $(LDFLAGS) efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o
+- strip efax
+
+ efix: efix.o efaxlib.o efaxmsg.o
+ $(CC) -o efix $(LDFLAGS) efix.o efaxlib.o efaxmsg.o
+- strip efix
+
+ install:
+- cp fax efax efix $(BINDIR)
+- cp fax.1 efax.1 efix.1 $(MANDIR)/man1
++ $(BSD_INSTALL_PROGRAM) efax efix $(BINDIR)
++ $(BSD_INSTALL_SCRIPT) fax $(BINDIR)
++ $(BSD_INSTALL_DATA) efax.rc $(CONFDIR)
++ $(BSD_INSTALL_MAN) fax.1 efax.1 efix.1 $(MANDIR)/man1
+
+ clean:
+ rm -f efax efix efax.o efix.o efaxlib.o efaxio.o efaxos.o efaxmsg.o
diff --git a/comms/efax/patches/patch-ab b/comms/efax/patches/patch-ab
new file mode 100644
index 00000000000..1673adfbe7d
--- /dev/null
+++ b/comms/efax/patches/patch-ab
@@ -0,0 +1,109 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/05/21 22:27:01 jtb Exp $
+
+--- fax.orig Wed Mar 24 08:07:28 1999
++++ fax
+@@ -14,12 +14,10 @@
+ # or in a configuration file (see CONFIGFILES below)
+ #
+
+-# The names of the fax script, efax and efix, including full path
+-# if necessary.
++# The names of efax and efix, including full path if necessary.
+
+-FAX=fax
+-EFAX=efax
+-EFIX=efix
++EFAX=@PREFIX@/bin/efax
++EFIX=@PREFIX@/bin/efix
+
+ # The device to which the fax modem is connected (e.g. ttya for
+ # /dev/ttya). Use a dial-out (cua) device if available. If
+@@ -28,7 +26,7 @@
+ # /dev/modem is a link to /dev/cua1, then getty, uucp, kermit,
+ # pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1.
+
+-DEV=cua1
++DEV=@SERIAL_DEVICE@
+
+ # Your fax number in international format, 20 characters maximum.
+ # Use only digits, spaces, and the "+" character.
+@@ -67,7 +65,7 @@
+ # The name of the Ghostscript executable including full path if
+ # necessary. Only required if faxing Postscript files.
+
+-GS=gs
++GS=@LOCALBASE@/bin/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
+@@ -81,7 +79,7 @@
+ # 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 /var/spool/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
+@@ -101,11 +99,12 @@
+ # 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.
++# Additional configuration files that are sourced if they exist.
++# Enable if you need to use config files overriding the settings in
++# this file. Warning: any type of shell command in these files will
++# be executed.
+
+-CONFIGFILES="/etc/efax.rc ${HOME:-~}/.efaxrc ./.efaxrc"
++CONFIGFILES="${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
+@@ -301,8 +300,8 @@
+ # 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
++FAXDIR=/var/spool/efax
++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,
+@@ -390,8 +389,8 @@
+ # efax even if a previous process (e.g. login) has changed it.
+ # Comment out if you don't need to reset device ownership.
+
+-OWNER=root.tty # typical
+-MODE=666 # anybody
++# OWNER=root.tty # typical
++# MODE=666 # anybody
+ # MODE=660 # only owner & group
+
+ # Regular expression for efax exit codes in log files that will
+@@ -404,7 +403,21 @@
+ # --- End of user configuration section ---
+ # ****************************************************************
+
+-# --- source configuration files
++# --- the name of this script
++
++FAX=@PREFIX@/bin/fax
++
++# --- source primary configuration file
++
++if [ -r @PREFIX@/etc/efax.rc ]
++ then
++ eval "`cat @PREFIX@/etc/efax.rc`"
++ else
++ echo "Cannot read configuration file \`@PREFIX@/etc/efax.rc\'"
++ exit 1
++fi
++
++# --- source extra configuration files (if any)
+
+ for f in $CONFIGFILES
+ do
diff --git a/comms/efax/patches/patch-ac b/comms/efax/patches/patch-ac
new file mode 100644
index 00000000000..31540012275
--- /dev/null
+++ b/comms/efax/patches/patch-ac
@@ -0,0 +1,27 @@
+$NetBSD: patch-ac,v 1.1.1.1 2001/05/21 22:27:01 jtb Exp $
+
+--- fax.1.orig Mon May 21 21:16:15 2001
++++ fax.1
+@@ -182,16 +182,16 @@
+
+ .SH FILES
+
+-The fax script will `source' the optional shell scripts
+-\fB/etc/efax.rc\fP, \fB~/.efaxrc\fP and/or \fB./.efaxrc\fP before
+-processing command-line arguments. These files can be used to
+-set script variables to custom values for a particular system,
+-user and/or directory.
++The fax script will `source' the configuration file
++\fB@PREFIX@/etc/efax.rc\fP, and optionally \fB~/.efaxrc\fP and/or
++\fB./.efaxrc\fP before processing command-line arguments. These files
++can be used to set script variables to custom values for a particular
++system, user and/or directory.
+
+ The following files are created in the FAXDIR spool directory
+ when automatic fax reception is enabled (see the fax script).
+ DEV represents the name of the fax modem device file in /dev
+-(e.g. cua1 for /dev/cua1).
++(e.g. @SERIAL_DEVICE@ for /dev/@SERIAL_DEVICE@).
+
+ .TP 10
+ DEV.\fIn\fP
diff --git a/comms/efax/pkg/DEINSTALL b/comms/efax/pkg/DEINSTALL
new file mode 100644
index 00000000000..948e9e1e29d
--- /dev/null
+++ b/comms/efax/pkg/DEINSTALL
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+if [ -d /var/spool/efax ]; then
+ filecount="`find /var/spool/efax -type f 2>/dev/null | wc -l`"
+ if [ $filecount -eq 0 ]; then
+ echo "Removing empty efax spool directories..."
+ rm -r /var/spool/efax
+ fi
+fi
+
+if [ -d /var/log/efax ]; then
+ filecount="`find /var/log/efax -type f 2>/dev/null | wc -l`"
+ if [ $filecount -eq 0 ]; then
+ echo "Removing empty efax log directories..."
+ rm -r /var/log/efax
+ fi
+fi
diff --git a/comms/efax/pkg/DESCR b/comms/efax/pkg/DESCR
new file mode 100644
index 00000000000..647645396ab
--- /dev/null
+++ b/comms/efax/pkg/DESCR
@@ -0,0 +1,20 @@
+efax is a small ANSI C/POSIX program that sends and receives faxes
+using any fax modem (Class 1, 2 or 2.0).
+
+efax is smaller and easier to install than HylaFAX or mgetty+sendfax.
+As one user put it ``EFAX is a nice simple program for single user
+systems.''
+
+The ``fax'' command, a shell script, lets you send, receive, view and
+print faxes. In larger systems, faxes can be sent by printing to a
+``fax'' printer and received faxes can be e-mailed as MIME attachments
+to an administrator for distribution. efax can also pass incoming
+data calls to a getty program.
+
+The efax package includes ``efix,'' a program to convert between
+various image file formats. To fax Postscript files you will need
+Ghostscript. To view faxes you can use any program that displays PGM
+files. efix can convert received files to Postscript or HP Laserjet
+formats for printing.
+
+efax is distributed under the terms of the GNU General Public License.
diff --git a/comms/efax/pkg/INSTALL b/comms/efax/pkg/INSTALL
new file mode 100755
index 00000000000..da11e0ac39f
--- /dev/null
+++ b/comms/efax/pkg/INSTALL
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+test -d /var/spool || \
+ ( mkdir /var/spool ; chmod 755 /var/spool )
+test -d /var/spool/efax || \
+ ( mkdir /var/spool/efax ; chmod 755 /var/spool/efax )
+test -d /var/log || \
+ ( mkdir /var/log ; chmod 755 /var/log )
+test -d /var/log/efax || \
+ ( mkdir /var/log/efax ; chmod 755 /var/log/efax )
diff --git a/comms/efax/pkg/MESSAGE b/comms/efax/pkg/MESSAGE
new file mode 100644
index 00000000000..b69a9f0cd53
--- /dev/null
+++ b/comms/efax/pkg/MESSAGE
@@ -0,0 +1,8 @@
+$NetBSD: MESSAGE,v 1.1.1.1 2001/05/21 22:27:00 jtb Exp $
+
+You will need to edit `${PREFIX}/etc/efax.rc' to set a number of
+important configuration options. This file does not get deleted when
+you deinstall efax.
+
+To fax Postscript files you will need to install Ghostscript. To view
+faxes you can use any program that displays PGM files.
diff --git a/comms/efax/pkg/PLIST b/comms/efax/pkg/PLIST
new file mode 100644
index 00000000000..db55232e1fe
--- /dev/null
+++ b/comms/efax/pkg/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2001/05/21 22:26:59 jtb Exp $
+bin/efax
+bin/efix
+bin/fax
+man/man1/efax.1
+man/man1/efix.1
+man/man1/fax.1