Allright, thanks to Aleksander Piotrowski's feedback, I reworked the port a bit.

- respect CC, DEBUG and CFLAGS
- added callback
- use BSD_INSTALL_*
- clean up patches

Please, test and comment.
Thanks.

Antoine

ps : diff to in-tree version attached
diff -uNr --exclude=CVS mgetty+sendfax.orig/Makefile mgetty+sendfax/Makefile
--- mgetty+sendfax.orig/Makefile        Wed Jul 17 18:30:58 2002
+++ mgetty+sendfax/Makefile     Tue Jun 14 09:43:16 2005
@@ -1,40 +1,53 @@
-# $OpenBSD: Makefile,v 1.23 2002/07/17 16:30:58 naddy Exp $
-# $FreeBSD: Makefile,v 1.25 1998/07/16 06:44:37 vanilla Exp $
+# $OpenBSD$
 
 COMMENT=       "handle external logins, send and receive faxes"
 
-BROKEN=                insecure tempfile handling: can overwrite any file on 
the system
+VERSION=       1.1.33
+RELEASE=       Apr10
 
-DISTNAME=      mgetty1.1.21-Jul24
-PKGNAME=       mgetty-1.1.21
+DISTNAME=      mgetty${VERSION}-${RELEASE}
+PKGNAME=       mgetty+sendfax-${VERSION}-${RELEASE}
 CATEGORIES=    comms
 
-PERMIT_PACKAGE_CDROM=
-PERMIT_PACKAGE_FTP=
-PERMIT_DISTFILES_CDROM=
-PERMIT_DISTFILES_FTP=
-
-FAKE=No
 MASTER_SITES=  ftp://alpha.greenie.net/pub/mgetty/source/1.1/ \
                ftp://ftp.leo.org/pub/comp/os/unix/networking/mgetty/
 
 HOMEPAGE=      http://alpha.greenie.net/mgetty/
 
-MAKE_ENV+=     prefix="${PREFIX}" spool="/var/spool" \
-               CONFDIR="/etc/mgetty+sendfax" \
-               PHONE_GROUP="wheel" PHONE_PERMS="700"
+MAINTAINER=    Antoine Jacoutot <[EMAIL PROTECTED]>
 
-WRKDIST=       ${WRKDIR}/${PKGNAME}
+# GPL
+PERMIT_PACKAGE_CDROM=  yes
+PERMIT_PACKAGE_FTP=    yes
+PERMIT_DISTFILES_CDROM=        yes
+PERMIT_DISTFILES_FTP=  yes
 
+WANTLIB=       c m util
+
+WRKDIST=       ${WRKDIR}/mgetty-${VERSION}
+
+MAKE_ENV+=     SYSCONFDIR=${SYSCONFDIR}
+
+post-patch:
+       @cp ${WRKSRC}/policy.h-dist ${WRKSRC}/policy.h
+
+pre-install:
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mgetty+sendfax
+
 post-build:
-       @sed -e "s,@prefix@,${PREFIX},g" ${FILESDIR}/setup > ${WRKDIR}/setup
+       @sed -e "s,@prefix@,${PREFIX},g" \
+       -e "s,@sysconfdir@,${SYSCONFDIR},g" \
+       ${FILESDIR}/setup > ${WRKDIR}/setup
 
 post-install:
        ${INSTALL_SCRIPT} ${WRKDIR}/setup ${PREFIX}/lib/mgetty+sendfax
-       @echo "***"
-       @echo "*** Finished installing mgetty+sendfax."
-       @echo "*** To complete the install, run 
${PREFIX}/lib/mgetty+sendfax/setup"
-       @echo "*** script."
-       @echo "***"
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mgetty+sendfax
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mgetty+sendfax/faq
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mgetty+sendfax/voice
+       ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${PREFIX}/share/doc/mgetty+sendfax
+       ${INSTALL_DATA} ${WRKSRC}/faq/SGML/* 
${PREFIX}/share/doc/mgetty+sendfax/faq
+       ${INSTALL_DATA} ${WRKSRC}/voice/doc/* 
${PREFIX}/share/doc/mgetty+sendfax/voice
+       ${INSTALL_DATA} -m 600 ${WRKSRC}/voice/voice.conf-dist 
${PREFIX}/share/examples/mgetty+sendfax/voice.conf
+       ${TAR} -cf - -C ${WRKSRC} samples | ${TAR} -xf - -C 
${PREFIX}/share/examples/mgetty+sendfax
 
 .include <bsd.port.mk>
diff -uNr --exclude=CVS mgetty+sendfax.orig/distinfo mgetty+sendfax/distinfo
--- mgetty+sendfax.orig/distinfo        Wed Jan  5 16:58:29 2005
+++ mgetty+sendfax/distinfo     Tue Jun 14 09:43:16 2005
@@ -1,4 +1,4 @@
-MD5 (mgetty1.1.21-Jul24.tar.gz) = dce35cf36bdc6b87d3b931a644f0fc0e
-RMD160 (mgetty1.1.21-Jul24.tar.gz) = 925e733ab719a76887cc1a51a7cfda9779f20e65
-SHA1 (mgetty1.1.21-Jul24.tar.gz) = f71efcf5905d5400d91138f4d47e95edfb901c82
-SIZE (mgetty1.1.21-Jul24.tar.gz) = 920524
+MD5 (mgetty1.1.33-Apr10.tar.gz) = d61a2bd343111be35250496710393bd5
+RMD160 (mgetty1.1.33-Apr10.tar.gz) = 25b4a2056f7e09ad90a256fcbfb3c21c22ad1b11
+SHA1 (mgetty1.1.33-Apr10.tar.gz) = ae8b3bc09426fa8d01448a4305f361f87235d4f5
+SIZE (mgetty1.1.33-Apr10.tar.gz) = 1024596
diff -uNr --exclude=CVS mgetty+sendfax.orig/files/setup 
mgetty+sendfax/files/setup
--- mgetty+sendfax.orig/files/setup     Fri Dec 18 03:55:46 1998
+++ mgetty+sendfax/files/setup  Tue Jun 14 09:43:16 2005
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
-$confdir = "/etc/mgetty+sendfax";
-$defport = "tty00";
+$confdir = "@sysconfdir@/mgetty+sendfax";
+$defport = "cua00";
 
 print STDERR "\n\n*** mgetty+sendfax configuration program ***\n\n";
 
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-Makefile 
mgetty+sendfax/patches/patch-Makefile
--- mgetty+sendfax.orig/patches/patch-Makefile  Thu Jan  1 01:00:00 1970
+++ mgetty+sendfax/patches/patch-Makefile       Tue Jun 14 09:43:16 2005
@@ -0,0 +1,236 @@
+--- Makefile.orig      Sun Mar 13 18:59:34 2005
++++ Makefile   Tue Jun 14 09:14:11 2005
+@@ -4,7 +4,7 @@
+ #
+ # this is the C compiler to use (on SunOS, the standard "cc" does not
+ # grok my code, so please use gcc there. On ISC 4.0, use "icc".).
+-CC=gcc
++#CC=gcc
+ #CC=cc
+ #
+ #### C Compiler Flags ####
+@@ -102,7 +102,7 @@ CC=gcc
+ #         USTAT         - ustat(), no statfs etc.
+ #
+ #CFLAGS=-Wall -O2 -pipe -DSECUREWARE -DUSE_POLL
+-CFLAGS=-O2 -Wall -pipe
++CFLAGS+=-DAUTO_PPP -DPREFIX=\"${PREFIX}\"
+ #CFLAGS=-O -DSVR4
+ #CFLAGS=-O -DSVR4 -DSVR42
+ #CFLAGS=-O -DUSE_POLL
+@@ -144,7 +144,7 @@ CFLAGS=-O2 -Wall -pipe
+ # For Linux, add "-lutil" if the linker complains about "updwtmp".
+ #
+ LDFLAGS=
+-LIBS=
++LIBS=-lutil
+ #LIBS=-lprot -lsocket                         # SCO Unix
+ #LIBS=-lsocket
+ #LIBS=-lbsd                                   # OSF/1
+@@ -164,7 +164,7 @@ LIBS=
+ #
+ # if your systems doesn't have one, use the shell script that I provide
+ # in "inst.sh" (taken from X11R5). Needed on IRIX5.2
+-INSTALL=install -c -o bin -g bin
++INSTALL=install -c -o root -g bin
+ #INSTALL=install -c -o root -g wheel          # NeXT/BSD
+ #INSTALL=/usr/ucb/install -c -o bin -g bin    # AIX, Solaris 2.x
+ #INSTALL=installbsd -c -o bin -g bin          # OSF/1, AIX 4.1, 4.2
+@@ -172,11 +172,11 @@ INSTALL=install -c -o bin -g bin
+ #
+ # prefix, where most (all?) of the stuff lives, usually /usr/local or /usr
+ #
+-prefix=/usr/local
++prefix?=${PREFIX}
+ #
+ # prefix for all the spool directories (usually /usr/spool or /var/spool)
+ #
+-spool=/var/spool
++spool?=/var/spool
+ #
+ # where the mgetty + sendfax binaries live (used for "make install")
+ #
+@@ -192,7 +192,7 @@ LIBDIR=$(prefix)/lib/mgetty+sendfax
+ #
+ # where the configuration files (*.config, aliases, fax.allow/deny) go to
+ #
+-CONFDIR=$(prefix)/etc/mgetty+sendfax
++CONFDIR?=${SYSCONFDIR}/mgetty+sendfax
+ #CONFDIR=/etc/default/
+ #
+ #
+@@ -216,7 +216,7 @@ FAX_SPOOL_OUT=$(FAX_SPOOL)/outgoing
+ # (it's possible to run faxrunq(d) as root, but the FAX_OUT_USER 
+ #  MUST NOT BE root or any other privileged account).
+ #
+-FAX_OUT_USER=fax
++FAX_OUT_USER=uucp
+ #
+ #
+ # Where section 1 manual pages should be placed
+@@ -263,7 +263,7 @@ PERL="/usr/bin/perl -w"
+ # If you have Perl with TK extentions, define it here. This may be the
+ # same as PERL=... above, or different, if you have TkPerl statically
+ # linked.
+-TKPERL=/usr/bin/tkperl
++#TKPERL=/usr/bin/tkperl
+ #
+ #
+ # An echo program that understands escapes like "\n" for newline or
+@@ -275,9 +275,9 @@ TKPERL=/usr/bin/tkperl
+ # please use the "mg.echo" program provided in the compat/ subdirectory.
+ # Set ECHO="mg.echo" and INSTALL_MECHO to mg.echo
+ #
+-ECHO="echo"
++ECHO="mg.echo"
+ #
+-# INSTALL_MECHO=mg.echo
++INSTALL_MECHO=mg.echo
+ 
+ #
+ # for mgetty, that's it. If you want to use the voice
+@@ -285,7 +285,7 @@ ECHO="echo"
+ 
+ # To maintain security, I recommend creating a new group for
+ # users who are allowed to manipulate the recorded voice messages.
+-PHONE_GROUP=phone
++PHONE_GROUP=dialer
+ PHONE_PERMS=770
+ 
+ # Add -DNO_STRSTR to CFLAGS if you don't have strstr().
+@@ -317,7 +317,7 @@ SFAXOBJ=sendfax.o logfile.o locks.o mode
+ 
+ all:  bin-all doc-all
+ 
+-bin-all: mgetty sendfax newslock sedscript subdirs call-back 
++bin-all: mgetty sendfax newslock subdirs call-back vgetty
+ 
+ # a few C files need extra compiler arguments
+ 
+@@ -583,7 +583,7 @@ bindist: all doc-all sedscript
+       cd bindist; gtar cvvfz mgetty$(MR).$(SR)-bin.tgz *
+ 
+ 
+-install: install.bin install.doc
++install: install.bin install.doc install-vgetty
+ 
+ install.bin: mgetty sendfax newslock \
+               login.config mgetty.config sendfax.config 
+@@ -591,30 +591,31 @@ install.bin: mgetty sendfax newslock \
+ # binaries
+ #
+       -test -d $(BINDIR)  || ( ./mkidirs $(BINDIR)  ; chmod 755 $(BINDIR)  )
+-      $(INSTALL) -m 755 newslock $(BINDIR)
++      $(BSD_INSTALL_PROGRAM) newslock $(BINDIR)
+ 
+       -test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) )
+-      -mv -f $(SBINDIR)/mgetty $(SBINDIR)/mgetty.old
+-      -mv -f $(SBINDIR)/sendfax $(SBINDIR)/sendfax.old
+-      $(INSTALL) -s -m 700 mgetty $(SBINDIR)
+-      $(INSTALL) -s -m 755 sendfax $(SBINDIR)
++#     -mv -f $(SBINDIR)/mgetty $(SBINDIR)/mgetty.old
++#     -mv -f $(SBINDIR)/sendfax $(SBINDIR)/sendfax.old
++      $(BSD_INSTALL_PROGRAM) -m 700 mgetty $(SBINDIR)
++      $(BSD_INSTALL_PROGRAM) sendfax $(SBINDIR)
++      $(BSD_INSTALL_PROGRAM) callback/callback $(SBINDIR)
+ #
+ # data files + directories
+ #
+       test -d $(LIBDIR)  || \
+               ( ./mkidirs $(LIBDIR) &&  chmod 755 $(LIBDIR) )
+-      test -d $(CONFDIR) || \
+-              ( ./mkidirs $(CONFDIR) && chmod 755 $(CONFDIR))
+-      test -f $(CONFDIR)/login.config || \
+-              $(INSTALL) -o root -m 600 login.config $(CONFDIR)/
+-      test -f $(CONFDIR)/mgetty.config || \
+-              $(INSTALL) -o root -m 600 mgetty.config $(CONFDIR)/
+-      test -f $(CONFDIR)/sendfax.config || \
+-              $(INSTALL) -o root -m 644 sendfax.config $(CONFDIR)/
+-      test -f $(CONFDIR)/dialin.config || \
+-              $(INSTALL) -o root -m 600 dialin.config $(CONFDIR)/
+-      test -f $(CONFDIR)/faxrunq.config || \
+-              $(INSTALL) -o root -m 644 faxrunq.config $(CONFDIR)/
++#     test -d $(CONFDIR) || \
++#             ( ./mkidirs $(CONFDIR) && chmod 755 $(CONFDIR))
++#     test -f $(CONFDIR)/login.config || \
++              $(BSD_INSTALL_DATA) -m 600 login.config 
${PREFIX}/share/examples/mgetty+sendfax
++#     test -f $(CONFDIR)/mgetty.config || \
++              $(BSD_INSTALL_DATA) -m 600 mgetty.config 
${PREFIX}/share/examples/mgetty+sendfax
++#     test -f $(CONFDIR)/sendfax.config || \
++              $(BSD_INSTALL_DATA) sendfax.config 
${PREFIX}/share/examples/mgetty+sendfax
++#     test -f $(CONFDIR)/dialin.config || \
++              $(BSD_INSTALL_DATA) -m 600 dialin.config 
${PREFIX}/share/examples/mgetty+sendfax
++#     test -f $(CONFDIR)/faxrunq.config || \
++              $(BSD_INSTALL_DATA) faxrunq.config 
${PREFIX}/share/examples/mgetty+sendfax
+ #
+ # test for outdated stuff
+ #
+@@ -628,28 +629,28 @@ install.bin: mgetty sendfax newslock \
+ #
+ # fax spool directories
+ #
+-      test -d $(spool) || \
+-              ( mkdir $(spool) && chmod 755 $(spool) )
+-      test -d $(FAX_SPOOL) || \
+-              ( mkdir $(FAX_SPOOL) && \
+-                chown $(FAX_OUT_USER) $(FAX_SPOOL) && \
+-                chmod 755 $(FAX_SPOOL) )
+-      test -d $(FAX_SPOOL_IN) || \
+-              ( mkdir $(FAX_SPOOL_IN) && chmod 755 $(FAX_SPOOL_IN) )
+-      test -d $(FAX_SPOOL_OUT) || \
+-                mkdir $(FAX_SPOOL_OUT)
+-      chown $(FAX_OUT_USER) $(FAX_SPOOL_OUT)
+-      chmod 755 $(FAX_SPOOL_OUT)
++#     test -d $(spool) || \
++#             ( mkdir $(spool) && chmod 755 $(spool) )
++#     test -d $(FAX_SPOOL) || \
++#             ( mkdir $(FAX_SPOOL) && \
++#               chown $(FAX_OUT_USER) $(FAX_SPOOL) && \
++#               chmod 755 $(FAX_SPOOL) )
++#     test -d $(FAX_SPOOL_IN) || \
++#             ( mkdir $(FAX_SPOOL_IN) && chmod 755 $(FAX_SPOOL_IN) )
++#     test -d $(FAX_SPOOL_OUT) || \
++#               mkdir $(FAX_SPOOL_OUT)
++#     chown $(FAX_OUT_USER) $(FAX_SPOOL_OUT)
++#     chmod 755 $(FAX_SPOOL_OUT)
+ #
+ # g3 tool programs
+ #
+-      cd g3 ; $(MAKE) install INSTALL="$(INSTALL)" \
++      cd g3 ; $(MAKE) install INSTALL="$(BSD_INSTALL_PROGRAM)" \
+                               BINDIR=$(BINDIR) \
+                               LIBDIR=$(LIBDIR) CONFDIR=$(CONFDIR)
+ #
+ # fax programs / scripts / font file
+ #
+-      cd fax ; $(MAKE) install INSTALL="$(INSTALL)" \
++      cd fax ; $(MAKE) install INSTALL="$(BSD_INSTALL_PROGRAM)" \
+                               FAX_OUT_USER=$(FAX_OUT_USER) \
+                               BINDIR=$(BINDIR) SBINDIR=$(SBINDIR) \
+                               LIBDIR=$(LIBDIR) CONFDIR=$(CONFDIR)
+@@ -659,14 +660,14 @@ install.bin: mgetty sendfax newslock \
+       if [ ! -z "$(INSTALL_MECHO)" ] ; then \
+           cd compat ; \
+           $(CC) $(CFLAGS) -o mg.echo mg.echo.c && \
+-          $(INSTALL) -s -m 755 mg.echo $(BINDIR) ; \
++          $(BSD_INSTALL_PROGRAM) mg.echo $(BINDIR) ; \
+       fi
+ 
+ #
+ # documentation
+ #
+ install.doc:
+-      cd doc ; $(MAKE) install INSTALL="$(INSTALL)" \
++      cd doc ; $(MAKE) install INSTALL="$(BSD_INSTALL_MAN)" \
+                               MAN1DIR=$(MAN1DIR) \
+                               MAN4DIR=$(MAN4DIR) \
+                               MAN5DIR=$(MAN5DIR) \
+@@ -677,7 +678,7 @@ install.doc:
+ # WWW frontend stuff
+ #
+ install.www:
+-      cd frontends/www ; $(MAKE) install.www INSTALL="$(INSTALL)" \
++      cd frontends/www ; $(MAKE) install.www INSTALL="$(BSD_INSTALL_PROGRAM)" 
\
+                               BINDIR=$(BINDIR) \
+                               LIBDIR=$(LIBDIR) CONFDIR=$(CONFDIR)
+ #
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-aa 
mgetty+sendfax/patches/patch-aa
--- mgetty+sendfax.orig/patches/patch-aa        Sat Aug 28 20:13:37 1999
+++ mgetty+sendfax/patches/patch-aa     Thu Jan  1 01:00:00 1970
@@ -1,17 +0,0 @@
---- fax/faxspool.in.orig       Sat Jul 24 17:27:25 1999
-+++ fax/faxspool.in    Sat Aug 28 13:30:14 1999
-@@ -313,11 +313,11 @@
- # user name (for authentification)
- ##########
- 
--if user=`logname 2>/dev/null`
--then :
-+if [ `id -u` = 0 ]; then
-+    user=root
- else
-     id=`id`
--    user=`expr "$id" : "[^( ]*(\([^)]*\)"`
-+    user=`logname`
- fi
- test -z "$user" && user=$LOGNAME
- test -z "$user" && user=$USER
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-ab 
mgetty+sendfax/patches/patch-ab
--- mgetty+sendfax.orig/patches/patch-ab        Sat Aug 28 20:13:37 1999
+++ mgetty+sendfax/patches/patch-ab     Thu Jan  1 01:00:00 1970
@@ -1,171 +0,0 @@
---- Makefile.orig      Sat Jul 24 17:28:18 1999
-+++ Makefile   Sat Aug 28 13:30:15 1999
-@@ -4,8 +4,8 @@
- #
- # this is the C compiler to use (on SunOS, the standard "cc" does not
- # grok my code, so please use gcc there. On ISC 4.0, use "icc".).
--CC=gcc
--#CC=cc
-+#CC=gcc
-+CC=cc
- #
- #### C Compiler Flags ####
- #
-@@ -107,7 +107,7 @@
- # prompt first. Don't forget to activate the /AutoPPP/ line in login.config!
- #
- #CFLAGS=-Wall -O2 -pipe -DSECUREWARE -DUSE_POLL
--CFLAGS=-O2 -Wall -pipe
-+CFLAGS+=-DAUTO_PPP
- #CFLAGS=-O -DSVR4
- #CFLAGS=-O -DSVR4 -DSVR42
- #CFLAGS=-O -DUSE_POLL
-@@ -144,12 +144,12 @@
- #
- # On SCO Xenix, add -ldir -lx
- #
--# For FreeBSD, add "-lutil" if the linker complains about
-+# For FreeBSD and OpenBSD, add "-lutil" if the linker complains about
- #     "utmp.o: unresolved symbod _login"
- # For Linux, add "-lutil" if the linker complains about "updwtmp".
- #
- LDFLAGS=
--LIBS=
-+LIBS=-lutil
- #LIBS=-lprot -lsocket                         # SCO Unix
- #LIBS=-lsocket
- #LIBS=-lbsd                                   # OSF/1
-@@ -169,7 +169,8 @@
- #
- # if your systems doesn't have one, use the shell script that I provide
- # in "inst.sh" (taken from X11R5). Needed on IRIX5.2
--INSTALL=install -c -o bin -g bin
-+INSTALL=install -c -o root -g wheel
-+INSTALL_PROGRAM=install -s -c -o root -g wheel
- #INSTALL=install -c -o root -g wheel          # NeXT/BSD
- #INSTALL=/usr/ucb/install -c -o bin -g bin    # AIX, Solaris 2.x
- #INSTALL=installbsd -c -o bin -g bin          # OSF/1, AIX 4.1, 4.2
-@@ -177,11 +178,11 @@
- #
- # prefix, where most (all?) of the stuff lives, usually /usr/local or /usr
- #
--prefix=/usr/local
-+prefix?=/usr/local
- #
- # prefix for all the spool directories (usually /usr/spool or /var/spool)
- #
--spool=/var/spool
-+spool?=/var/spool
- #
- # where the mgetty + sendfax binaries live (used for "make install")
- #
-@@ -197,7 +198,7 @@
- #
- # where the configuration files (*.config, aliases, fax.allow/deny) go to
- #
--CONFDIR=$(prefix)/etc/mgetty+sendfax
-+CONFDIR?=$(prefix)/etc/mgetty+sendfax
- #CONFDIR=/etc/default/
- #
- #
-@@ -247,7 +248,7 @@
- # If you have Perl with TK extentions, define it here. This may be the
- # same as PERL=... above, or different, if you have TkPerl statically
- # linked.
--TKPERL=/usr/bin/tkperl
-+#TKPERL=/usr/bin/tkperl
- #
- #
- # An echo program that understands escapes like "\n" for newline or
-@@ -259,9 +260,9 @@
- # please use the "mg.echo" program provided in the compat/ subdirectory.
- # Set ECHO="mg.echo" and INSTALL_MECHO to mg.echo
- #
--ECHO="echo"
-+ECHO="mg.echo"
- #
--# INSTALL_MECHO=mg.echo
-+INSTALL_MECHO=mg.echo
- 
- #
- # for mgetty, that's it. If you want to use the voice
-@@ -269,8 +270,8 @@
- 
- # To maintain security, I recommend creating a new group for
- # users who are allowed to manipulate the recorded voice messages.
--PHONE_GROUP=phone
--PHONE_PERMS=770
-+PHONE_GROUP?=wheel
-+PHONE_PERMS?=700
- 
- # Add -DNO_STRSTR to CFLAGS if you don't have strstr().
- 
-@@ -301,7 +302,7 @@
- 
- all:  bin-all doc-all
- 
--bin-all: mgetty sendfax newslock subdirs call-back 
-+bin-all: mgetty sendfax newslock subdirs call-back vgetty
- 
- # a few C files need extra compiler arguments
- 
-@@ -563,21 +564,21 @@
-       cd bindist; gtar cvvfz mgetty$(MR).$(SR)-bin.tgz *
- 
- 
--install: install.bin install.doc
-+install: install.bin install.doc install-vgetty
- 
- install.bin: mgetty sendfax newslock \
--              login.config mgetty.config sendfax.config 
-+              login.config #mgetty.config sendfax.config 
- #
- # binaries
- #
-       -test -d $(BINDIR)  || ( ./mkidirs $(BINDIR)  ; chmod 755 $(BINDIR)  )
--      $(INSTALL) -m 755 newslock $(BINDIR)
-+      $(INSTALL_PROGRAM) -m 755 newslock $(BINDIR)
- 
-       -test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) )
-       -mv -f $(SBINDIR)/mgetty $(SBINDIR)/mgetty.old
-       -mv -f $(SBINDIR)/sendfax $(SBINDIR)/sendfax.old
--      $(INSTALL) -s -m 700 mgetty $(SBINDIR)
--      $(INSTALL) -s -m 700 sendfax $(SBINDIR)
-+      $(INSTALL_PROGRAM) -m 700 mgetty $(SBINDIR)
-+      $(INSTALL_PROGRAM) -m 700 sendfax $(SBINDIR)
- #
- # data files + directories
- #
-@@ -587,10 +588,10 @@
-               ( ./mkidirs $(CONFDIR); chmod 755 $(CONFDIR))
-       test -f $(CONFDIR)/login.config || \
-               $(INSTALL) -o root -m 600 login.config $(CONFDIR)/
--      test -f $(CONFDIR)/mgetty.config || \
--              $(INSTALL) -o root -m 600 mgetty.config $(CONFDIR)/
--      test -f $(CONFDIR)/sendfax.config || \
--              $(INSTALL) -o root -m 644 sendfax.config $(CONFDIR)/
-+#     test -f $(CONFDIR)/mgetty.config || \
-+#             $(INSTALL) -o root -m 600 mgetty.config $(CONFDIR)/
-+#     test -f $(CONFDIR)/sendfax.config || \
-+#             $(INSTALL) -o root -m 644 sendfax.config $(CONFDIR)/
-       test -f $(CONFDIR)/dialin.config || \
-               $(INSTALL) -o root -m 600 dialin.config $(CONFDIR)/
-       test -f $(CONFDIR)/faxrunq.config || \
-@@ -621,7 +622,7 @@
- #
- # g3 tool programs
- #
--      cd g3 ; $(MAKE) install INSTALL="$(INSTALL)" \
-+      cd g3 ; $(MAKE) install INSTALL="$(INSTALL_PROGRAM)" \
-                               BINDIR=$(BINDIR) \
-                               LIBDIR=$(LIBDIR) CONFDIR=$(CONFDIR)
- #
-@@ -636,7 +637,7 @@
-       if [ ! -z "$(INSTALL_MECHO)" ] ; then \
-           cd compat ; \
-           $(CC) $(CFLAGS) -o mg.echo mg.echo.c && \
--          $(INSTALL) -s -m 755 mg.echo $(BINDIR) ; \
-+          $(INSTALL_PROGRAM) -m 755 mg.echo $(BINDIR) ; \
-       fi
- 
- #
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-ac 
mgetty+sendfax/patches/patch-ac
--- mgetty+sendfax.orig/patches/patch-ac        Fri Dec 18 03:55:46 1998
+++ mgetty+sendfax/patches/patch-ac     Thu Jan  1 01:00:00 1970
@@ -1,39 +0,0 @@
---- voice/Makefile.orig        Thu Sep 10 05:06:12 1998
-+++ voice/Makefile     Tue Dec  1 01:39:38 1998
-@@ -13,6 +13,8 @@
- LN=ln
- MV=mv
- RM=rm
-+INSTALL=install -c -o root -g wheel
-+INSTALL_PROGRAM=install -s -c -o root -g wheel
- 
- MGETTYLIB=../../getdisk.o ../../goodies.o ../../io.o \
-       ../../locks.o ../../tio.o ../../modem.o \
-@@ -82,19 +84,19 @@
-       @echo "  Installing the voice extensions"
-       @echo "  -------------------------------"
-       @echo ""
--      $(INSTALL) -m 700 vgetty/vgetty $(SBINDIR)
--      $(INSTALL) -m 755 vm/vm $(BINDIR)
-+      $(INSTALL_PROGRAM) -m 700 vgetty/vgetty $(SBINDIR)
-+      $(INSTALL_PROGRAM) -m 755 vm/vm $(BINDIR)
-       for i in $(PVFTOOLS); \
-       do \
--           $(INSTALL) -m 755 pvftools/$$i $(BINDIR); \
-+           $(INSTALL_PROGRAM) -m 755 pvftools/$$i $(BINDIR); \
-       done
-       $(INSTALL) -m 644 man/man1/zplay.1 $(MAN1DIR)
-       $(INSTALL) -m 644 man/man1/pvf.1 $(MAN1DIR)
--      cd $(MAN1DIR); \
--      for i in $(PVFTOOLS); \
--      do \
--           $(RM) -f $$i.1; $(LN) -s pvf.1 $$i.1; \
--      done
-+#     cd $(MAN1DIR); \
-+#     for i in $(PVFTOOLS); \
-+#     do \
-+#          $(RM) -f $$i.1; $(LN) -s pvf.1 $$i.1; \
-+#     done
- #     [ -d $(VOICE_DIR) ] || mkdir $(VOICE_DIR)
- #     [ -d $(VOICE_DIR)/incoming ] || mkdir $(VOICE_DIR)/incoming
- #     chown 0 $(VOICE_DIR)/incoming
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-ad 
mgetty+sendfax/patches/patch-ad
--- mgetty+sendfax.orig/patches/patch-ad        Fri Dec 18 03:55:46 1998
+++ mgetty+sendfax/patches/patch-ad     Thu Jan  1 01:00:00 1970
@@ -1,20 +0,0 @@
---- doc/Makefile.orig  Fri Nov 28 04:33:26 1997
-+++ doc/Makefile       Tue Dec  1 00:49:56 1998
-@@ -26,7 +26,7 @@
- 
- all:
- 
--doc-all: mgetty.asc mgetty.info mgetty.dvi mgetty.ps fmt-manpages $(MANSRC) 
-+doc-all: mgetty.asc mgetty.info fmt-manpages $(MANSRC) 
- 
- manpages: $(MANSRC)
- 
-@@ -43,7 +43,7 @@
-       -texi2html -verbose mgetty.texi
- 
- mgetty.info: mgetty.texi
--      -makeinfo mgetty.texi
-+      -makeinfo --no-split mgetty.texi
- 
- mgetty.ps: mgetty.dvi
-       -dvips -o mgetty.ps mgetty.dvi
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-ae 
mgetty+sendfax/patches/patch-ae
--- mgetty+sendfax.orig/patches/patch-ae        Fri Aug 28 08:11:59 1998
+++ mgetty+sendfax/patches/patch-ae     Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- syslibs.h.orig     Sun Jan 12 06:53:46 1997
-+++ syslibs.h  Thu Aug 27 21:08:18 1998
-@@ -7,7 +7,7 @@
- #include <stdlib.h>
- #endif
- 
--#if !defined( __bsdi__ ) && !defined(__FreeBSD__) && !defined(NeXT)
-+#if !defined( __bsdi__ ) && !defined(__FreeBSD__) && !defined(NeXT) && 
!defined(__OpenBSD__)
- #include <malloc.h>
- #endif
- 
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-af 
mgetty+sendfax/patches/patch-af
--- mgetty+sendfax.orig/patches/patch-af        Fri Dec 18 03:55:46 1998
+++ mgetty+sendfax/patches/patch-af     Thu Jan  1 01:00:00 1970
@@ -1,24 +0,0 @@
-*** logfile.c.orig     Thu Dec 17 06:12:16 1998
---- logfile.c  Thu Dec 17 06:13:05 1998
-***************
-*** 52,59 ****
-  /* Most systems have these variables but do not declare them. On many
-     of those systems that _do_ declare them, it won't hurt */
-  
-  extern int sys_nerr;
-! #if !defined(__NetBSD__) && !defined( __FreeBSD__ ) && !defined(__GLIBC__)
-  extern char *sys_errlist[];
-  #endif
-  
---- 52,62 ----
-  /* Most systems have these variables but do not declare them. On many
-     of those systems that _do_ declare them, it won't hurt */
-  
-+ #ifndef __OpenBSD__
-  extern int sys_nerr;
-! #endif
-! 
-! #if !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined( __FreeBSD__ ) 
&& !defined(__GLIBC__)
-  extern char *sys_errlist[];
-  #endif
-  
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-ag 
mgetty+sendfax/patches/patch-ag
--- mgetty+sendfax.orig/patches/patch-ag        Fri Aug 28 08:12:01 1998
+++ mgetty+sendfax/patches/patch-ag     Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- mgetty.c.orig      Mon Aug  3 13:02:08 1998
-+++ mgetty.c   Thu Aug 27 21:09:15 1998
-@@ -64,7 +64,7 @@
- /* prototypes for system functions (that are missing in some 
-  * system header files)
-  */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
- time_t                time _PROTO(( long * tloc ));
- #endif
- 
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-ah 
mgetty+sendfax/patches/patch-ah
--- mgetty+sendfax.orig/patches/patch-ah        Fri Aug 28 08:12:03 1998
+++ mgetty+sendfax/patches/patch-ah     Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- sendfax.c.orig     Thu Jul  2 02:47:38 1998
-+++ sendfax.c  Thu Aug 27 21:09:42 1998
-@@ -40,7 +40,7 @@
- extern time_t call_start;                     /* for accounting */
- 
- /* seems to missing nearly everywhere */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
- time_t        time _PROTO(( long * tloc ));
- #endif
- 
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-ai 
mgetty+sendfax/patches/patch-ai
--- mgetty+sendfax.orig/patches/patch-ai        Sat Aug 28 20:13:37 1999
+++ mgetty+sendfax/patches/patch-ai     Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- mgetty.h.orig      Mon May 24 09:35:06 1999
-+++ mgetty.h   Sat Aug 28 13:30:19 1999
-@@ -62,7 +62,7 @@
- 
- /* bsd stuff */
- #if defined(__BSD_NET2__) || defined(__386BSD__) || \
--    defined(__NetBSD__)   || defined(__FreeBSD__)
-+    defined(__NetBSD__)   || defined(__FreeBSD__) || defined(__OpenBSD__)
- # include <sys/param.h>       /* defines BSD, BSD4_3 and BSD4_4 */
- # ifndef BSD
- #  define BSD         /* just in case... */
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-aj 
mgetty+sendfax/patches/patch-aj
--- mgetty+sendfax.orig/patches/patch-aj        Fri Aug 28 08:12:06 1998
+++ mgetty+sendfax/patches/patch-aj     Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- faxrec.c.orig      Tue Dec 16 03:39:24 1997
-+++ faxrec.c   Thu Aug 27 21:10:24 1998
-@@ -35,7 +35,7 @@
- extern time_t call_start;             /* in faxrecp.c, set in mgetty.c */
- static time_t call_done;
- 
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
- time_t        time _PROTO(( long * tloc ));
- #endif
- 
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-ak 
mgetty+sendfax/patches/patch-ak
--- mgetty+sendfax.orig/patches/patch-ak        Fri Aug 28 08:12:07 1998
+++ mgetty+sendfax/patches/patch-ak     Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- callback/callback.c.orig   Mon Jun  1 05:02:55 1998
-+++ callback/callback.c        Thu Aug 27 21:10:49 1998
-@@ -68,7 +68,7 @@
- /* prototypes for system functions (that are missing in some 
-  * system header files)
-  */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
- time_t                time _PROTO(( long * tloc ));
- #endif
- 
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-al 
mgetty+sendfax/patches/patch-al
--- mgetty+sendfax.orig/patches/patch-al        Fri Aug 28 08:12:11 1998
+++ mgetty+sendfax/patches/patch-al     Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- voice/include/voice.h.orig Thu Jul  2 05:02:14 1998
-+++ voice/include/voice.h      Thu Aug 27 21:11:19 1998
-@@ -19,7 +19,7 @@
- #include <errno.h>
- #include <fcntl.h>
- 
--#if !defined( __bsdi__ ) && !defined(__FreeBSD__) && !defined(NeXT)
-+#if !defined( __bsdi__ ) && !defined(__FreeBSD__) && !defined(NeXT) && 
!defined(__OpenBSD__)
- # include <malloc.h>
- #endif
- 
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-am 
mgetty+sendfax/patches/patch-am
--- mgetty+sendfax.orig/patches/patch-am        Fri Aug 28 08:12:13 1998
+++ mgetty+sendfax/patches/patch-am     Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- voice/libvoice/voice_fax.c.orig    Thu Mar 26 00:58:50 1998
-+++ voice/libvoice/voice_fax.c Thu Aug 27 21:11:49 1998
-@@ -29,7 +29,7 @@
- #define REVERSE 1
- 
- /* seems to missing nearly everywhere */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
- time_t    time _PROTO(( long * tloc ));
- #endif
- 
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-doc_Makefile 
mgetty+sendfax/patches/patch-doc_Makefile
--- mgetty+sendfax.orig/patches/patch-doc_Makefile      Thu Jan  1 01:00:00 1970
+++ mgetty+sendfax/patches/patch-doc_Makefile   Tue Jun 14 09:43:16 2005
@@ -0,0 +1,47 @@
+--- doc/Makefile.orig  Sun Feb 27 13:09:53 2005
++++ doc/Makefile       Tue Jun 14 09:18:01 2005
+@@ -26,7 +26,7 @@ MAN_FMT_PRG=$(NROFF) -man
+ 
+ all:
+ 
+-doc-all: mgetty.asc mgetty.info mgetty.dvi mgetty.ps fmt-manpages $(MANSRC) 
++doc-all: mgetty.info fmt-manpages $(MANSRC) 
+ 
+ manpages: $(MANSRC)
+ 
+@@ -43,7 +43,7 @@ mgetty.html: mgetty.texi
+       -texi2html -verbose mgetty.texi
+ 
+ mgetty.info: mgetty.texi
+-      -makeinfo mgetty.texi
++      -makeinfo --no-split mgetty.texi
+ 
+ mgetty.ps: mgetty.dvi
+       -dvips -o mgetty.ps mgetty.dvi
+@@ -67,21 +67,21 @@ fullclean: clean
+ install: $(MANSRC) mgetty.info
+       -mkdir `dirname $(MAN1DIR)` $(MAN1DIR) $(MAN4DIR) $(MAN5DIR) $(MAN8DIR) 
2>/dev/null
+       for i in $(MAN1PAGES) ; do \
+-              $(INSTALL) -m 644 $$i $(MAN1DIR) ; \
++              $(BSD_INSTALL_MAN) $$i $(MAN1DIR) ; \
+       done
+       for i in $(MAN4PAGES) ; do \
+-              $(INSTALL) -m 644 $$i $(MAN4DIR) ; \
++              $(BSD_INSTALL_MAN) $$i $(MAN4DIR) ; \
+       done
+       for i in $(MAN5PAGES) ; do \
+-              $(INSTALL) -m 644 $$i $(MAN5DIR) ; \
++              $(BSD_INSTALL_MAN) $$i $(MAN5DIR) ; \
+       done
+       for i in $(MAN8PAGES) ; do \
+-              $(INSTALL) -m 644 $$i $(MAN8DIR) ; \
++              $(BSD_INSTALL_MAN) $$i $(MAN8DIR) ; \
+       done
+       if [ -f mgetty.info ] ; then\
+           test -d $(INFODIR) || mkdir $(INFODIR) 2>/dev/null ; \
+           for i in mgetty.info* ; do \
+-              $(INSTALL) -m 644 $$i $(INFODIR) ; \
++              $(BSD_INSTALL_MAN) $$i $(INFODIR) ; \
+           done ; \
+       else \
+           echo "mgetty.info not made, skipping" ; \
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-doc_mgetty.texi-in 
mgetty+sendfax/patches/patch-doc_mgetty.texi-in
--- mgetty+sendfax.orig/patches/patch-doc_mgetty.texi-in        Thu Jan  1 
01:00:00 1970
+++ mgetty+sendfax/patches/patch-doc_mgetty.texi-in     Tue Jun 14 09:43:16 2005
@@ -0,0 +1,23 @@
+--- doc/mgetty.texi-in.orig    Tue Feb 15 11:28:37 2005
++++ doc/mgetty.texi-in Wed Jun  8 09:18:19 2005
+@@ -17,6 +17,11 @@ This is the online documentation for the
+ package.
+ 
+ Copyright @copyright{} 1993-2005 Gert Doering
[EMAIL PROTECTED]
+++START-INFO-DIR-ENTRY
+++* Mgetty: (mgetty).          Mgetty: an advanced getty that can manage faxes.
+++END-INFO-DIR-ENTRY
[EMAIL PROTECTED] format
+ @end ifinfo
+ 
+ @titlepage
+@@ -1458,7 +1463,7 @@ FAX_NOTIFY_PROGRAM @var{<hangup code>} '
+ 
+ @var{<hangup code>} is 0 if the receive was successful, non-zero
+ otherwise.  @var{<sender id>} is the fax identification string received
+-from the other side.  @var{<file name page (i)>} is the full path name for
++from the other side.  @var{<file name page 'i'>} is the full path name for
+ each received page.
+ 
+ A sample command line might look like this:
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-fax_Makefile 
mgetty+sendfax/patches/patch-fax_Makefile
--- mgetty+sendfax.orig/patches/patch-fax_Makefile      Thu Jan  1 01:00:00 1970
+++ mgetty+sendfax/patches/patch-fax_Makefile   Tue Jun 14 09:43:16 2005
@@ -0,0 +1,35 @@
+--- fax/Makefile.orig  Wed Feb 16 16:54:46 2005
++++ fax/Makefile       Tue Jun 14 09:20:14 2005
+@@ -57,19 +57,19 @@ install: all
+ #
+       -for i in $(FAX_SCRIPTS); do \
+               mv -f $(BINDIR)/$$i $(BINDIR)/$$i.old 2>/dev/null ; \
+-              $(INSTALL) -m 755 $$i $(BINDIR) ; \
++              $(BSD_INSTALL_PROGRAM) $$i $(BINDIR) ; \
+       done
+-      $(INSTALL) -m 755 faxrunqd $(SBINDIR)
+-      $(INSTALL) faxq-helper $(LIBDIR)
++      $(BSD_INSTALL_PROGRAM) faxrunqd $(SBINDIR)
++      $(BSD_INSTALL_PROGRAM) faxq-helper $(LIBDIR)
+       chown $(FAX_OUT_USER) $(LIBDIR)/faxq-helper
+       chmod 4711 $(LIBDIR)/faxq-helper
+ #
+ # data files
+ #
+-      $(INSTALL) -m 644 cour25.pbm $(LIBDIR)
+-      $(INSTALL) -m 644 cour25n.pbm $(LIBDIR)
+-      -test -f $(CONFDIR)/faxheader || \
+-              $(INSTALL) -m 644 faxheader $(CONFDIR)
++      $(BSD_INSTALL_DATA) cour25.pbm $(LIBDIR)
++      $(BSD_INSTALL_DATA) cour25n.pbm $(LIBDIR)
++#     -test -f $(CONFDIR)/faxheader || \
++              $(BSD_INSTALL_DATA) faxheader 
${PREFIX}/share/examples/mgetty+sendfax
+ #
+ # /etc/magic
+ #
+@@ -82,4 +82,4 @@ install: all
+ #
+ # faxspool.rules sample file
+ #
+-      $(INSTALL) -m 644 faxspool.rules $(CONFDIR)/faxspool.rules.sample
++      $(BSD_INSTALL_DATA) faxspool.rules 
${PREFIX}/share/examples/mgetty+sendfax/faxspool.rules.sample
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-fax_faxspool.in 
mgetty+sendfax/patches/patch-fax_faxspool.in
--- mgetty+sendfax.orig/patches/patch-fax_faxspool.in   Thu Jan  1 01:00:00 1970
+++ mgetty+sendfax/patches/patch-fax_faxspool.in        Tue Jun 14 09:43:16 2005
@@ -0,0 +1,17 @@
+--- fax/faxspool.in.orig       Sun Feb 27 13:10:51 2005
++++ fax/faxspool.in    Wed Jun  8 09:18:19 2005
+@@ -401,11 +401,11 @@ fs_cvt_pdf()
+ 
+ # user name (for fax header only! auth is done by faxq-helper via getuid())
+ ##########
+-if user=`logname 2>/dev/null`
+-then :
++if [ `id -u` = 0 ]; then
++    user=root
+ else
+     id=`id`
+-    user=`expr "$id" : "[^( ]*(\([^)]*\)"`
++    user=`logname`
+ fi
+ test -z "$user" && user=$LOGNAME
+ test -z "$user" && user=$USER
diff -uNr --exclude=CVS 
mgetty+sendfax.orig/patches/patch-frontends_www_Makefile 
mgetty+sendfax/patches/patch-frontends_www_Makefile
--- mgetty+sendfax.orig/patches/patch-frontends_www_Makefile    Thu Jan  1 
01:00:00 1970
+++ mgetty+sendfax/patches/patch-frontends_www_Makefile Tue Jun 14 09:43:16 2005
@@ -0,0 +1,31 @@
+--- frontends/www/Makefile.orig        Wed Nov 24 14:46:17 2004
++++ frontends/www/Makefile     Tue Jun 14 09:23:24 2005
+@@ -82,22 +82,22 @@ install.www:
+       [EMAIL PROTECTED] i in $(CGI); do \
+               echo "$$i -> $(CGIBINDIR)..." ; \
+               mv -f $(CGIBINDIR)/$$i $(CGIBINDIR)/$$i.old 2>/dev/null ; \
+-              $(INSTALL) -m 755 $$i $(CGIBINDIR) ; \
++              $(BSD_INSTALL_PROGRAM) $$i $(CGIBINDIR) ; \
+       done
+       [EMAIL PROTECTED] i in $(IMAGES); do \
+               echo "$$i -> $(IMAGEDIR)..." ; \
+               test -f $(IMAGEDIR)/$$i || \
+-                  $(INSTALL) -m 644 $$i $(IMAGEDIR) ; \
++                  $(BSD_INSTALL_DATA) $$i $(IMAGEDIR) ; \
+       done 
+       test -z "$(HTMLDIR)" || \
+           for i in $(HTML); do \
+               test -f $(HTMLDIR)/$$i || \
+-                  $(INSTALL) -m 644 $$i $(HTMLDIR) ; \
++                  $(BSD_INSTALL_DATA) $$i $(HTMLDIR) ; \
+           done
+       test -f $(CONFDIR)/wwwgui.conf || \
+-              $(INSTALL) -o root -m 644 wwwgui.conf $(CONFDIR)/
+-      $(INSTALL) -m 755 simplequant.pl $(LIBDIR)/
+-      $(INSTALL) -m 755 wwwsub.pl $(LIBDIR)/
++              $(BSD_INSTALL_DATA) wwwgui.conf 
${PREFIX}/share/examples/mgetty+sendfax/
++      $(BSD_INSTALL_PROGRAM) simplequant.pl $(LIBDIR)/
++      $(BSD_INSTALL_PROGRAM) wwwsub.pl $(LIBDIR)/
+ 
+ # explicit dependencies
+ 
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-g3_Makefile 
mgetty+sendfax/patches/patch-g3_Makefile
--- mgetty+sendfax.orig/patches/patch-g3_Makefile       Thu Jan  1 01:00:00 1970
+++ mgetty+sendfax/patches/patch-g3_Makefile    Tue Jun 14 09:43:16 2005
@@ -0,0 +1,19 @@
+--- g3/Makefile.orig   Sun Feb 27 20:02:16 2005
++++ g3/Makefile        Tue Jun 14 09:23:50 2005
+@@ -40,13 +40,13 @@ install: all
+ # install programs
+ #
+       for f in $(G3_PROGRAMS) ; do \
+-              $(INSTALL) -s -m 755 $$f $(BINDIR) ; \
++              $(BSD_INSTALL_PROGRAM) $$f $(BINDIR) ; \
+       done
+ #
+ # make symlink for "g3topbm" (so third-party fax viewers won't fail)
+ #
+-      -cd $(BINDIR) ; \
+-      test -x g3topbm || ln -s g32pbm g3topbm
++#     -cd $(BINDIR) ; \
++#     test -x g3topbm || ln -s g32pbm g3topbm
+ 
+ 
+ # test suite
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-policy.h-dist 
mgetty+sendfax/patches/patch-policy.h-dist
--- mgetty+sendfax.orig/patches/patch-policy.h-dist     Thu Jan  1 01:00:00 1970
+++ mgetty+sendfax/patches/patch-policy.h-dist  Tue Jun 14 09:43:16 2005
@@ -0,0 +1,38 @@
+--- policy.h-dist.orig Tue Dec 16 12:43:07 2003
++++ policy.h-dist      Wed Jun  8 09:18:19 2005
+@@ -48,7 +48,7 @@
+  * Normally, this is "/bin/login", just a few systems put "login"
+  * elsewhere (e.g. Free/NetBSD in "/usr/bin/login").
+  */
+-#define DEFAULT_LOGIN_PROGRAM "/bin/login"
++#define DEFAULT_LOGIN_PROGRAM "/usr/bin/login"
+ 
+ /* FidoNet mailer support
+  * 
+@@ -114,7 +114,7 @@
+ /* group id that the device is chown()ed to. If not defined, the
+  * primary group of "DEVICE_OWNER" is used.
+  */
+-#define DEVICE_GROUP  "modem"
++#define DEVICE_GROUP  "dialer"
+ 
+ /* access mode for the line while getty has it - it should be accessible
+  * by uucp / uucp, but not by others (imagine someone dialing into your
+@@ -264,7 +264,7 @@
+ # ifdef linux
+ #  define LOCK        "/var/lock/LCK..%s"
+ # endif
+-# if defined(__FreeBSD__) || defined(__NetBSD__)
++# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #  define LOCK "/var/spool/lock/LCK..%s"
+ # endif 
+ #endif
+@@ -591,7 +591,7 @@
+ #endif
+ 
+ #ifndef MAILER
+-# define MAILER               "/usr/lib/sendmail"
++# define MAILER               "/usr/bin/sendmail"
+ # define NEED_MAIL_HEADERS
+ #endif
+ 
diff -uNr --exclude=CVS mgetty+sendfax.orig/patches/patch-voice_Makefile 
mgetty+sendfax/patches/patch-voice_Makefile
--- mgetty+sendfax.orig/patches/patch-voice_Makefile    Thu Jan  1 01:00:00 1970
+++ mgetty+sendfax/patches/patch-voice_Makefile Tue Jun 14 09:43:16 2005
@@ -0,0 +1,34 @@
+--- voice/Makefile.orig        Sun Dec 23 16:08:13 2001
++++ voice/Makefile     Tue Jun 14 09:25:07 2005
+@@ -83,20 +83,20 @@ vgetty-install: vgetty-all
+       @echo "  Installing the voice extensions"
+       @echo "  -------------------------------"
+       @echo ""
+-      $(INSTALL) -m 700 vgetty/vgetty $(SBINDIR)
+-      $(INSTALL) -m 755 vm/vm $(BINDIR)
++      $(BSD_INSTALL_PROGRAM) -m 700 vgetty/vgetty $(SBINDIR)
++      $(BSD_INSTALL_PROGRAM) vm/vm $(BINDIR)
+       for i in $(PVFTOOLS); \
+       do \
+-           $(INSTALL) -m 755 pvftools/$$i $(BINDIR); \
++           $(BSD_INSTALL_PROGRAM) pvftools/$$i $(BINDIR); \
+       done
+-      $(INSTALL) -m 644 man/man1/zplay.1 $(MAN1DIR)
+-      $(INSTALL) -m 644 man/man1/pvf.1 $(MAN1DIR)
+-      $(INSTALL) -m 644 man/man8/vgetty.8 $(MAN8DIR)
+-      cd $(MAN1DIR); \
+-      for i in $(PVFTOOLS); \
+-      do \
+-           $(RM) -f $$i.1; $(LN) -s pvf.1 $$i.1; \
+-      done
++      $(BSD_INSTALL_MAN) man/man1/zplay.1 $(MAN1DIR)
++      $(BSD_INSTALL_MAN) -m 644 man/man1/pvf.1 $(MAN1DIR)
++      $(BSD_INSTALL_MAN) -m 644 man/man8/vgetty.8 $(MAN8DIR)
++#     cd $(MAN1DIR); \
++#     for i in $(PVFTOOLS); \
++#     do \
++#          $(RM) -f $$i.1; $(LN) -s pvf.1 $$i.1; \
++#     done
+ #     [ -d $(VOICE_DIR) ] || mkdir $(VOICE_DIR)
+ #     [ -d $(VOICE_DIR)/incoming ] || mkdir $(VOICE_DIR)/incoming
+ #     chown 0 $(VOICE_DIR)/incoming
diff -uNr --exclude=CVS mgetty+sendfax.orig/pkg/DESCR mgetty+sendfax/pkg/DESCR
--- mgetty+sendfax.orig/pkg/DESCR       Mon Dec 15 22:42:15 2003
+++ mgetty+sendfax/pkg/DESCR    Tue Jun 14 09:43:16 2005
@@ -1,10 +1,15 @@
-Mgetty is a ``smart'' getty replacement, designed to be used with hayes
-compatible data and data/fax modems.
-Mgetty knows about modem initialization, manual modem answering (so your
-modem doesn't answer if the machine isn't ready), UUCP locking (so you can
-use the same device for dial-in and dial-out).
-Mgetty provides very extensive logging facilities.
+Mgetty+sendfax is a collection of programs to send and receive faxes in
+a unix environment using a class 2.0 or 2 (they're different) faxmodem.
+vgetty is an extension to mgetty, distributed with it, that implements
+incoming voice call handling for certain voice-capable modems, with new
+ones added regularly, if specs are available.
 
-Sendfax send the named g3 fax files to the fax machine at "phone number". 
-The g3 files can be created with pbmtog3(1) or GNU's GhostScript with the
-"digifax" driver.
+More specifically, the program `mgetty' allows you to use a class 2.0 or
+2 fax modem for receiving faxes and handling external logins without
+interfering with outgoing calls. `sendfax' is a standalone program which
+sends fax files. `vgetty' is an extended version of mgetty that can
+answer the telephone like an answering machine and record a voice-mail
+message (if it finds one), or perform `mgetty's fax or data call
+handling otherwise. The mgetty+sendfax distribution includes vgetty and
+a good-sized gob of utility programs that help you manage faxes and
+voice messages.
diff -uNr --exclude=CVS mgetty+sendfax.orig/pkg/MESSAGE 
mgetty+sendfax/pkg/MESSAGE
--- mgetty+sendfax.orig/pkg/MESSAGE     Thu Jan  1 01:00:00 1970
+++ mgetty+sendfax/pkg/MESSAGE  Tue Jun 14 09:43:16 2005
@@ -0,0 +1,10 @@
+If you're installing for the first time or want to change your
+configuration, run the following script as root:
+ --> ${PREFIX}/lib/mgetty+sendfax/setup
+It will help you to create the following configuration
+files in ${SYSCONFDIR}/mgetty+sendfax:
+faxheader mgetty.config sendfax.config
+To start mgetty/vgetty without rebooting, you have to send init(8) a SIGHUP:
+ --> kill -1 1
+Configuration examples and tools have been installed in:
+${PREFIX}/share/examples/mgetty+sendfax
diff -uNr --exclude=CVS mgetty+sendfax.orig/pkg/PLIST mgetty+sendfax/pkg/PLIST
--- mgetty+sendfax.orig/pkg/PLIST       Sun Apr  7 03:54:48 2002
+++ mgetty+sendfax/pkg/PLIST    Tue Jun 14 09:43:16 2005
@@ -1,73 +1,159 @@
[EMAIL PROTECTED] $OpenBSD: PLIST,v 1.4 2002/04/07 01:54:48 naddy Exp $
-bin/newslock
-bin/pbm2g3
-bin/g3cat
-bin/g32pbm
-bin/g3topbm
-bin/faxspool
-bin/faxrunq
[EMAIL PROTECTED] $OpenBSD$
[EMAIL PROTECTED] hylafax-*
+bin/autopvf
+bin/basictopvf
 bin/faxq
 bin/faxrm
+bin/faxrunq
+bin/faxspool
+bin/g32pbm
+bin/g3cat
+bin/lintopvf
 bin/mg.echo
-bin/vm
+bin/newslock
+bin/pbm2g3
 bin/pvfamp
 bin/pvfcut
 bin/pvfecho
+bin/pvffft
 bin/pvffile
 bin/pvffilter
-bin/pvffft
 bin/pvfmix
 bin/pvfnoise
 bin/pvfreverse
 bin/pvfsine
 bin/pvfspeed
+bin/pvftoau
+bin/pvftobasic
+bin/pvftolin
 bin/pvftormd
-bin/rmdtopvf
-bin/rmdfile
 bin/pvftovoc
-bin/voctopvf
-bin/pvftolin
-bin/lintopvf
-bin/pvftobasic
-bin/basictopvf
-bin/pvftoau
-bin/autopvf
 bin/pvftowav
+bin/rmdfile
+bin/rmdtopvf
+bin/sff2g3
+bin/vm
+bin/voctopvf
 bin/wavtopvf
-info/mgetty.info
[EMAIL PROTECTED] info/mgetty.info
+lib/mgetty+sendfax/
 lib/mgetty+sendfax/cour25.pbm
 lib/mgetty+sendfax/cour25n.pbm
+lib/mgetty+sendfax/faxq-helper
 lib/mgetty+sendfax/setup
-man/man1/g32pbm.1
-man/man1/g3cat.1
-man/man1/pbm2g3.1
-man/man1/fax.1
-man/man1/faxspool.1
-man/man1/faxrunq.1
-man/man1/faxq.1
-man/man1/faxrm.1
-man/man1/coverpg.1
-man/man1/zplay.1
-man/man1/pvf.1
-man/man4/mgettydefs.4
-man/man5/faxqueue.5
-man/man8/sendfax.8
-man/man8/mgetty.8
-man/man8/callback.8
-man/man8/faxrunqd.8
[EMAIL PROTECTED] man/man1/coverpg.1
[EMAIL PROTECTED] man/man1/fax.1
[EMAIL PROTECTED] man/man1/faxq.1
[EMAIL PROTECTED] man/man1/faxrm.1
[EMAIL PROTECTED] man/man1/faxrunq.1
[EMAIL PROTECTED] man/man1/faxspool.1
[EMAIL PROTECTED] man/man1/g32pbm.1
[EMAIL PROTECTED] man/man1/g3cat.1
[EMAIL PROTECTED] man/man1/pbm2g3.1
[EMAIL PROTECTED] man/man1/pvf.1
[EMAIL PROTECTED] man/man1/sff2g3.1
[EMAIL PROTECTED] man/man1/zplay.1
[EMAIL PROTECTED] man/man4/mgettydefs.4
[EMAIL PROTECTED] man/man5/faxqueue.5
[EMAIL PROTECTED] man/man8/callback.8
[EMAIL PROTECTED] man/man8/faxrunqd.8
[EMAIL PROTECTED] man/man8/mgetty.8
[EMAIL PROTECTED] man/man8/sendfax.8
[EMAIL PROTECTED] man/man8/vgetty.8
+sbin/callback
+sbin/faxrunqd
 sbin/mgetty
 sbin/sendfax
-sbin/faxrunqd
 sbin/vgetty
[EMAIL PROTECTED] lib/mgetty+sendfax
[EMAIL PROTECTED] echo "***"
[EMAIL PROTECTED] echo "*** Finished installing mgetty+sendfax."
[EMAIL PROTECTED] echo "*** To complete the install, run 
%D/lib/mgetty+sendfax/setup"
[EMAIL PROTECTED] echo "*** script."
[EMAIL PROTECTED] echo "***"
[EMAIL PROTECTED] echo "***"
[EMAIL PROTECTED] echo "*** Finished uninstalling mgetty+sendfax."
[EMAIL PROTECTED] echo "*** Please remove /etc/mgetty+sendfax directory if you"
[EMAIL PROTECTED] echo "*** don't want to keep mgetty configuration files."
[EMAIL PROTECTED] echo "*** Don't forget to edit /etc/ttys files."
[EMAIL PROTECTED] echo "***"
+share/doc/mgetty+sendfax/
+share/doc/mgetty+sendfax/faq/
+share/doc/mgetty+sendfax/faq/FAQ.sgml
+share/doc/mgetty+sendfax/loginv2.txt
+share/doc/mgetty+sendfax/scanner.txt
+share/doc/mgetty+sendfax/secure_tty.txt
+share/doc/mgetty+sendfax/ttyS-cua.txt
+share/doc/mgetty+sendfax/voice/
+share/doc/mgetty+sendfax/voice/NOTE
+share/doc/mgetty+sendfax/voice/Readme.Beginners
+share/doc/mgetty+sendfax/voice/Readme.pvftools
+share/doc/mgetty+sendfax/voice/Readme.voice_shell
+share/doc/mgetty+sendfax/voice/compression_settings
+share/doc/mgetty+sendfax/voice/device_settings
+share/examples/mgetty+sendfax/
[EMAIL PROTECTED] ${SYSCONFDIR}/mgetty+sendfax/
+share/examples/mgetty+sendfax/dialin.config
[EMAIL PROTECTED] ${SYSCONFDIR}/mgetty+sendfax/dialin.config
+share/examples/mgetty+sendfax/faxheader
[EMAIL PROTECTED] ${SYSCONFDIR}/mgetty+sendfax/faxheader
+share/examples/mgetty+sendfax/faxrunq.config
[EMAIL PROTECTED] ${SYSCONFDIR}/mgetty+sendfax/faxrunq.config
+share/examples/mgetty+sendfax/faxspool.rules.sample
[EMAIL PROTECTED] ${SYSCONFDIR}/mgetty+sendfax/faxspool.rules
+share/examples/mgetty+sendfax/login.config
[EMAIL PROTECTED] 600
[EMAIL PROTECTED] ${SYSCONFDIR}/mgetty+sendfax/login.config
[EMAIL PROTECTED]
+share/examples/mgetty+sendfax/mgetty.config
[EMAIL PROTECTED] 600
[EMAIL PROTECTED] ${SYSCONFDIR}/mgetty+sendfax/mgetty.config
[EMAIL PROTECTED]
+share/examples/mgetty+sendfax/samples/
+share/examples/mgetty+sendfax/samples/answer_fax.sh
+share/examples/mgetty+sendfax/samples/coverpg-pl.ps
+share/examples/mgetty+sendfax/samples/coverpg.pbm
+share/examples/mgetty+sendfax/samples/coverpg.ps
+share/examples/mgetty+sendfax/samples/fax
+share/examples/mgetty+sendfax/samples/faxmemo
+share/examples/mgetty+sendfax/samples/faxview.th
+share/examples/mgetty+sendfax/samples/new_fax.NeXT
+share/examples/mgetty+sendfax/samples/new_fax.all/
+share/examples/mgetty+sendfax/samples/new_fax.all/INSTALL
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/INSTALL
+share/examples/mgetty+sendfax/samples/new_fax.all/README
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/README
+share/examples/mgetty+sendfax/samples/new_fax.all/archive.module
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/archive.module
+share/examples/mgetty+sendfax/samples/new_fax.all/delete.module
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/delete.module
+share/examples/mgetty+sendfax/samples/new_fax.all/fax.module
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/fax.module
+share/examples/mgetty+sendfax/samples/new_fax.all/faxlist
+share/examples/mgetty+sendfax/samples/new_fax.all/faxlist.dist
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/faxlist
+share/examples/mgetty+sendfax/samples/new_fax.all/list.module
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/list.module
+share/examples/mgetty+sendfax/samples/new_fax.all/mail.module
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/mail.module
+share/examples/mgetty+sendfax/samples/new_fax.all/new_fax
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/new_fax
+share/examples/mgetty+sendfax/samples/new_fax.all/notify.module
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/notify.module
+share/examples/mgetty+sendfax/samples/new_fax.all/print.module
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/print.module
+share/examples/mgetty+sendfax/samples/new_fax.all/write.module
[EMAIL PROTECTED] ${PREFIX}/lib/mgetty+sendfax/write.module
+share/examples/mgetty+sendfax/samples/new_fax.hpa
+share/examples/mgetty+sendfax/samples/new_fax.lj
+share/examples/mgetty+sendfax/samples/new_fax.mail
+share/examples/mgetty+sendfax/samples/new_fax.mime1
+share/examples/mgetty+sendfax/samples/new_fax.mime3
+share/examples/mgetty+sendfax/samples/new_fax.mime4
+share/examples/mgetty+sendfax/samples/new_fax.pbm
+share/examples/mgetty+sendfax/samples/new_fax.th
+share/examples/mgetty+sendfax/samples/new_fax.tiff
+share/examples/mgetty+sendfax/samples/new_fax.vacation
+share/examples/mgetty+sendfax/samples/printfax
+share/examples/mgetty+sendfax/samples/printfax.ps
+share/examples/mgetty+sendfax/sendfax.config
[EMAIL PROTECTED] ${SYSCONFDIR}/mgetty+sendfax/sendfax.config
+share/examples/mgetty+sendfax/voice.conf
[EMAIL PROTECTED] 600
[EMAIL PROTECTED] ${SYSCONFDIR}/mgetty+sendfax/voice.conf
[EMAIL PROTECTED]
[EMAIL PROTECTED] 750
[EMAIL PROTECTED] uucp
[EMAIL PROTECTED] dialer
[EMAIL PROTECTED] /var/spool/fax/
[EMAIL PROTECTED] /var/spool/fax/incoming/
[EMAIL PROTECTED] /var/spool/fax/outgoing/
[EMAIL PROTECTED] rm -rf /var/spool/fax/*
diff -uNr --exclude=CVS mgetty+sendfax.orig/scripts/configure 
mgetty+sendfax/scripts/configure
--- mgetty+sendfax.orig/scripts/configure       Fri Aug 28 08:12:16 1998
+++ mgetty+sendfax/scripts/configure    Thu Jan  1 01:00:00 1970
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-cd $WRKSRC || exit 1
-cp policy.h-dist policy.h
-
-cat >> policy.h <<END
-
-#undef DEFAULT_LOGIN_PROGRAM 
-#define DEFAULT_LOGIN_PROGRAM "/usr/bin/login"
-
-#define CNDFILE               "dialin.config"
-
-#undef MGETTY_PID_FILE
-#define MGETTY_PID_FILE              "/var/run/mg-pid.%s"
-
-#undef LOCK
-#define LOCK "/var/spool/lock/LCK..%s"
-
-#undef MAILER
-#define MAILER         "/usr/sbin/sendmail"
-
-#undef FAX_NOTIFY_PROGRAM
-#define SYSLOG
-
-END
-
-exit 0

Reply via email to