Initial checkin of EFax, a simpler FAX package good for single-user unices.
This commit is contained in:
parent
0c2b2def1f
commit
1ce805942b
34
comms/efax/Makefile
Normal file
34
comms/efax/Makefile
Normal file
@ -0,0 +1,34 @@
|
||||
# OpenBSD makefile for: kaffe
|
||||
# Version required: 1.0.b1
|
||||
# Date created: 27 Aug 1998
|
||||
# Whom: ian
|
||||
#
|
||||
# $OpenBSD: Makefile,v 1.1 1998/09/06 22:39:51 ian Exp $
|
||||
|
||||
DISTNAME= efax08a
|
||||
CATEGORIES= comm
|
||||
|
||||
MASTER_SITES= ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/
|
||||
|
||||
MAINTAINER= ian@OpenBSD.ORG
|
||||
|
||||
IS_INTERACTIVE= yes # for reasons shown in per-install!
|
||||
pre-install:
|
||||
@echo "At this stage you MUST customize the \"fax\" script\n\
|
||||
slightly. In the following editor session, you must set the device\n\
|
||||
name (normally cua00 on a workstation, cua01 on a PC with a serial mouse).\n\
|
||||
You also MUST SET BY LAW in many jurisdictions your name and your\n\
|
||||
return FAX telephone number.\n\
|
||||
In short, check and set at least DEV, NAME and FROM, in addition to\n\
|
||||
any modem-specific settings required."
|
||||
@echo Press return to continue...
|
||||
@sh -c "read junk"
|
||||
vi ${WRKSRC}/fax
|
||||
|
||||
# the inner program, efax, must be setuid uucp, same as tip, cu, uucp,
|
||||
# so that it can open /dev/cua?? read/write.
|
||||
post-install:
|
||||
chown uucp ${PREFIX}/bin/efax
|
||||
chmod u+s ${PREFIX}/bin/efax
|
||||
|
||||
.include <bsd.port.mk>
|
1
comms/efax/files/md5
Normal file
1
comms/efax/files/md5
Normal file
@ -0,0 +1 @@
|
||||
MD5 (efax08a.tar.gz) = d78d0ddf412af53dcc8e19b5a09496eb
|
31
comms/efax/patches/patch-aa
Normal file
31
comms/efax/patches/patch-aa
Normal file
@ -0,0 +1,31 @@
|
||||
*** Makefile.orig Sun Sep 15 12:30:13 1996
|
||||
--- Makefile Sat Sep 5 14:42:55 1998
|
||||
***************
|
||||
*** 17,24 ****
|
||||
# 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 $<
|
||||
--- 17,24 ----
|
||||
# binaries and man pages. Probably /usr/bin and /usr/man on
|
||||
# Linux, /usr/local/{bin,man} on other systems.
|
||||
|
||||
! BINDIR=/usr/local/bin
|
||||
! MANDIR=/usr/local/man
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
***************
|
||||
*** 27,33 ****
|
||||
|
||||
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
|
||||
--- 27,32 ----
|
165
comms/efax/patches/patch-ab
Normal file
165
comms/efax/patches/patch-ab
Normal file
@ -0,0 +1,165 @@
|
||||
*** efax.c.orig Sat Sep 5 14:33:25 1998
|
||||
--- efax.c Sat Sep 5 14:40:41 1998
|
||||
***************
|
||||
*** 565,571 ****
|
||||
if ( ckfmt ( header, 6 ) )
|
||||
msg ( "W too many %%d escapes in header format string \"%s\"", header ) ;
|
||||
else
|
||||
! sprintf ( headerbuf, header, page, pages, page, pages, page, pages ) ;
|
||||
msg ("I header:[%s]", headerbuf ) ;
|
||||
|
||||
done = err = ttymode ( mf, SEND ) ;
|
||||
--- 565,571 ----
|
||||
if ( ckfmt ( header, 6 ) )
|
||||
msg ( "W too many %%d escapes in header format string \"%s\"", header ) ;
|
||||
else
|
||||
! snprintf ( headerbuf, sizeof headerbuf, header, page, pages, page, pages, page, pages ) ;
|
||||
msg ("I header:[%s]", headerbuf ) ;
|
||||
|
||||
done = err = ttymode ( mf, SEND ) ;
|
||||
***************
|
||||
*** 1552,1558 ****
|
||||
if ( done ) continue ;
|
||||
|
||||
if ( changed ) {
|
||||
! sprintf ( buf, c20 ? "+FIS=%d,%d,%d,%d" : "+FDIS=%d,%d,%d,%d",
|
||||
local[0], local[1], local[2], local[3] ) ;
|
||||
ckcmd ( mf, 0, buf, TO_FT, OK ) ;
|
||||
if ( gethsc ( &hsc, &err ) ) continue ;
|
||||
--- 1552,1558 ----
|
||||
if ( done ) continue ;
|
||||
|
||||
if ( changed ) {
|
||||
! snprintf ( buf, sizeof buf, c20 ? "+FIS=%d,%d,%d,%d" : "+FDIS=%d,%d,%d,%d",
|
||||
local[0], local[1], local[2], local[3] ) ;
|
||||
ckcmd ( mf, 0, buf, TO_FT, OK ) ;
|
||||
if ( gethsc ( &hsc, &err ) ) continue ;
|
||||
***************
|
||||
*** 1697,1703 ****
|
||||
int err=0, hsc=-1 ;
|
||||
char c, dsbuf [ 128 ] ;
|
||||
|
||||
! sprintf ( dsbuf, nowait ? "D%.126s;" : "D%.127s" , s ) ;
|
||||
msg ( "Idialing %s", dsbuf+1 ) ;
|
||||
|
||||
c = cmd ( f, dsbuf, TO_A ) ;
|
||||
--- 1697,1703 ----
|
||||
int err=0, hsc=-1 ;
|
||||
char c, dsbuf [ 128 ] ;
|
||||
|
||||
! snprintf ( dsbuf, sizeof dsbuf, nowait ? "D%.126s;" : "D%.127s" , s ) ;
|
||||
msg ( "Idialing %s", dsbuf+1 ) ;
|
||||
|
||||
c = cmd ( f, dsbuf, TO_A ) ;
|
||||
***************
|
||||
*** 1820,1826 ****
|
||||
if ( ckfmt ( getty, 6 ) ) {
|
||||
err = msg ( "E3 too many %%d escapes in command (%s)", getty ) ;
|
||||
} else {
|
||||
! sprintf ( buf, getty, crate, crate, crate, crate, crate, crate ) ;
|
||||
msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ;
|
||||
execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ;
|
||||
err = msg ( "ES2exec failed:" ) ;
|
||||
--- 1820,1826 ----
|
||||
if ( ckfmt ( getty, 6 ) ) {
|
||||
err = msg ( "E3 too many %%d escapes in command (%s)", getty ) ;
|
||||
} else {
|
||||
! snprintf ( buf, sizeof buf, getty, crate, crate, crate, crate, crate, crate ) ;
|
||||
msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ;
|
||||
execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ;
|
||||
err = msg ( "ES2exec failed:" ) ;
|
||||
***************
|
||||
*** 1839,1845 ****
|
||||
char buf [ MAXGETTY ] ;
|
||||
if ( ckfmt ( vcmd, 6 ) ) {
|
||||
} else {
|
||||
! sprintf ( buf, vcmd, f->fd, f->fd, f->fd, f->fd, f->fd, f->fd ) ;
|
||||
msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ;
|
||||
execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ;
|
||||
err = msg ( "ES2exec failed:" ) ;
|
||||
--- 1839,1845 ----
|
||||
char buf [ MAXGETTY ] ;
|
||||
if ( ckfmt ( vcmd, 6 ) ) {
|
||||
} else {
|
||||
! snprintf ( buf, sizeof buf, vcmd, f->fd, f->fd, f->fd, f->fd, f->fd, f->fd ) ;
|
||||
msg ( "Iexec'ing /bin/sh -c \"%s\"" , buf ) ;
|
||||
execl ( "/bin/sh" , "sh" , "-c" , buf , (void*) 0 ) ;
|
||||
err = msg ( "ES2exec failed:" ) ;
|
||||
***************
|
||||
*** 1894,1905 ****
|
||||
|
||||
ckcmd ( mf, &err, "+FCR=1", t, OK ) ;
|
||||
|
||||
! sprintf ( buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" :
|
||||
"+FDCC=%d,%d,%d,%d,%d,%d,%d,%d",
|
||||
c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] ) ;
|
||||
ckcmd ( mf, 0, buf, -t, OK ) ;
|
||||
|
||||
! sprintf ( buf, c20 ? "+FLI=\"%.*s\"" : "+FLID=\"%.*s\"" ,
|
||||
CMDBUFSIZE-9, id ) ;
|
||||
ckcmd ( mf, 0, buf, -t, OK ) ;
|
||||
|
||||
--- 1894,1905 ----
|
||||
|
||||
ckcmd ( mf, &err, "+FCR=1", t, OK ) ;
|
||||
|
||||
! snprintf ( buf, sizeof buf, c20 ? "+FCC=%d,%d,%d,%d,%d,%d,%d,%d" :
|
||||
"+FDCC=%d,%d,%d,%d,%d,%d,%d,%d",
|
||||
c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7] ) ;
|
||||
ckcmd ( mf, 0, buf, -t, OK ) ;
|
||||
|
||||
! snprintf ( buf, sizeof buf, c20 ? "+FLI=\"%.*s\"" : "+FLID=\"%.*s\"" ,
|
||||
CMDBUFSIZE-9, id ) ;
|
||||
ckcmd ( mf, 0, buf, -t, OK ) ;
|
||||
|
||||
***************
|
||||
*** 1907,1913 ****
|
||||
|
||||
ckcmd ( mf, 0, c20 ? "+FSP=1" : "+FSPL=1", -t, OK ) ;
|
||||
|
||||
! sprintf ( buf, c20 ? "+FPI=\"%.*s\"" : "+FCIG=\"%.*s\"" ,
|
||||
CMDBUFSIZE-9, id ) ;
|
||||
ckcmd ( mf, 0, buf, -t, OK ) ;
|
||||
|
||||
--- 1907,1913 ----
|
||||
|
||||
ckcmd ( mf, 0, c20 ? "+FSP=1" : "+FSPL=1", -t, OK ) ;
|
||||
|
||||
! snprintf(buf, sizeof buf, c20 ? "+FPI=\"%.*s\"" : "+FCIG=\"%.*s\"" ,
|
||||
CMDBUFSIZE-9, id ) ;
|
||||
ckcmd ( mf, 0, buf, -t, OK ) ;
|
||||
|
||||
***************
|
||||
*** 1989,1995 ****
|
||||
msg("Wlocal ID (%s) truncated to %d characters", nxtoptarg, IDLEN ) ;
|
||||
if ( strspn ( nxtoptarg, " +0123456789" ) != strlen ( nxtoptarg ) )
|
||||
msg("Wlocal ID (%s) has non-standard characters", nxtoptarg ) ;
|
||||
! sprintf ( localid, "%*.*s", IDLEN, IDLEN, nxtoptarg ) ;
|
||||
break ;
|
||||
case 'i':
|
||||
if ( nicmd[0] < MAXICMD ) icmd[0][ nicmd[0]++ ] = nxtoptarg ;
|
||||
--- 1989,1995 ----
|
||||
msg("Wlocal ID (%s) truncated to %d characters", nxtoptarg, IDLEN ) ;
|
||||
if ( strspn ( nxtoptarg, " +0123456789" ) != strlen ( nxtoptarg ) )
|
||||
msg("Wlocal ID (%s) has non-standard characters", nxtoptarg ) ;
|
||||
! snprintf ( localid, sizeof localid, "%*.*s", IDLEN, IDLEN, nxtoptarg ) ;
|
||||
break ;
|
||||
case 'i':
|
||||
if ( nicmd[0] < MAXICMD ) icmd[0][ nicmd[0]++ ] = nxtoptarg ;
|
||||
***************
|
||||
*** 2089,2095 ****
|
||||
char tmp [ MAXLINELEN ] ;
|
||||
now = time ( 0 ) ;
|
||||
strftime ( tmp, MAXLINELEN, "%c %%s P. %%%%d", localtime ( &now ) ) ;
|
||||
! sprintf ( header = headerbuf, tmp, localid ) ;
|
||||
}
|
||||
|
||||
sigf = &faxdev ; /* make global so can clean up on signal */
|
||||
--- 2089,2095 ----
|
||||
char tmp [ MAXLINELEN ] ;
|
||||
now = time ( 0 ) ;
|
||||
strftime ( tmp, MAXLINELEN, "%c %%s P. %%%%d", localtime ( &now ) ) ;
|
||||
! snprintf ( header = headerbuf, sizeof headerbuf, tmp, localid ) ;
|
||||
}
|
||||
|
||||
sigf = &faxdev ; /* make global so can clean up on signal */
|
19
comms/efax/patches/patch-ac
Normal file
19
comms/efax/patches/patch-ac
Normal file
@ -0,0 +1,19 @@
|
||||
*** efaxio.c.orig Sat Sep 5 14:33:45 1998
|
||||
--- efaxio.c Sat Sep 5 14:42:17 1998
|
||||
***************
|
||||
*** 147,153 ****
|
||||
if ( strlen(s) >= CMDBUFSIZE-4 ) {
|
||||
msg ( "E modem command \"%s\" too long", s ) ;
|
||||
} else {
|
||||
! sprintf ( buf, "AT%s\r", s ) ;
|
||||
tputs ( f, buf, t ) ;
|
||||
}
|
||||
}
|
||||
--- 147,153 ----
|
||||
if ( strlen(s) >= CMDBUFSIZE-4 ) {
|
||||
msg ( "E modem command \"%s\" too long", s ) ;
|
||||
} else {
|
||||
! snprintf ( buf, sizeof buf, "AT%s\r", s ) ;
|
||||
tputs ( f, buf, t ) ;
|
||||
}
|
||||
}
|
76
comms/efax/patches/patch-ad
Normal file
76
comms/efax/patches/patch-ad
Normal file
@ -0,0 +1,76 @@
|
||||
*** fax.orig Mon Aug 26 03:41:29 1996
|
||||
--- fax Sat Sep 5 14:46:00 1998
|
||||
***************
|
||||
*** 22,34 ****
|
||||
# /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
|
||||
|
||||
# The type of fax modem commands to use. Un-comment one of the
|
||||
# following lines depending on your modem.
|
||||
|
||||
! # CLASS=1
|
||||
! CLASS=2
|
||||
# CLASS=2.0
|
||||
|
||||
# Your fax number in international format, 20 characters maximum.
|
||||
--- 22,34 ----
|
||||
# /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=cua01
|
||||
|
||||
# The type of fax modem commands to use. Un-comment one of the
|
||||
# following lines depending on your modem.
|
||||
|
||||
! CLASS=1
|
||||
! # CLASS=2
|
||||
# CLASS=2.0
|
||||
|
||||
# Your fax number in international format, 20 characters maximum.
|
||||
***************
|
||||
*** 50,57 ****
|
||||
# The type of printer. Use 'pcl' for HP-PCL or 'ps' for
|
||||
# Postscript. See definition of PRINT (below) for more options.
|
||||
|
||||
! PRTYPE=pcl # HP-PCL (e.g. HP LaserJet)
|
||||
! # PRTYPE=ps # Postscript (e.g. Apple LaserWriter)
|
||||
|
||||
# The command to print image files from standard input. Typically
|
||||
# this is "lpr" or "lp".
|
||||
--- 50,57 ----
|
||||
# The type of printer. Use 'pcl' for HP-PCL or 'ps' for
|
||||
# Postscript. See definition of PRINT (below) for more options.
|
||||
|
||||
! # PRTYPE=pcl # HP-PCL (e.g. HP LaserJet)
|
||||
! PRTYPE=ps # Postscript (e.g. Apple LaserWriter)
|
||||
|
||||
# The command to print image files from standard input. Typically
|
||||
# this is "lpr" or "lp".
|
||||
***************
|
||||
*** 82,92 ****
|
||||
# conventions. Protect with single quotes for delayed evaluation.
|
||||
# Add a leading '#' to the file name to use HDB (ASCII) format.
|
||||
|
||||
! LOCK='-x /usr/spool/uucp/LCK..$DEV' # "normal" systems
|
||||
# LOCK='' # no lock file
|
||||
# LOCK='-x /usr/spool/locks/LK.047.040.011' # SysV style names
|
||||
# LOCK='-x #/usr/spool/uucp/LCK..$DEV' # HDB format (ASCII pid)
|
||||
# LOCK='-x /usr/spool/uucp/LCK/LCK..$DEV' # NeXT
|
||||
|
||||
# Uncomment one of the following lines to force xon/xoff flow
|
||||
# control if you have one of the types of modems listed.
|
||||
--- 82,93 ----
|
||||
# conventions. Protect with single quotes for delayed evaluation.
|
||||
# Add a leading '#' to the file name to use HDB (ASCII) format.
|
||||
|
||||
! # LOCK='-x /usr/spool/uucp/LCK..$DEV' # "normal" systems
|
||||
# LOCK='' # no lock file
|
||||
# LOCK='-x /usr/spool/locks/LK.047.040.011' # SysV style names
|
||||
# LOCK='-x #/usr/spool/uucp/LCK..$DEV' # HDB format (ASCII pid)
|
||||
# LOCK='-x /usr/spool/uucp/LCK/LCK..$DEV' # NeXT
|
||||
+ LOCK="-x /var/spool/lock/LCK..$DEV" # OpenBSD cu et al
|
||||
|
||||
# Uncomment one of the following lines to force xon/xoff flow
|
||||
# control if you have one of the types of modems listed.
|
1
comms/efax/pkg/COMMENT
Normal file
1
comms/efax/pkg/COMMENT
Normal file
@ -0,0 +1 @@
|
||||
A small, simple FAX send/receive program.
|
18
comms/efax/pkg/DESCR
Normal file
18
comms/efax/pkg/DESCR
Normal file
@ -0,0 +1,18 @@
|
||||
Efax
|
||||
|
||||
efax is a relatively small ANSI C/POSIX program that provides the
|
||||
data transport function for fax applications. A simple shell
|
||||
script (``fax'') is included in the distribution to let you
|
||||
create, send, receive, view and print faxes.
|
||||
|
||||
efax is smaller and easier to install than HylaFax(FlexFax), NetFax, or
|
||||
mgetty+sendfax. It uses your system's own getty to handle
|
||||
incoming data calls. As one user put it, ``EFAX is a nice simple
|
||||
program for single user systems.''
|
||||
|
||||
The package now includes the ``efix'' program to convert text,
|
||||
fax or PBM files into fax, PBM, PGM, HP-PCL or Postscript files.
|
||||
To fax Postscript images you will need Ghostscript. To preview
|
||||
faxes you will need a PGM file viewer (e.g. xv or xloadimage).
|
||||
If you don't have a PCL or Postscript printer you will need an
|
||||
appropriate conversion program (e.g. pbmtoepson or Ghostscript) .
|
6
comms/efax/pkg/PLIST
Normal file
6
comms/efax/pkg/PLIST
Normal file
@ -0,0 +1,6 @@
|
||||
bin/fax
|
||||
bin/efax
|
||||
bin/efix
|
||||
man/man1/fax.1
|
||||
man/man1/efax.1
|
||||
man/man1/efix.1
|
Loading…
Reference in New Issue
Block a user