summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorjlam <jlam>2000-12-28 00:13:08 +0000
committerjlam <jlam>2000-12-28 00:13:08 +0000
commit4b8becb394427354bf33b083e4b3811bba36640b (patch)
tree5d28c10d6fc0bda8623cab0b6d8424f2c33defdd /print
parente86ce9d40cfb02b21a177185f1f6ddcae0999531 (diff)
downloadpkgsrc-4b8becb394427354bf33b083e4b3811bba36640b.tar.gz
Note conflict with print/cups.
Add INSTALL/DEINSTALL scripts to handle the configure files. Replace lprng.sh with a rc.d-style script LPRng.sh. Fix problems with setting the default paths for LPRng.
Diffstat (limited to 'print')
-rw-r--r--print/LPRng-core/Makefile89
-rw-r--r--print/LPRng-core/files/LPRng.sh58
-rw-r--r--print/LPRng-core/files/lprng.sh16
-rw-r--r--print/LPRng-core/files/patch-sum5
-rw-r--r--print/LPRng-core/patches/patch-ab16
-rw-r--r--print/LPRng-core/patches/patch-ac12
-rw-r--r--print/LPRng-core/patches/patch-ad46
-rw-r--r--print/LPRng-core/patches/tmp.patch-aa43
-rw-r--r--print/LPRng-core/pkg/DEINSTALL67
-rw-r--r--print/LPRng-core/pkg/INSTALL57
-rw-r--r--print/LPRng-core/pkg/MESSAGE13
-rw-r--r--print/LPRng-core/pkg/PLIST7
12 files changed, 253 insertions, 176 deletions
diff --git a/print/LPRng-core/Makefile b/print/LPRng-core/Makefile
index f432c615286..15690dd54db 100644
--- a/print/LPRng-core/Makefile
+++ b/print/LPRng-core/Makefile
@@ -1,27 +1,33 @@
-# $NetBSD: Makefile,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
+# $NetBSD: Makefile,v 1.2 2000/12/28 00:13:08 jlam Exp $
# FreeBSD Id: Makefile,v 1.5 1998/10/21 00:57:27 steve Exp
#
-DISTNAME= LPRng-3.6.26
-PKGNAME= LPRng-core-3.6.26
-CATEGORIES= print
-MASTER_SITES= ftp://ftp.astart.com/pub/LPRng/LPRng/
-EXTRACT_SUFX= .tgz
+DISTNAME= LPRng-3.6.26
+PKGNAME= LPRng-core-3.6.26
+CATEGORIES= print
+MASTER_SITES= ftp://ftp.astart.com/pub/LPRng/LPRng/
+EXTRACT_SUFX= .tgz
-MAINTAINER= jlam@netbsd.org
-HOMEPAGE= http://www.astart.com/LPRng.html
+MAINTAINER= jlam@netbsd.org
+HOMEPAGE= http://www.astart.com/LPRng/LPRng.html
-BUILD_DEFS+= LPRNG_SUID LPRNG_PRIV_PORTS
+CONFLICTS+= cups-[0-9]*
-USE_GMAKE= yes
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --sysconfdir=${LPRNG_SYSCONFDIR} \
- --with-filterdir=${FILTER_DIR}
+USE_GMAKE= # defined
+GNU_CONFIGURE= # defined
+CONFIGURE_ARGS+= --sysconfdir="/etc"
+CONFIGURE_ARGS+= --with-lpd_perms_path="${LPD_PERMS_PATH}"
+CONFIGURE_ARGS+= --with-lpd_printcap_path="${LPD_PRINTCAP_PATH}"
+CONFIGURE_ARGS+= --with-printcap_path="${PRINTCAP_PATH}"
+CONFIGURE_ARGS+= --with-filterdir="${FILTER_DIR}"
+CONFIGURE_ARGS+= --with-filter_path="${FILTER_PATH}"
+CONFIGURE_ARGS+= --with-ld_library_path="${FILTER_LD_PATH}"
.include "../../mk/bsd.prefs.mk"
LPRNG_SUID?= YES
LPRNG_PRIV_PORTS?= NO
+BUILD_DEFS+= LPRNG_SUID LPRNG_PRIV_PORTS
.if (${LPRNG_SUID} == "NO")
CONFIGURE_ARGS+= --disable-setuid
@@ -30,40 +36,51 @@ CONFIGURE_ARGS+= --disable-setuid
CONFIGURE_ARGS+= --enable-priv_ports
.endif
-LPRNG_SYSCONFDIR= /etc
-LPD_PRINTCAP_PATH= ${LPRNG_SYSCONFDIR}/lpd_printcap,${PREFIX}/etc/lpd_printcap
-LPD_PERMS_PATH= ${LPRNG_SYSCONFDIR}/lpd.perms
-PRINTCAP_PATH= ${LPRNG_SYSCONFDIR}/printcap
-
-EXAMPLES_DIR= ${PREFIX}/share/examples/LPRng
+# Look for printer configuration files firstly in /etc, then ${PREFIX}/etc.
+#
+LPD_PERMS_PATH= /etc/lpd.perms:${PREFIX}/etc/lpd.perms
+LPD_PRINTCAP_PATH= /etc/lpd_printcap:${PREFIX}/etc/lpd_printcap
+PRINTCAP_PATH= /etc/printcap:${PREFIX}/etc/printcap
FILTER_DIR= ${PREFIX}/libexec/LPRng
FILTER_LD_PATH= /usr/lib:${PREFIX}/lib:/usr/local/lib
FILTER_PATH= ${FILTER_DIR}:/sbin:/usr/sbin:/bin:/usr/bin:${PREFIX}/sbin:${PREFIX}/bin:/usr/local/sbin:/usr/local/bin
-MAKE_ENV+= FILTER_LD_PATH="${FILTER_LD_PATH}" \
- FILTER_PATH="${FILTER_PATH}" \
- LPD_PRINTCAP_PATH="${LPD_PRINTCAP_PATH}"
+MAKE_ENV+= POSTINSTALL="NO"
+
+EXAMPLES_DIR= ${PREFIX}/share/examples/LPRng
+DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+INSTALL_FILE= ${WRKDIR}/INSTALL
pre-patch:
${MV} ${WRKSRC}/man/lpd.conf.5 ${WRKSRC}/man/lpd.conf.5.in
post-configure:
- ${SED} -e "s#@@FILTER_LD_PATH@@#${FILTER_LD_PATH}#g" \
- -e "s#@@FILTER_PATH@@#${FILTER_PATH}#g" \
- -e "s#@@LPD_PRINTCAP_PATH@@#${LPD_PRINTCAP_PATH}#g" \
- -e "s#@@LPD_PERMS_PATH@@#${LPD_PERMS_PATH}#g" \
- -e "s#@@PRINTCAP_PATH@@#${PRINTCAP_PATH}#g" \
- ${WRKSRC}/man/lpd.conf.5.in > ${WRKSRC}/man/lpd.conf.5
+ ${SED} -e "s,@FILTER_LD_PATH@,${FILTER_LD_PATH},g" \
+ -e "s,@FILTER_PATH@,${FILTER_PATH},g" \
+ -e "s,@LPD_PRINTCAP_PATH@,${LPD_PRINTCAP_PATH},g" \
+ -e "s,@LPD_PERMS_PATH@,${LPD_PERMS_PATH},g" \
+ -e "s,@PRINTCAP_PATH@,${PRINTCAP_PATH},g" \
+ < ${WRKSRC}/man/lpd.conf.5.in > ${WRKSRC}/man/lpd.conf.5
+
+pre-install:
+ ${SED} -e "s,@PREFIX@,${PREFIX},g" \
+ < ${FILESDIR}/LPRng.sh > ${WRKDIR}/LPRng.sh
+ ${SED} -e "s,@CAT@,${CAT},g" \
+ -e "s,@RM@,${RM},g" \
+ -e "s,@RMDIR@,${RMDIR},g" \
+ < ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
+ ${SED} -e "s,@CAT@,${CAT},g" \
+ -e "s,@CHMOD@,${CHMOD},g" \
+ -e "s,@CP@,${CP},g" \
+ < ${PKGDIR}/INSTALL > ${INSTALL_FILE}
post-install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/LPRng.sh ${PREFIX}/etc/rc.d/LPRng
${INSTALL_DATA_DIR} ${EXAMPLES_DIR}
- ${MV} ${LPRNG_SYSCONFDIR}/lpd.conf.example ${EXAMPLES_DIR}
- ${MV} ${LPRNG_SYSCONFDIR}/lpd.perms.example ${EXAMPLES_DIR}
- ${MV} ${LPRNG_SYSCONFDIR}/printcap.example ${EXAMPLES_DIR}
- ${SED} -e "s#@@PREFIX@@#${PREFIX}#g" \
- -e "s#@@CAT@@#${CAT}#g" \
- -e "s#@@ECHO@@#${ECHO}#g" \
- ${FILESDIR}/lprng.sh > ${WRKDIR}/lprng.sh
- ${INSTALL_SCRIPT} ${WRKDIR}/lprng.sh ${PREFIX}/etc/rc.d/lprng.sh
+ for file in lpd.conf lpd.perms printcap; do \
+ ${INSTALL_DATA} ${WRKSRC}/$${file} \
+ ${EXAMPLES_DIR}/$${file}.example; \
+ done
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../mk/bsd.pkg.mk"
diff --git a/print/LPRng-core/files/LPRng.sh b/print/LPRng-core/files/LPRng.sh
new file mode 100644
index 00000000000..c6f2a4655da
--- /dev/null
+++ b/print/LPRng-core/files/LPRng.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# $NetBSD: LPRng.sh,v 1.1 2000/12/28 00:13:08 jlam Exp $
+#
+# PROVIDE: lpd
+# REQUIRE: DAEMON
+
+name="lpd"
+command=@@PREFIX@@/sbin/${name}
+pidfile="/var/run/${name}.pid"
+
+if [ -f ${pidfile} ]
+then
+ pid=`head -1 ${pidfile}`
+else
+ pid=`ps -ax | awk '{print $1,$5}' | grep ${name} | awk '{print $1}'`
+fi
+
+cmd=${1:-start}
+
+case ${cmd} in
+start)
+ if [ "$pid" = "" -a -x ${command} ]
+ then
+ echo "Starting LPRng."
+ ${command}
+ fi
+ ;;
+
+stop)
+ if [ "$pid" != "" ]
+ then
+ echo "Stopping LPRng."
+ kill $pid
+ fi
+ ;;
+
+restart)
+ ( $0 stop )
+ sleep 5
+ $0 start
+ ;;
+
+status)
+ if [ "$pid" != "" ]
+ then
+ echo "LPRng is running as pid ${pid}."
+ else
+ echo "LPRng is not running."
+ fi
+ ;;
+
+*)
+ echo 1>&2 "Usage: ${name} [restart|start|stop|status]"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/print/LPRng-core/files/lprng.sh b/print/LPRng-core/files/lprng.sh
deleted file mode 100644
index c9d8a0c1375..00000000000
--- a/print/LPRng-core/files/lprng.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: lprng.sh,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
-
-# Stop BSD lpd if it is running.
-#
-if [ -f /var/run/lpd.pid ]; then
- kill `@@CAT@@ /var/run/lpd.pid`
-fi
-
-# Start LPRng lpd if it exists.
-#
-if [ -x @@PREFIX@@/sbin/lpd ]; then
- @@ECHO@@ -n ' LPRng';
- @@PREFIX@@/sbin/lpd
-fi
diff --git a/print/LPRng-core/files/patch-sum b/print/LPRng-core/files/patch-sum
index 369ea95e6ab..f999a88f473 100644
--- a/print/LPRng-core/files/patch-sum
+++ b/print/LPRng-core/files/patch-sum
@@ -1,5 +1,4 @@
-$NetBSD: patch-sum,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
+$NetBSD: patch-sum,v 1.2 2000/12/28 00:13:08 jlam Exp $
MD5 (patch-ab) = b91d3b0d6624edd43adf33c9852a4984
-MD5 (patch-ac) = 89fa587f78602373b3e3b0e736125c92
-MD5 (patch-ad) = b6ee24a8fba88e704be025f9efbb004c
+MD5 (patch-ac) = ea0aa9116935a818bf5c502be68730d7
diff --git a/print/LPRng-core/patches/patch-ab b/print/LPRng-core/patches/patch-ab
deleted file mode 100644
index ab0cd55dac9..00000000000
--- a/print/LPRng-core/patches/patch-ab
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ab,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
-
---- src/Makefile.in.orig Sat Oct 14 00:08:21 2000
-+++ src/Makefile.in Mon Dec 11 16:38:18 2000
-@@ -95,7 +95,10 @@
- FORCE_LOCALHOST=@FORCE_LOCALHOST@
- PERMS=@PERMS@
-
--CFLAGS:= @CPPFLAGS@ @CFLAGS@ @DEFS@ -DLOCALEDIR=\"$(localedir)\" $(CFLAGS)
-+CFLAGS:= @CPPFLAGS@ @CFLAGS@ @DEFS@ -DLOCALEDIR=\"$(localedir)\" $(CFLAGS) \
-+ -DFILTER_LD_PATH=\"${FILTER_LD_PATH}\" \
-+ -DFILTER_PATH=\"${FILTER_PATH}\" \
-+ -DLPD_PRINTCAP_PATH=\"${LPD_PRINTCAP_PATH}\"
- LDFLAGS:= @LDFLAGS@
-
- STRIP=@STRIP@
diff --git a/print/LPRng-core/patches/patch-ac b/print/LPRng-core/patches/patch-ac
index 9ba2087b96f..c4a8ae71c71 100644
--- a/print/LPRng-core/patches/patch-ac
+++ b/print/LPRng-core/patches/patch-ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
+$NetBSD: patch-ac,v 1.2 2000/12/28 00:13:08 jlam Exp $
--- man/lpd.conf.5.in.orig Fri Aug 27 21:38:52 1999
+++ man/lpd.conf.5.in Mon Sep 13 11:35:56 1999
@@ -7,7 +7,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
.TP
\fBfilter_ld_path\fR
-(default: /lib:/usr/lib:/usr/5lib:/usr/ucblib)
-+(default: @@FILTER_LD_PATH@@)
++(default: @FILTER_LD_PATH@)
The value for the environment variable LD_LIBRARY_PATH,
both used when executing, and passed on to filters.
This variable is used to find shared libraries on
@@ -16,7 +16,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
.TP
\fBfilter_path\fR
-(default: /bin:/usr/bin:/usr/ucb:/usr/sbin:/usr/etc:/etc)
-+(default: @@FILTER_PATH@@)
++(default: @FILTER_PATH@)
The value for the environment variable PATH, both used to find filters
and passed on to filters run by \fBlpd\fR and \fBlpr\fR.
.TP
@@ -25,7 +25,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
LPD or LPRng.
.TP
-\fBlpd_printcap_path\fR (default: "/etc/lpd_printcap:/usr/etc/lpd_printcap")
-+\fBlpd_printcap_path\fR (default: @@LPD_PRINTCAP_PATH@@)
++\fBlpd_printcap_path\fR (default: @LPD_PRINTCAP_PATH@)
The location of additional
.B lpd
server printcap database information.
@@ -34,7 +34,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
.TP
\fBprintcap_path\fR
-(default: "etc/printcap:/usr/etc/printcap:/var/spool/lpd/printcap.%h")
-+(default: @@PRINTCAP_PATH@@)
++(default: @PRINTCAP_PATH@)
The location of the printcap database information.
If a file or filter does not exist, it is skipped.
All valid entries in these files will be used.
@@ -42,7 +42,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
.TP
\fBperms_path\fR
-(default: /etc/lpd.perms:/usr/etc/lpd.perms:/var/spool/lpd/lpd.perms.%h)
-+(default: @@LPD_PERMS_PATH@@)
++(default: @LPD_PERMS_PATH@)
The location of the printer permissions database.
If a file or filter does not exist, it is skipped.
The first file or filter that exists and is readable will be used.
diff --git a/print/LPRng-core/patches/patch-ad b/print/LPRng-core/patches/patch-ad
deleted file mode 100644
index 902276f042b..00000000000
--- a/print/LPRng-core/patches/patch-ad
+++ /dev/null
@@ -1,46 +0,0 @@
-$NetBSD: patch-ad,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
-
---- postinstall.generic.sh.orig Wed Dec 13 03:48:10 2000
-+++ postinstall.generic.sh Wed Dec 13 03:48:31 2000
-@@ -7,7 +7,7 @@
- # It needs to be massaged with the information for
- # various paths.
- # If you are building a package, then you do NOT want
--# to have this executed - it will put the sample files
-+# to have this executed - it will put the example files
- # in place. You need to do this during the postinstall
- # step in the package installation.
- #
-@@ -19,23 +19,23 @@
- echo "$v is a filter '$p'"
- exit 0
- fi
-- echo "Checking for $v.sample in $d"
-+ echo "Checking for $v.example in $d"
- if [ ! -d "$d" ] ; then
- echo "Directory $d does not exist!"
- sh mkinstalldirs $d
- fi
-- if [ -f $v.sample ] ; then
-- if [ $v.sample != $p.sample ] ; then cp $v.sample $p.sample; fi
-+ if [ -f $v.example ] ; then
-+ if [ $v.example != $p.example ] ; then cp $v.example $p.example; fi
- elif [ -f $v ] ; then
-- if [ $v != $p.sample ] ; then cp $v $p.sample; fi
-+ if [ $v != $p.example ] ; then cp $v $p.example; fi
- else
-- echo "Do not have $v.sample or $v"
-+ echo "Do not have $v.example or $v"
- fi
-- if [ ! -f $p.sample ] ; then
-- echo "Do not have $p.sample"
-+ if [ ! -f $p.example ] ; then
-+ echo "Do not have $p.example"
- elif [ ! -f $p ] ; then
-- chmod 644 $p.sample
-- cp $p.sample $p;
-+ chmod 644 $p.example
-+ cp $p.example $p;
- chmod 644 $p;
- fi;
- }
diff --git a/print/LPRng-core/patches/tmp.patch-aa b/print/LPRng-core/patches/tmp.patch-aa
deleted file mode 100644
index 0156c86dec2..00000000000
--- a/print/LPRng-core/patches/tmp.patch-aa
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: tmp.patch-aa,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
-
---- Makefile.in.orig Fri Aug 27 21:37:47 1999
-+++ Makefile.in Mon Sep 13 13:24:16 1999
-@@ -31,6 +31,8 @@
- libexecdir=@libexecdir@
- # for the configuration stuff
- sysconfdir=@sysconfdir@
-+# for the sample configuraton files
-+egdir=${prefix}/share/examples/LPRng
-
- LPD_PERMS_PATH=@LPD_PERMS_PATH@
- LPD_CONF_PATH=@LPD_CONF_PATH@
-@@ -73,20 +75,20 @@
- install::
- #install default versions of the lpd.conf and lpd.perm files
-
-+ ${BSD_INSTALL_DATA_DIR} ${egdir};
-+
- f=$(LPD_CONF_PATH) ; g=lpd.conf; \
-- if [ -z "$$f" ] ; then f=${admindir}/$$g; fi; \
-- $(INSTALL) -m 644 $(SRC)/$$g $$f.sample; \
-+ ${BSD_INSTALL_DATA} ${SRC}/$$g ${egdir}/$$g.sample; \
- if [ ! -f "$$f" ] ; then \
-- echo $(INSTALL) -m 644 $(SRC)/$$g $$f; \
-- $(INSTALL) -m 644 $(SRC)/$$g $$f; \
-+ echo ${BSD_INSTALL_DATA} ${SRC}/$$g $$f; \
-+ ${BSD_INSTALL_DATA} ${SRC}/$$g $$f; \
- fi;
-
-- f=$(LPD_PERMS_PATH); g=lpd.perms; \
-- if [ -z "$$f" ] ; then f=${admindir}/$$g; fi; \
-- $(INSTALL) -m 644 $(SRC)/$$g $$f.sample; \
-+ f=$(LPD_PERMS_PATH) ; g=lpd.perms; \
-+ ${BSD_INSTALL_DATA} ${SRC}/$$g ${egdir}/$$g.sample; \
- if [ ! -f "$$f" ] ; then \
-- echo $(INSTALL) -m 644 $(SRC)/$$g $$f; \
-- $(INSTALL) -m 644 $(SRC)/$$g $$f; \
-+ echo ${BSD_INSTALL_DATA} ${SRC}/$$g $$f; \
-+ ${BSD_INSTALL_DATA} ${SRC}/$$g $$f; \
- fi;
-
- info dvi check:
diff --git a/print/LPRng-core/pkg/DEINSTALL b/print/LPRng-core/pkg/DEINSTALL
new file mode 100644
index 00000000000..4d9f35838a7
--- /dev/null
+++ b/print/LPRng-core/pkg/DEINSTALL
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2000/12/28 00:13:09 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+CAT="@CAT@"
+RM="@RM@"
+RMDIR="@RMDIR@"
+
+SAMPLECONFDIR=${PKG_PREFIX}/share/examples/LPRng
+CONFDIR=/etc
+CONFFILES="lpd.conf lpd.perms"
+NONCONFFILES="printcap"
+
+case ${STAGE} in
+DEINSTALL)
+ # Remove configuration files if they don't differ from the default
+ # config file.
+ #
+ for file in ${CONFFILES} ${NONCONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ SAMPLEFILE=${SAMPLECONFDIR}/${file}.example
+ if diff -q ${FILE} ${SAMPLEFILE} >/dev/null
+ then
+ ${RM} -f ${FILE}
+ fi
+ done
+ ;;
+
+POST-DEINSTALL)
+ modified_files=''
+ for file in ${CONFFILES} ${NONCONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ if [ -f ${FILE} ]
+ then
+ modified_files="${modified_files} ${FILE}"
+ fi
+ done
+
+ if [ -n "${modified_files}" ]
+ then
+ ${CAT} << EOF
+===========================================================================
+If you won't be using ${PKGNAME} any longer, you may want to remove
+the following files:
+
+EOF
+ for file in ${modified_files}
+ do
+ echo " ${file}"
+ done
+ fi
+ ${CAT} << EOF
+===========================================================================
+EOF
+ ;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/print/LPRng-core/pkg/INSTALL b/print/LPRng-core/pkg/INSTALL
new file mode 100644
index 00000000000..0a4379e02ed
--- /dev/null
+++ b/print/LPRng-core/pkg/INSTALL
@@ -0,0 +1,57 @@
+#! /bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2000/12/28 00:13:09 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+CAT="@CAT@"
+CHMOD="@CHMOD@"
+CP="@CP@"
+
+SAMPLECONFDIR=${PKG_PREFIX}/share/examples/LPRng
+CONFDIR=/etc
+CONFFILES="lpd.conf lpd.perms"
+NONCONFFILES="printcap"
+
+case ${STAGE} in
+PRE-INSTALL)
+ ;;
+
+POST-INSTALL)
+ echo "Installing configuration files:"
+ for file in ${CONFFILES} ${NONCONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ SAMPLEFILE=${SAMPLECONFDIR}/${file}.example
+ if [ -f ${FILE} ]
+ then
+ echo " ${FILE} already exists"
+ else
+ echo " ${FILE}"
+ ${CP} ${SAMPLEFILE} ${FILE}
+ ${CHMOD} 644 ${FILE}
+ fi
+ done
+ ${CAT} << EOF
+
+===========================================================================
+Some files you might need to customize include the following:
+
+EOF
+ for file in ${CONFFILES} ${NONCONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ echo " ${FILE}"
+ done
+ ${CAT} << EOF
+===========================================================================
+EOF
+ ;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/print/LPRng-core/pkg/MESSAGE b/print/LPRng-core/pkg/MESSAGE
index 24b5ca485fe..93a6e9544df 100644
--- a/print/LPRng-core/pkg/MESSAGE
+++ b/print/LPRng-core/pkg/MESSAGE
@@ -1,18 +1,21 @@
-$NetBSD: MESSAGE,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
===========================================================================
+$NetBSD: MESSAGE,v 1.2 2000/12/28 00:13:09 jlam Exp $
To activate the LPRng printing system do the following:
- - set `lpd=NO' in /etc/rc.conf
- - run ${PREFIX}/etc/rc.d/lprng.sh (may be added to /etc/rc.local)
- - remember to adjust your aliases or your PATH to use the new programs
+
+ - set `lpd=NO' in /etc/rc.conf
+ - run ${PREFIX}/etc/rc.d/LPRng (may be added to /etc/rc.local or
+ copied into /etc/rc.d)
+ - remember to adjust your aliases or your PATH to use the new programs
Note that LPRng uses:
+
/etc/printcap
/etc/lpd_printcap
/etc/lpd.conf
/etc/lpd.perms
Simple example configuration files are found at:
- ${PREFIX}/share/examples/LPRng
+ ${PREFIX}/share/examples/LPRng
===========================================================================
diff --git a/print/LPRng-core/pkg/PLIST b/print/LPRng-core/pkg/PLIST
index 149b8989485..614c695d27f 100644
--- a/print/LPRng-core/pkg/PLIST
+++ b/print/LPRng-core/pkg/PLIST
@@ -1,11 +1,11 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2000/12/12 20:09:42 kei Exp $
+@comment $NetBSD: PLIST,v 1.2 2000/12/28 00:13:09 jlam Exp $
bin/cancel
bin/lp
bin/lpq
bin/lpr
bin/lprm
bin/lpstat
-etc/rc.d/lprng.sh
+etc/rc.d/LPRng
libexec/LPRng/lpbanner
libexec/LPRng/lpf
libexec/LPRng/pclbanner
@@ -32,10 +32,7 @@ sbin/lpc
sbin/lpd
sbin/lpraccnt
share/examples/LPRng/lpd.conf.example
-@exec if [ ! -f /etc/lpd.conf ]; then cp %D/%F /etc/lpd.conf; fi
share/examples/LPRng/lpd.perms.example
-@exec if [ ! -f /etc/lpd.perms ]; then cp %D/%F /etc/lpd.perms; fi
share/examples/LPRng/printcap.example
-@unexec echo "If you won't be using the LPRng-core package anymore, you may want to manually delete /etc/lpd.conf and /etc/lpd.perms."
@dirrm share/examples/LPRng
@dirrm libexec/LPRng