Hylafax is an enterprise class fax server software.

hylafax is a release spin off from wip/hylafax-devel.
hylafax will stay with releases and get imports
to its (cvs speek) vendor branch, whenever hylafax-devel reaches the next release.
It is thought as the hylafax source for pkgsrc-imports.

hylafax-devel will continue to be a testbed for the next release.
This commit is contained in:
Andreas Hallmann 2006-05-20 15:29:28 +00:00 committed by Thomas Klausner
parent a9e9d8d5cb
commit 920ed39009
20 changed files with 950 additions and 0 deletions

16
hylafax/DESCR Normal file
View file

@ -0,0 +1,16 @@
(excerpt from HylaFAX FAQ)
HylaFAX is a facsimile system for UNIX systems. It supports:
o sending facsimile
o receiving facsimile
o polled retrieval of facsimile
o transparent shared data use of the modem
o sending messages to pagers
Facsimile can be any size (e.g. A4, B4), either 98 or 196 lpi, and
transmitted/received as either 1D-encoded or 2D-encoded facsimile data
(2D-encoded data is frequently more compact and hence takes a shorter
time to communicate). Any modem that supports one of the standard
interfaces for facsimile operation can be used; i.e. any Class 1, Class
2, or Class 2.0 modem.
http://www.hylafax.org/

22
hylafax/MESSAGE Normal file
View file

@ -0,0 +1,22 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2006/05/20 15:29:28 ahallmann Exp $
Hylafax was installed. You'll need manual configurations to actually
activate it.
Setting up: (for impatients)
Invoke faxsetup, and answer what she asks.
Add the following to your rc.local script:
if [ -x ${PREFIX}/sbin/faxq ]; then
${PREFIX}/sbin/faxq && echo -n ' hylafax'
fi
For accepting incoming FAX/data calls, modify /etc/ttys as below
and send SIGHUP to the init process:
>tty00 "${PREFIX}/libexec/faxgetty" dialup on secure
===========================================================================

67
hylafax/Makefile Normal file
View file

@ -0,0 +1,67 @@
# $NetBSD: Makefile,v 1.1.1.1 2006/05/20 15:29:28 ahallmann Exp $
VERS= 4.3.0
PKGNAME= hylafax-devel-${VERS}
DISTNAME= hylafax-${VERS}
CATEGORIES= comms
MASTER_SITES_BETA= ftp://ftp.hylafax.org/source/BETA/
MASTER_SITES_RELEASE= ftp://ftp.hylafax.org/source/ \
ftp://ftp.leo.org/pub/comp/os/unix/networking/fax/hylafax/source/
.if empty(VERS:M[0-9].[0-9].[0-9]rc[0-9])
MASTER_SITES= ${MASTER_SITES_RELEASE}
.else
MASTER_SITES= ${MASTER_SITES_BETA}
.endif
MAINTAINER= hallmann@ahatec.de
HOMEPAGE= http://www.hylafax.org/
COMMENT= Telecommunication and fax server system
DEPENDS+= mawk>=1.2.2:../../lang/mawk
DIST_SUBDIR= hylafax
CONFLICTS= hylafax-[0-9]* mgetty-[0-9]*
USE_LANGUAGES= c c++
USE_TOOLS+= gs:run
HAS_CONFIGURE= yes
CONFIGURE_ARGS+= --with-MAKE=${MAKE_PROGRAM:Q}
CONFIGURE_ARGS+= --with-INSTALL="" --nointeractive
CONFIGURE_ARGS+= --with-ZLIBINC=-I${BUILDLINK_PREFIX.zlib}/include
CONFIGURE_ARGS+= --with-LIBZ="-L${BUILDLINK_PREFIX.zlib}/lib -lz"
CONFIGURE_ENV+= PREFIX=${PREFIX:Q} OPTIMIZER=${CFLAGS:M*:Q}
CONFIGURE_ENV+= FAXUID=${FAXUSER:Q} FAXGID=${FAXGROUP:Q}
MANCOMPRESSED= yes
FAXUSER?= uucp
FAXGROUP?= dialer
RCD_SCRIPTS= hylafax
SUID_EXES= ${PREFIX}/libexec/faxgetty ${PREFIX}/sbin/faxq \
${PREFIX}/bin/faxrm ${PREFIX}/bin/faxalter
PKG_OPTIONS_VAR= PKG_OPTIONS.hylafax
PKG_SUPPORTED_OPTIONS= pam
######################################################
# pam doesn't work right now, so disabled by default #
######################################################
#PKG_SUGGESTED_OPTIONS= pam
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mpam)
.include "../../mk/pam.buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-pam
.endif
post-install:
${CHOWN} ${FAXUSER} ${SUID_EXES}
${CHMOD} 4555 ${SUID_EXES}
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

218
hylafax/PLIST Normal file
View file

@ -0,0 +1,218 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2006/05/20 15:29:28 ahallmann Exp $
bin/faxalter
bin/faxcover
bin/faxmail
bin/faxrm
bin/faxstat
bin/sendfax
bin/sendpage
libdata/hylafax/faxcover.ps
libdata/hylafax/faxcover_example_sgi.ps
libdata/hylafax/faxmail.ps
libdata/hylafax/hfaxd.conf
libdata/hylafax/pagesizes
libdata/hylafax/typerules
libexec/faxgetty
libexec/faxsend
libexec/hfaxd
libexec/hylafax/archive
libexec/hylafax/common-functions
libexec/hylafax/dictionary
libexec/hylafax/faxrcvd
libexec/hylafax/mkcover
libexec/hylafax/notify
libexec/hylafax/notify-4.1
libexec/hylafax/notify.awk
libexec/hylafax/pcl2fax
libexec/hylafax/pdf2fax.gs
libexec/hylafax/pollrcvd
libexec/hylafax/ps2fax.dps
libexec/hylafax/ps2fax.gs
libexec/hylafax/ps2fax.imp
libexec/hylafax/tiff2fax
libexec/hylafax/tiff2pdf
libexec/hylafax/wedged
libexec/lockname
libexec/ondelay
libexec/pagesend
libexec/textfmt
man/cat1/edit-faxcover.0
man/cat1/faxalter.0
man/cat1/faxcover.0
man/cat1/faxmail.0
man/cat1/faxrm.0
man/cat1/faxstat.0
man/cat1/hylafax-client.0
man/cat1/sendfax.0
man/cat1/sendpage.0
man/cat1/sgi2fax.0
man/cat1/textfmt.0
man/cat5/dialrules.0
man/cat5/doneq.0
man/cat5/hosts.hfaxd.0
man/cat5/hylafax-config.0
man/cat5/hylafax-info.0
man/cat5/hylafax-log.0
man/cat5/hylafax-server.0
man/cat5/hylafax-shutdown.0
man/cat5/pagermap.0
man/cat5/pagesizes.0
man/cat5/recvq.0
man/cat5/sendq.0
man/cat5/status.0
man/cat5/tsi.0
man/cat5/typerules.0
man/cat5/xferfaxlog.0
man/cat8/choptest.0
man/cat8/cqtest.0
man/cat8/dialtest.0
man/cat8/faxabort.0
man/cat8/faxaddmodem.0
man/cat8/faxadduser.0
man/cat8/faxanswer.0
man/cat8/faxconfig.0
man/cat8/faxcron.0
man/cat8/faxdeluser.0
man/cat8/faxgetty.0
man/cat8/faxinfo.0
man/cat8/faxlock.0
man/cat8/faxmodem.0
man/cat8/faxq.0
man/cat8/faxqclean.0
man/cat8/faxquit.0
man/cat8/faxrcvd.0
man/cat8/faxsend.0
man/cat8/faxsetup.0
man/cat8/faxstate.0
man/cat8/faxwatch.0
man/cat8/hfaxd.0
man/cat8/jobcontrol.0.gz
man/cat8/mkcover.0
man/cat8/notify.0
man/cat8/pagesend.0
man/cat8/pdf2fax.0
man/cat8/pollrcvd.0
man/cat8/ps2fax.0
man/cat8/recvstats.0
man/cat8/tagtest.0
man/cat8/tiff2fax.0
man/cat8/tiffcheck.0
man/cat8/tsitest.0
man/cat8/wedged.0
man/cat8/xferfaxstats.0
sbin/choptest
sbin/cqtest
sbin/dialtest
sbin/edit-faxcover
sbin/faxabort
sbin/faxaddmodem
sbin/faxadduser
sbin/faxanswer
sbin/faxconfig
sbin/faxcron
sbin/faxdeluser
sbin/faxinfo
sbin/faxlock
sbin/faxmodem
sbin/faxmsg
sbin/faxq
sbin/faxqclean
sbin/faxquit
sbin/faxsetup
sbin/faxsetup.bsdi
sbin/faxsetup.irix
sbin/faxsetup.linux
sbin/faxstate
sbin/faxwatch
sbin/hylafax
sbin/probemodem
sbin/recvstats
sbin/tagtest
sbin/tiffcheck
sbin/tsitest
sbin/typetest
sbin/xferfaxstats
share/doc/hylafax/COPYRIGHT
share/examples/rc.d/hylafax
share/hylafax/config_template/agere-mp-2
share/hylafax/config_template/agere-mp-21
share/hylafax/config_template/att-dataport
share/hylafax/config_template/att-dataport-2
share/hylafax/config_template/att-dataport-2.0
share/hylafax/config_template/att-dpexpress-2
share/hylafax/config_template/cirrus
share/hylafax/config_template/class1
share/hylafax/config_template/class1.0
share/hylafax/config_template/class2
share/hylafax/config_template/class2.0
share/hylafax/config_template/class2.1
share/hylafax/config_template/conexant-1.0
share/hylafax/config_template/davicom-2
share/hylafax/config_template/digi
share/hylafax/config_template/digi-2
share/hylafax/config_template/digi-20
share/hylafax/config_template/dsi-scout+
share/hylafax/config_template/e-tech
share/hylafax/config_template/eicon
share/hylafax/config_template/eicon-2
share/hylafax/config_template/elsa-microlink-56k-basic-2.0
share/hylafax/config_template/everex-2496d
share/hylafax/config_template/exar
share/hylafax/config_template/gvc-288
share/hylafax/config_template/gvc-288-2
share/hylafax/config_template/hayes
share/hylafax/config_template/iaxmodem
share/hylafax/config_template/intel-400e
share/hylafax/config_template/linux-isdn-2
share/hylafax/config_template/lucent
share/hylafax/config_template/lucent-isa
share/hylafax/config_template/lucent-mt-10
share/hylafax/config_template/lucent-mt-2
share/hylafax/config_template/lucent-mt-20
share/hylafax/config_template/lucent-mt-21
share/hylafax/config_template/moto-288
share/hylafax/config_template/mt-1432
share/hylafax/config_template/nuvo-voyager
share/hylafax/config_template/ppi-pm14400fxmt
share/hylafax/config_template/ppi-pm14400fxsa
share/hylafax/config_template/prometheus
share/hylafax/config_template/rc144ac
share/hylafax/config_template/rc144ac-1
share/hylafax/config_template/rc288dpi
share/hylafax/config_template/rc288dpi-1
share/hylafax/config_template/rc32acl
share/hylafax/config_template/rc32acl-1
share/hylafax/config_template/rockwell-k56
share/hylafax/config_template/rockwell-rc
share/hylafax/config_template/sierra
share/hylafax/config_template/skel
share/hylafax/config_template/t38modem
share/hylafax/config_template/telebit-qblazer
share/hylafax/config_template/telebit-t3000
share/hylafax/config_template/telebit-wb
share/hylafax/config_template/topic
share/hylafax/config_template/tricom2842
share/hylafax/config_template/uds-fastalk
share/hylafax/config_template/umc92144
share/hylafax/config_template/umc9624
share/hylafax/config_template/usr-2.0
share/hylafax/config_template/usr-rts
share/hylafax/config_template/usr-xon
share/hylafax/config_template/zyxel-1496e
share/hylafax/config_template/zyxel-1496e-1
share/hylafax/config_template/zyxel-1496e-2.0
share/hylafax/config_template/zyxel-2864
share/hylafax/etc_template/cover.templ
share/hylafax/etc_template/dialrules
share/hylafax/etc_template/dialrules.europe
share/hylafax/etc_template/dialrules.sf-ba
share/hylafax/etc_template/dpsprinter.ps
share/hylafax/etc_template/hosts.hfaxd
share/hylafax/etc_template/lutRS18.pcf
share/hylafax/etc_template/xferfaxlog
@dirrm share/hylafax/etc_template
@dirrm share/hylafax/config_template
@dirrm share/hylafax
@dirrm share/doc/hylafax
@dirrm libexec/hylafax
@dirrm libdata/hylafax

19
hylafax/distinfo Normal file
View file

@ -0,0 +1,19 @@
$NetBSD: distinfo,v 1.1.1.1 2006/05/20 15:29:28 ahallmann Exp $
SHA1 (hylafax/hylafax-4.3.0.tar.gz) = cf0634c410996be1bf2fd34d83ad2dba45d69138
RMD160 (hylafax/hylafax-4.3.0.tar.gz) = 29c62721e4895848b325f4f3a7b7e7782e275aa8
Size (hylafax/hylafax-4.3.0.tar.gz) = 1468136 bytes
SHA1 (patch-aa) = 94de7c7fb55c9c95c6a774fb732e2d47ec818152
SHA1 (patch-ab) = 5ee930814178223fa66dd308f365ff400559fd1d
SHA1 (patch-ac) = 6f89cc0c9e7a0e789c23b0dfc604376e457091b7
SHA1 (patch-ad) = a7e361980c94a025be0b326c1cf694cce3cbff72
SHA1 (patch-ae) = 5ecc3759186a1b8612aaece698a65135b03f5329
SHA1 (patch-af) = 5c2429d08f2f4c6f5af19dd4775277434abc7ac4
SHA1 (patch-ag) = e1a38918cadf1d1cca7765ee2c050e99dfed0b7f
SHA1 (patch-ah) = 084a99cfe21d7090fca33d9e068036e19707f441
SHA1 (patch-ai) = 84009dd805156f5802bf2c4946a83cab6b1fe53f
SHA1 (patch-al) = edac7c7af07556f7321ba7ede1eeca55e618b8cc
SHA1 (patch-am) = b004485310a2257630561a42b3f08896604ce986
SHA1 (patch-an) = 535f9454e473d7bb26a256aec3158cffdb3d0399
SHA1 (patch-ao) = 73da088c0dbc13a0dcb8d6abaa36804f34638c51
SHA1 (patch-ap) = f9d6a2796535e7200419d6e24203b9995e5cfb39

35
hylafax/files/hylafax.sh Executable file
View file

@ -0,0 +1,35 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: hylafax.sh,v 1.1.1.1 2006/05/20 15:29:28 ahallmann Exp $
#
# PROVIDE: hylafax
# REQUIRE: DAEMON
command=${1:-start}
case ${command} in
start)
if [ -x @PREFIX@/libexec/hfaxd -a -f /var/spool/hylafax/etc/config ] ; then
echo -n 'Starting hfaxd'
@PREFIX@/libexec/hfaxd -i 4559 -o 4557 -s 444
echo ' faxq.'
@PREFIX@/sbin/faxq
fi
;;
stop)
PIDS=`ps -ax -o pid,command|egrep '[ /](faxq|hfaxd) '|awk '{printf " " $1}'`
if [ -n "$PIDS" ];then
echo "Stopping hylafax pids$PIDS."
kill -TERM $PIDS
else
echo "hylafax not running?"
fi
;;
restart)
( $0 stop )
sleep 1
$0 start
;;
esac
exit 0

29
hylafax/patches/patch-aa Normal file
View file

@ -0,0 +1,29 @@
$NetBSD: patch-aa,v 1.1.1.1 2006/05/20 15:29:28 ahallmann Exp $
--- Makefile.in.orig Mon Apr 14 03:44:42 2003
+++ Makefile.in
@@ -237,22 +237,13 @@ makeClientDirs::
makeServerDirs::
-${INSTALL} -u ${SYSUSER} -g ${SYSGROUP} -m ${DIRMODE} \
-idb hylafax.sw.server -dir ${SBIN};
- -${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m ${DIRMODE} \
- -idb hylafax.sw.server -dir ${SPOOL}
- -${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m ${DIRMODE} \
- -idb hylafax.sw.server -dir \
- -F ${SPOOL} bin client config dev etc info log recvq status
- -${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m 700 \
- -idb hylafax.sw.server -dir \
- -F ${SPOOL} sendq doneq docq tmp pollq archive
makeDirs: makeClientDirs makeServerDirs
makeDevices::
- ${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m 600 -fifo \
- -idb hylafax.sw.server -F ${SPOOL} FIFO
install: makeDirs makeDevices
- ${INSTALL} -m 444 -F ${SPOOL} -idb hylafax.sw.server \
+ -${MKDIR} -p -m 755 ${PREFIX}/share/doc/hylafax
+ ${INSTALL} -m 444 -F ${PREFIX}/share/doc/hylafax -idb hylafax.sw.server \
-src ${SRCDIR}/COPYRIGHT -O COPYRIGHT
@if [ "@REGEX@" = yes ]; then \
${ECHO} "= "regex; cd regex; ${MAKE} install || exit 1; \

12
hylafax/patches/patch-ab Normal file
View file

@ -0,0 +1,12 @@
$NetBSD: patch-ab,v 1.1.1.1 2006/05/20 15:29:28 ahallmann Exp $
--- config.h.in.orig Mon Mar 19 06:48:23 2001
+++ config.h.in
@@ -58,6 +58,7 @@
* NB: The Unix-domain support is unfinished.
*/
#define FAX_USER "@FAXUID@" /* account name of the ``fax user'' */
+#define FAX_GROUP "@FAXGID@" /* group name of the ``fax user'' */
#define FAX_SERVICE "hylafax" /* client-server service name */
#define FAX_PROTONAME "tcp" /* protocol used by client+server */
#define FAX_DEFPORT 4559 /* port to use if service is unknown */

13
hylafax/patches/patch-ac Normal file
View file

@ -0,0 +1,13 @@
$NetBSD: patch-ac,v 1.1.1.1 2006/05/20 15:29:28 ahallmann Exp $
--- config/Makefile.in.orig 2004-05-22 02:12:35.000000000 +0000
+++ config/Makefile.in
@@ -120,6 +120,7 @@ targets: ${TARGETS}
PUTSERVER=${INSTALL} -idb ${PRODUCT}.sw.server
install: default ${CONFIGFILES}
+ -${MKDIR} -p -m 0755 ${PREFIX}/share/hylafax/config_template
for i in ${CONFIGFILES}; do \
- ${PUTSERVER} -F ${SPOOL}/config -m 444 -src ${SRCDIR}/$$i -O $$i; \
+ ${PUTSERVER} -F ${PREFIX}/share/hylafax/config_template -m 444 -src ${SRCDIR}/$$i -O $$i; \
done

15
hylafax/patches/patch-ad Normal file
View file

@ -0,0 +1,15 @@
$NetBSD: patch-ad,v 1.1.1.1 2006/05/20 15:29:28 ahallmann Exp $
--- config/skel.orig Sun Apr 7 21:29:27 2002
+++ config/skel
@@ -41,8 +41,8 @@ ServerTracing: 1 # log server-related
SessionTracing: 11 # log server-related operations
RecvFileMode: 0600 # recvd facsimile are not public
LogFileMode: 0600 # private log files
-DeviceMode: 0600 # device is accessible only to uucp/fax
-GettyArgs: "-h %l dx_%s" # requires modem to auto-detect fax/data
+DeviceMode: 0660 # device is accessible only to uucp/fax
+GettyArgs: "std.%s" # requires modem to auto-detect fax/data
QualifyTSI: "" # do not restrict inbound facsimile
SpeakerVolume: off # machine's are already too loud
RingsBeforeAnswer: 1 # answer on first ring

174
hylafax/patches/patch-ae Normal file
View file

@ -0,0 +1,174 @@
$NetBSD: patch-ae,v 1.1.1.1 2006/05/20 15:29:29 ahallmann Exp $
--- configure.orig 2004-12-28 04:45:03.000000000 +0000
+++ configure
@@ -37,23 +37,23 @@
#
# Setup general configuration parameters.
#
-DIR_BIN=/usr/local/bin
-DIR_SBIN=/usr/local/sbin
-DIR_LIBDATA=/usr/local/lib/fax
-DIR_LIB=/usr/local/lib
-DIR_LIBEXEC=$DIR_SBIN
+DIR_BIN=${PREFIX}/bin
+DIR_SBIN=${PREFIX}/sbin
+DIR_LIBDATA=${PREFIX}/libdata/hylafax
+DIR_LIB=${PREFIX}/lib
+DIR_LIBEXEC=${PREFIX}/libexec
DIR_SPOOL=/var/spool/hylafax
-DIR_HTML=/var/httpd/htdocs/hylafax
-DIR_CGI=/var/httpd/cgi-bin
+DIR_HTML=${PREFIX}/http/htdocs/hylafax
+DIR_CGI=${PREFIX}/http/cgi-bin
PATH_DPSRIP=$DIR_LIBEXEC/ps2fax.exe
-PATH_IMPRIP=/usr/lib/print/psrip
+PATH_IMPRIP=${PREFIX}/lib/print/psrip
HTMLPATH=/hylafax
CGIPATH=/cgi-bin
DEFVRES=98
PAGESIZE="North American Letter"
FAXUID=uucp
FAXGID=
-SYSUID=bin
+SYSUID=root
SYSGID=
DSO=auto
GETTY=auto
@@ -72,9 +72,8 @@ DPS=no
GS=no
IMP=no
UTMP=auto
-OPTIMIZER="-O"
-LIBTIFF="-L/usr/local/lib -ltiff"
-TIFFINC=/usr/local/include
+LIBTIFF="-Wl,-R${PREFIX}/lib -L${PREFIX}/lib -ltiff -ljpeg -lz -lm"
+TIFFINC=${PREFIX}/include
TIFFBIN=
LIBZ=
ZLIBINC=
@@ -82,8 +81,8 @@ REGEX=yes
LIBREGEX='-L${DEPTH}/regex -lregex'
REGEXINC='${DEPTH}/${TOPSRCDIR}/regex'
DBLIB=no
-LIBDB="-L/usr/local/lib -ldb"
-DBLIBINC=/usr/local/include
+LIBDB="-L${PREFIX}/lib -ldb"
+DBLIBINC=${PREFIX}/include
FAXD=
LIBFAXSERVER='libfaxserver.${DSO}'
LIBUTIL='${UTIL}/libfaxutil.${DSO}'
@@ -222,6 +221,7 @@ PKG_EMAIL
PKG_VENDOR
PORT
PORTFUNCS
+PREFIX
PROTOTYPES
PSPACKAGE PS
PWDCMD
@@ -287,7 +287,7 @@ test -d /usr/bsd && PATH=$PATH:/usr/bsd
test -d /usr/ucb && PATH=$PATH:/usr/ucb # Sun and others
test -d /usr/contrib/bin && PATH=$PATH:/usr/contrib/bin # BSDi
test -d /usr/5bin && PATH=/usr/5bin:$PATH:/usr/etc # Sun and others
-test -d /usr/local/bin && PATH=/usr/local/bin:$PATH # for GNU stuff
+test -d ${PREFIX}/bin && PATH=${PREFIX}/bin:$PATH # for packages stuff
PATH=$PATH:$OPATH
POSIXLY_CORRECT=1; export POSIXLY_CORRECT # disable GNU extensions
@@ -3086,13 +3086,7 @@ main()
printf("old include files: version %u\n", ZLIB_VERSION);
exit(-1);
}
- if (strncmp(zlib_version, ZLIB_VERSION, 4) != 0) {
- printf("library/header file incompatibility: %s %s\n",
- zlib_version, ZLIB_VERSION);
- exit(-1);
- } else {
exit(0);
- }
}
EOF
capture cat t.c
@@ -3154,7 +3148,7 @@ Note "Checking TIFF support."
# Location of TIFF binaries
#
if [ -z "$TIFFBIN" ]; then
- DIRS="/usr/local/bin /usr/contrib/bin /usr/gnu/bin /usr/bin"
+ DIRS="${PREFIX}/bin /usr/local/bin /usr/gnu/bin /usr/bin"
for i in $DIRS; do
test -x $i/tiff2ps && { TIFFBIN=$i; break; }
done
@@ -3775,7 +3769,7 @@ fi
if [ -z "$PATH_VGETTY" ]; then
PATH_VGETTY=`findApp vgetty /usr/libexec:/sbin:$PATH`
if [ -z "$PATH_VGETTY" ]; then
- PATH_VGETTY=/bin/vgetty
+ PATH_VGETTY=${PREFIX}/bin/vgetty
Note "WARNING, no vgetty program found to handle a voice call, using $PATH_VGETTY."
else
Note "Looks like $PATH_VGETTY is the program to exec for a voice call."
@@ -3788,7 +3782,7 @@ fi
if [ -z "$PATH_EGETTY" ]; then
PATH_EGETTY=`findApp egetty /usr/libexec:/sbin:$PATH`
if [ -z "$PATH_EGETTY" ]; then
- PATH_EGETTY=/bin/egetty
+ PATH_EGETTY=${PREFIX}/bin/egetty
Note "WARNING, no egetty program found, using $PATH_EGETTY."
else
Note "Looks like $PATH_EGETTY is the program to exec for an extern call."
@@ -3859,6 +3853,7 @@ PickRIP()
{
if [ -z "$PATH_GSRIP" ]; then
GSLOCS="
+ ${PREFIX}/bin/gs
/usr/local/bin/gs
/usr/contrib/bin/gs
/usr/gnu/bin/gs
@@ -3906,7 +3901,7 @@ fax software to operate correctly. See
on building Ghostscript with the necessary TIFF driver.
EOF
- PATH_PSRIP=/usr/local/bin/gs
+ PATH_PSRIP=${PREFIX}/bin/gs
PATH_GSRIP=$PATH_PSRIP
fi
}
@@ -3973,9 +3968,9 @@ if [ -z "$PATH_AFM" ]; then
else
DIR_AFMS="
/usr/lib/afm
- /usr/local/lib/afm
- /usr/local/share/ghostscript/fonts
- /usr/local/lib/ghostscript/fonts
+ ${PREFIX}/lib/afm
+ ${PREFIX}/share/ghostscript/fonts
+ ${PREFIX}/lib/ghostscript/fonts
/usr/share/ghostscript/fonts
/usr/gnu/lib/ghostscript/fonts
/opt/gnu/lib/ghostscript/fonts
@@ -3995,7 +3990,7 @@ if [ -z "$PATH_AFM" ]; then
fi
if [ -z "$PATH_AFM" ]; then
# put it where ghostscript normally puts things
- PATH_AFM=/usr/local/lib/ghostscript/fonts
+ PATH_AFM=${PREFIX}/share/ghostscript/fonts
Note "WARNING, could not locate a directory with font metric information,"
Note "guessing that font metric information goes in $PATH_AFM."
else
@@ -4014,6 +4009,7 @@ fi
#
if [ -z "$DIR_MAN" ]; then
MANPATH="
+ ${PREFIX}/man
$MANPATH
/usr/local/man
/usr/contrib/man
@@ -4023,7 +4019,7 @@ if [ -z "$DIR_MAN" ]; then
for i in $MANPATH; do
test -d $i && { DIR_MAN=$i; break; }
done
- test -z "$DIR_MAN" && DIR_MAN=/usr/local/man
+ test -z "$DIR_MAN" && DIR_MAN=${PREFIX}/man
fi
Note "Looks like manual pages go in $DIR_MAN."
if [ -z "$MANSCHEME" ]; then

21
hylafax/patches/patch-af Normal file
View file

@ -0,0 +1,21 @@
$NetBSD: patch-af,v 1.1.1.1 2006/05/20 15:29:29 ahallmann Exp $
--- defs.in.orig 2004-04-27 20:16:15.000000000 +0000
+++ defs.in
@@ -44,6 +44,7 @@ SHELL = @SCRIPT_SH@
# to insufficient; you are better off rerunning the
# configure script so that all uses are set correctly.
#
+PREFIX = @PREFIX@
SPOOL = @SPOOL@
SBIN = @SBIN@
BIN = @BIN@
@@ -261,7 +262,7 @@ LDFLAGS = ${LDOPTS} ${LDLIBS}
LDOPTS = ${VLDOPTS} ${LLDOPTS} ${GLDOPTS}
LDLIBS = ${VLDLIBS} ${LLDLIBS} ${GLDLIBS}
-GLDOPTS = -L/usr/local/lib
+GLDOPTS = -L${PREFIX}/lib
GLDLIBS = ${SHDLIBC}
#

25
hylafax/patches/patch-ag Normal file
View file

@ -0,0 +1,25 @@
$NetBSD: patch-ag,v 1.1.1.1 2006/05/20 15:29:29 ahallmann Exp $
--- etc/Makefile.in.orig Tue Feb 6 04:54:06 2001
+++ etc/Makefile.in
@@ -85,14 +85,16 @@ install: default
-src ${SRCDIR}/faxsetup.$$i -O faxsetup.$$i; \
done
${PUTSERVER} -F ${SBIN} -m 755 -src probemodem.sh -O probemodem
- ${PUTSAMPLE} -F ${SPOOL}/etc -m 644 -o xferfaxlog
- ${PUTSAMPLE} -F ${SPOOL}/etc -m 600 -o hosts.hfaxd
+ -${MKDIR} -m 755 ${PREFIX}/share/hylafax
+ -${MKDIR} -m 755 ${PREFIX}/share/hylafax/etc_template
+ ${PUTSAMPLE} -F ${PREFIX}/share/hylafax/etc_template -m 644 -o xferfaxlog
+ ${PUTSAMPLE} -F ${PREFIX}/share/hylafax/etc_template -m 600 -o hosts.hfaxd
for i in ${DIALRULES}; do \
- ${PUTSERVER} -F ${SPOOL}/etc -m 444 -src ${SRCDIR}/$$i \
+ ${PUTSERVER} -F ${PREFIX}/share/hylafax/etc_template -m 444 -src ${SRCDIR}/$$i \
-idb "config(update)" -O $$i; \
done
${PUTSERVER} -F ${LIBEXEC} -m 755 -O lockname ondelay
- ${PUTSAMPLE} -F ${SPOOL}/etc -m 644 -idb nostrip \
+ ${PUTSAMPLE} -F ${PREFIX}/share/hylafax/etc_template -m 644 -idb nostrip \
-src ${SRCDIR}/lutRS18.pcf -O lutRS18.pcf
#

48
hylafax/patches/patch-ah Normal file
View file

@ -0,0 +1,48 @@
$NetBSD: patch-ah,v 1.1.1.1 2006/05/20 15:29:29 ahallmann Exp $
--- etc/faxaddmodem.sh.in.orig 2004-12-22 13:44:05.000000000 +0000
+++ etc/faxaddmodem.sh.in
@@ -46,6 +46,7 @@
SPOOL=@SPOOL@
SPEED=
+TTY=
while [ x"$1" != x"" ] ; do
case $1 in
-s) SPEED=$2; shift;;
@@ -115,7 +116,7 @@ CAT="$CAT -u" # something to do unbuff
FAX=@FAXUID@ # identity of the fax user
GROUP=/etc/group # where to go for group entries
PROTOGID=@FAXGID@ # group who's gid we use for FAX user
-defPROTOGID=10 # use this gid if PROTOGID doesn't exist
+defPROTOGID=117 # use this gid if PROTOGID doesn't exist
MODEMCONFIG=$SPOOL/config # location of prototype modem config files
RMCMD="$RM -f" # forced removal
@@ -809,7 +810,7 @@ SendToModem()
COMMAND=$*
sleep 1 # wait for previous kill
case $TARGET in
- *-linux*) ;;
+ *-linux*|*-netbsd*) ;;
*) onDev $STTY 0; sleep 1 ;; # reset the modem (hopefully)
esac
# start listening for output
@@ -1152,7 +1153,7 @@ EOF
done;
MODEMCLASSES=`echo $MODEMCLASSES | $SED -e 's/3/2.0/g' -e 's/4/1.0/g' -e 's/5/2.1/g' -e 's/ $//g'`
SUPPORT=`echo $SUPPORT | $SED -e 's/3/2.0/g' -e 's/4/1.0/g' -e 's/5/2.1/g'`.
- if [ "`echo $SUPPORT | $GREP \" \"`" = "" ]; then echo $SUPPORT; fi
+ if [ "`echo $SUPPORT | $GREP \ `" = "" ]; then echo $SUPPORT; fi
case "$MODEMCLASSES" in
"") giveup;;
"1") ModemType=Class1; configureClass1Modem;;
@@ -1163,7 +1164,7 @@ EOF
*)
DEFAULTCLASS=`echo $MODEMCLASSES | $SED 's/\([^ ]*\).*/\1/g'`
x=""
- while [ "`echo \" $MODEMCLASSES \" | $GREP \" $x \"`" = "" ]; do
+ while [ "`echo \ $MODEMCLASSES\ | $GREP \ $x\ `" = "" ]; do
echo $SUPPORT
prompt "How should it be configured [$DEFAULTCLASS]?";
read x

117
hylafax/patches/patch-ai Normal file
View file

@ -0,0 +1,117 @@
$NetBSD: patch-ai,v 1.1.1.1 2006/05/20 15:29:29 ahallmann Exp $
--- etc/faxsetup.sh.in.orig 2006-05-18 10:46:43.000000000 +0200
+++ etc/faxsetup.sh.in
@@ -41,7 +41,9 @@
# This script interactively prepares and verifies
# a HylaFAX client and/or server machine for use.
#
-PATH=/bin:/usr/bin:/etc
+PREFIX=@PREFIX@
+#
+PATH=/bin:/usr/bin:${PREFIX}/bin:${PREFIX}/sbin
test -d /usr/ucb && PATH=$PATH:/usr/ucb # Sun and others
test -d /usr/bsd && PATH=$PATH:/usr/bsd # Silicon Graphics
test -d /usr/5bin && PATH=/usr/5bin:$PATH:/usr/etc # Sun and others
@@ -61,6 +63,7 @@ FUSER=@FUSER@ # fuser command to dump
GREP=@GREP@ # grep command for use below
LN=@LN@ # ln command for use below
LN_S=@LN_S@ # ln option for creating a symbolic link
+MKDIR=@MKDIR@ # directory creation program for use below
MIMENCODE=@MIMENCODE@ # mimencode command to dump in setup.cache
MKFIFO=@MKFIFO@ # FIFO creation program for use below
MV=@MV@ # move file for use below
@@ -152,6 +155,7 @@ LIBEXEC DIR_LIBEXEC
LN
MANDIR DIR_MAN
MIMENCODE
+MKDIR
MKFIFO
MV
PATH
@@ -832,6 +836,61 @@ if [ "$euid" != "root" ]; then
boom
fi
+createspool()
+{
+ old_spool="`dirname ${DIR_SPOOL}`/fax"
+ if [ -d "${old_spool}" ]; then
+ cat <<EOF
+=================================================================
+
+ Found an existing ${old_spool}, probably from an older version
+ of the HylaFax package.
+ You might want to copy you customizations to @SPOOL@ after
+ faxsetup is done.
+
+=================================================================
+EOF
+ fi
+ if [ -d "${DIR_SPOOL}" ]; then
+ cat <<EOF
+=================================================================
+
+ @SPOOL@ already exists, probably from a previous run of
+ faxsetup -- I'm not touching it!
+
+ If you encounter problems, deinstall the HylaFax package,
+ remove @SPOOL@ and reinstall the package.
+
+=================================================================
+EOF
+ else
+ ${MKDIR} -p -m 0755 ${DIR_SPOOL}
+ ${MKFIFO} -m 0600 ${DIR_SPOOL}/FIFO
+ for i in archive docq doneq pollq sendq tmp ; do
+ ${MKDIR} -m 0700 ${DIR_SPOOL}/$i
+ done
+ for i in bin client config cover dev etc info log recvq status ; do
+ ${MKDIR} -m 0755 ${DIR_SPOOL}/$i
+ done
+ for i in `ls ${PREFIX}/share/hylafax/etc_template` ; do
+ ${CP} -p ${PREFIX}/share/hylafax/etc_template/$i \
+ ${DIR_SPOOL}/etc/$i
+ done
+ for i in `ls ${PREFIX}/share/hylafax/config_template` ; do
+ ${CP} -p ${PREFIX}/share/hylafax/config_template/$i \
+ ${DIR_SPOOL}/config/$i
+ done
+ for i in `ls ${PREFIX}/libexec/hylafax` ; do
+ ${CP} -p ${PREFIX}/libexec/hylafax/$i ${DIR_SPOOL}/bin/$i
+ done
+ ${CHOWN} -R ${PROTOUID}:${PROTOGID} ${DIR_SPOOL}
+ fi
+}
+
+Note "Creating spool directory structure"
+
+createspool
+
onClient && Note "Checking system for proper client configuration."
onServer && Note "Checking system for proper server configuration."
@@ -2236,12 +2295,7 @@ if onServer; then
findproc()
{
- # NB: ps ax should give an error on System V, so we try it first!
- pid="`ps ax 2>/dev/null | $AWK \"\
- /[\/ (]$1[ )]/ {print \\$1;}
- /[\/ ]$1\$/ {print \\$1;}\"`"
- test "$pid" ||
- pid="`ps -e 2>/dev/null | $AWK \"/ $1[ ]*\$/ {print \\$1;}\"`"
+ pid="`ps -ax | grep -e "[/ (]$1[ )]" -e "[/ ]$1\$" | grep -v grep | head -1 | cut -c1-5`"
echo "$pid"
}
@@ -2470,6 +2524,8 @@ Note "Done verifying system setup."
if onServer; then
$RM $JUNK
- $RM -r $TMPDIR
+ if [ -n "$TMPDIR" ]; then
+ $RM -r $TMPDIR
+ fi
fi
exit 0

13
hylafax/patches/patch-al Normal file
View file

@ -0,0 +1,13 @@
$NetBSD: patch-al,v 1.1.1.1 2006/05/20 15:29:29 ahallmann Exp $
--- faxd/Getty.c++.orig 2005-01-01 21:27:15.000000000 +0000
+++ faxd/Getty.c++
@@ -234,7 +234,7 @@ Getty::hangup()
// NB: this is executed in the parent
fxStr device = fxStr::format("%s" | line, _PATH_DEV);
Sys::chown(device, UUCPLock::getUUCPUid(), UUCPLock::getUUCPGid());
- Sys::chmod(device, 0600); // reset protection
+ Sys::chmod(device, 0660); // reset protection
}
extern void vlogError(const char* fmt, va_list ap);

27
hylafax/patches/patch-am Normal file
View file

@ -0,0 +1,27 @@
$NetBSD: patch-am,v 1.1.1.1 2006/05/20 15:29:29 ahallmann Exp $
--- faxd/UUCPLock.c++.orig Thu Sep 21 10:24:54 2000
+++ faxd/UUCPLock.c++
@@ -37,6 +37,7 @@ extern "C" {
}
#endif
#include <pwd.h>
+#include <grp.h>
/*
* UUCP Device Locking Support.
@@ -146,8 +147,13 @@ UUCPLock::setupIDs()
if (!pwd)
faxApp::fatal("Can not deduce identity of UUCP");
UUCPuid = pwd->pw_uid;
- UUCPgid = pwd->pw_gid;
endpwent(); // paranoia
+
+ const group *grp = getgrnam(FAX_GROUP);
+ if (!grp)
+ faxApp::fatal("Can not deduce group identity of '" FAX_GROUP "'");
+ UUCPgid = grp->gr_gid;
+ endgrent(); // paranoia
}
}
uid_t UUCPLock::getUUCPUid() { setupIDs(); return UUCPuid; }

13
hylafax/patches/patch-an Normal file
View file

@ -0,0 +1,13 @@
$NetBSD: patch-an,v 1.1.1.1 2006/05/20 15:29:29 ahallmann Exp $
--- faxd/faxGettyApp.c++.orig 2005-01-01 21:27:16.000000000 +0000
+++ faxd/faxGettyApp.c++
@@ -789,7 +789,7 @@ faxGettyApp::notifyDocumentRecvd(const F
FaxServer::notifyDocumentRecvd(ri);
FaxAcctInfo ai;
- ai.user = "fax";
+ ai.user = FAX_USER;
ai.commid = getCommID();
ai.duration = (time_t) ri.time;
ai.start = Sys::now() - ai.duration;

31
hylafax/patches/patch-ao Normal file
View file

@ -0,0 +1,31 @@
$NetBSD: patch-ao,v 1.1.1.1 2006/05/20 15:29:29 ahallmann Exp $
--- hfaxd/User.c++.orig 2005-01-10 04:52:09.000000000 +0000
+++ hfaxd/User.c++
@@ -244,7 +244,7 @@ HylaFAXServer::userName(u_int id)
if (id == uid) // user currently logged in
return (const char*) the_user;
if (id == FAXUID_ANON) // anonymous user
- return "fax";
+ return FAX_USER;
if (idcache == NULL) // load cache from file
fillIDCache();
const fxStr* hit = idcache->find(id); // check cache
@@ -263,7 +263,7 @@ HylaFAXServer::userID(const char* name,
{
if (name == the_user)
id = uid;
- else if (strcmp(name, "fax") == 0)
+ else if (strcmp(name, FAX_USER) == 0)
id = FAXUID_ANON;
else {
if (idcache == NULL)
@@ -350,7 +350,7 @@ HylaFAXServer::findUser(FILE* db, const
if (faxuid < FAXUID_MAX)
SetBit(FAXUID_RESV); // reserved uid
else
- logError("Internal error, \"fax\" UID (%u) too large.", faxuid);
+ logError("Internal error, \"" FAX_USER "\" UID (%u) too large.", faxuid);
SetBit(FAXUID_ANON); // anonymous uid is reserved
while (nextRecord(db, line, sizeof (line))) {
if (line[0] == '!')

35
hylafax/patches/patch-ap Normal file
View file

@ -0,0 +1,35 @@
$NetBSD: patch-ap,v 1.1.1.1 2006/05/20 15:29:29 ahallmann Exp $
--- util/Makefile.in.orig 2004-08-16 12:58:22.000000000 +0000
+++ util/Makefile.in
@@ -156,7 +156,7 @@ checkat: checkat.o ${LIBS}
PUTCLIENT = ${INSTALL} -idb ${PRODUCT}.sw.client
PUTSERVER = ${INSTALL} -idb ${PRODUCT}.sw.server
PUTSERV = ${PUTSERVER} -m 755
-PUTSUPD = ${PUTSERVER} -F ${SPOOL}/bin -idb "config(update)"
+PUTSUPD = ${PUTSERVER} -F ${LIBEXEC}/hylafax -idb "config(update)"
PUTSBIN = ${PUTSERVER} -F ${SBIN}
installClient: default
@@ -173,6 +173,7 @@ install: installClient
${PUTSBIN} -m 755 -src xferfaxstats.sh -O xferfaxstats
${PUTSBIN} -m 755 -src recvstats.sh -O recvstats
${PUTSBIN} -m 755 -idb "config(update)" -src faxcron.sh -O faxcron
+ -${MKDIR} -m 755 ${LIBEXEC}/hylafax
${PUTSUPD} -m 755 -src ps2fax.gs.sh -O ps2fax.gs
${PUTSUPD} -m 755 -src ps2fax.dps.sh -O ps2fax.dps
${PUTSUPD} -m 755 -src ps2fax.imp.sh -O ps2fax.imp
@@ -187,9 +188,11 @@ install: installClient
${PUTSUPD} -m 755 -src pollrcvd.sh -O pollrcvd
${PUTSUPD} -m 755 -src mkcover.sh -O mkcover
${PUTSUPD} -m 755 -src wedged.sh -O wedged
- ${PUTSERVER} -F ${SPOOL}/etc -m 444 -idb "config(update)" \
+ -${MKDIR} -m 755 ${PREFIX}/share/hylafax
+ -${MKDIR} -m 755 ${PREFIX}/share/hylafax/etc_template
+ ${PUTSERVER} -F ${PREFIX}/share/hylafax/etc_template -m 444 -idb "config(update)" \
-src ${SRCDIR}/dpsprinter.ps -O dpsprinter.ps
- ${PUTSERVER} -F ${SPOOL}/etc -idb "config(suggest)" \
+ ${PUTSERVER} -F ${PREFIX}/share/hylafax/etc_template -idb "config(suggest)" \
-m 444 -src ${SRCDIR}/cover.templ -O cover.templ
@MAKEDSOINCLUDE@ @MAKELQUOTE@${SRCDIR}/Makefile.@DSO@dso@MAKERQUOTE@