pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/LPRng-core Fully convert to using the pkginstall...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4c8617e9216f
branches:  trunk
changeset: 514963:4c8617e9216f
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Jun 21 13:50:46 2006 +0000

description:
Fully convert to using the pkginstall framework, and make the rc.d script
use /etc/rc.subr.  Bump the PKGREVISION to 3.

diffstat:

 print/LPRng-core/DEINSTALL      |  79 -----------------------------------------
 print/LPRng-core/INSTALL        |  69 -----------------------------------
 print/LPRng-core/MESSAGE        |  21 +++-------
 print/LPRng-core/Makefile       |  30 +++++---------
 print/LPRng-core/PLIST          |   8 ++--
 print/LPRng-core/files/LPRng.sh |  68 +++++++++-------------------------
 6 files changed, 39 insertions(+), 236 deletions(-)

diffs (truncated from 349 to 300 lines):

diff -r 00787cee3003 -r 4c8617e9216f print/LPRng-core/DEINSTALL
--- a/print/LPRng-core/DEINSTALL        Wed Jun 21 13:49:55 2006 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.4 2006/01/22 00:57:02 joerg Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CMP="@CMP@"
-RM="@RM@"
-
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/LPRng
-CONFDIR="@PKG_SYSCONFDIR@"
-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}
-       do
-               FILE=${CONFDIR}/lpd/${file}
-               SAMPLEFILE=${SAMPLECONFDIR}/${file}.example
-               if ${CMP} -s ${FILE} ${SAMPLEFILE}
-               then
-                       ${RM} -f ${FILE}
-               fi
-       done
-       for file in ${NONCONFFILES}
-       do
-               FILE=${CONFDIR}/${file}
-               SAMPLEFILE=${SAMPLECONFDIR}/${file}.example
-               if ${CMP} -s ${FILE} ${SAMPLEFILE}
-               then
-                       ${RM} -f ${FILE}
-               fi
-       done
-       ;;
-
-POST-DEINSTALL)
-       modified_files=''
-       for file in ${CONFFILES}
-       do
-               FILE=${CONFDIR}/lpd/${file}
-               if [ -f ${FILE} ]
-               then
-                       modified_files="${modified_files} ${FILE}"
-               fi
-       done
-       for file in ${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
-       ${CAT} << EOF
-===========================================================================
-EOF
-       fi
-       ;;
-esac
-exit 0
diff -r 00787cee3003 -r 4c8617e9216f print/LPRng-core/INSTALL
--- a/print/LPRng-core/INSTALL  Wed Jun 21 13:49:55 2006 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: INSTALL,v 1.3 2004/09/06 10:44:44 martti Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-CAT="@CAT@"
-CHMOD="@CHMOD@"
-CP="@CP@"
-MKDIR="@MKDIR@"
-
-SAMPLECONFDIR=${PKG_PREFIX}/share/examples/LPRng
-CONFDIR="@PKG_SYSCONFDIR@"
-CONFFILES="lpd.conf lpd.perms"
-NONCONFFILES="printcap"
-
-case ${STAGE} in
-POST-INSTALL)
-       echo "Installing configuration files:"
-       ${MKDIR} ${CONFDIR}/lpd
-       for file in ${CONFFILES}
-       do
-               FILE=${CONFDIR}/lpd/${file}
-               SAMPLEFILE=${SAMPLECONFDIR}/${file}.example
-               if [ -f ${FILE} ]
-               then
-                       echo "    ${FILE} already exists"
-               else
-                       echo "    ${FILE}"
-                       ${CP} ${SAMPLEFILE} ${FILE}
-                       ${CHMOD} 644 ${FILE}
-               fi
-       done
-       for file in ${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}
-       do
-               FILE=${CONFDIR}/lpd/${file}
-               echo "  ${FILE}"
-       done
-       for file in ${NONCONFFILES}
-       do
-               FILE=${CONFDIR}/${file}
-               echo "  ${FILE}"
-       done
-       ${CAT} << EOF
-===========================================================================
-EOF
-       ;;
-esac
-exit 0
diff -r 00787cee3003 -r 4c8617e9216f print/LPRng-core/MESSAGE
--- a/print/LPRng-core/MESSAGE  Wed Jun 21 13:49:55 2006 +0000
+++ b/print/LPRng-core/MESSAGE  Wed Jun 21 13:50:46 2006 +0000
@@ -1,21 +1,12 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.3 2005/10/11 15:06:29 reed Exp $
-
-To activate the LPRng printing system do the following:
+$NetBSD: MESSAGE,v 1.4 2006/06/21 13:50:46 jlam Exp $
 
-    - set `lpd=NO' in /etc/rc.conf
-    - run ${RCD_SCRIPTS_DIR}/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
+To activate the LPRng printing system, do the following:
 
-Note that LPRng uses:
+    - Set ``lpd=NO'' and ``LPRng=YES'' in /etc/rc.conf.
+    - Run ``${RCD_SCRIPTS_DIR}/LPRng start''.
 
-       ${PKG_SYSCONFDIR}/printcap
-       ${PKG_SYSCONFDIR}/lpd/lpd.conf
-       ${PKG_SYSCONFDIR}/lpd/lpd.perms
-
-Simple example configuration files are found at:
-
-       ${PREFIX}/share/examples/LPRng
+Please remember to adjust your printing aliases or your PATH to use
+the LPRng programs in ${PREFIX}/bin and ${PREFIX}/sbin.
 
 ===========================================================================
diff -r 00787cee3003 -r 4c8617e9216f print/LPRng-core/Makefile
--- a/print/LPRng-core/Makefile Wed Jun 21 13:49:55 2006 +0000
+++ b/print/LPRng-core/Makefile Wed Jun 21 13:50:46 2006 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.28 2006/05/18 20:30:00 wiz Exp $
+# $NetBSD: Makefile,v 1.29 2006/06/21 13:50:46 jlam Exp $
 
 DISTNAME=      LPRng-3.8.28
 PKGNAME=       LPRng-core-3.8.28
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    print
 MASTER_SITES=  ftp://ftp.lprng.com/pub/LPRng/LPRng/ \
                http://www.lprng.com/DISTRIB/LPRng/ \
@@ -46,16 +46,10 @@
 
 EXAMPLESDIR=           ${PREFIX}/share/examples/LPRng
 RCD_SCRIPTS=           LPRng
-
-FILES_SUBST+=          CAT=${CAT:Q}
-FILES_SUBST+=          CHMOD=${CHMOD:Q}
-FILES_SUBST+=          CMP=${CMP:Q}
-FILES_SUBST+=          CP=${CP:Q}
-FILES_SUBST+=          MKDIR=${MKDIR:Q}
-FILES_SUBST+=          RM=${RM:Q}
-FILES_SUBST+=          TRUE=${TRUE:Q}
-FILES_SUBST+=          PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
-FILES_SUBST_SED+=      ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
+OWN_DIRS+=             ${PKG_SYSCONFDIR}/lpd
+CONF_FILES+=           ${EXAMPLESDIR}/lpd.conf ${PKG_SYSCONFDIR}/lpd/lpd.conf
+CONF_FILES+=           ${EXAMPLESDIR}/lpd.perms ${PKG_SYSCONFDIR}/lpd/lpd.perms
+CONF_FILES+=           ${EXAMPLESDIR}/printcap ${PKG_SYSCONFDIR}/printcap
 
 pre-patch:
        ${MV} ${WRKSRC:Q}/man/lpd.conf.n ${WRKSRC:Q}/man/lpd.conf.n.in
@@ -67,18 +61,16 @@
                -e s,@LPD_PERMS_PATH@,${LPD_PERMS_PATH:Q},g             \
                -e s,@PRINTCAP_PATH@,${PRINTCAP_PATH:Q},g               \
                -e s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR:Q},g             \
-               < ${WRKSRC:Q}/man/lpd.conf.n.in > ${WRKSRC:Q}/man/lpd.conf.n
+               ${WRKSRC:Q}/man/lpd.conf.n.in > ${WRKSRC:Q}/man/lpd.conf.n
 
 pre-install:
        ${SED}  -e s,@PREFIX@,${PREFIX:Q},g                             \
-               < ${FILESDIR:Q}/LPRng.sh > ${WRKDIR:Q}/LPRng.sh
+               ${FILESDIR:Q}/LPRng.sh > ${WRKDIR:Q}/LPRng.sh
 
 post-install:
        ${INSTALL_DATA_DIR} ${EXAMPLESDIR}
-       set -e;                                                         \
-       for file in lpd.conf lpd.perms printcap; do                     \
-               ${INSTALL_DATA} ${WRKSRC:Q}/"$${file}"                  \
-                       ${EXAMPLESDIR:Q}/"$${file}".example;            \
-       done
+       ${INSTALL_DATA} ${WRKSRC}/lpd.conf ${EXAMPLESDIR}
+       ${INSTALL_DATA} ${WRKSRC}/lpd.perms ${EXAMPLESDIR}
+       ${INSTALL_DATA} ${WRKSRC}/printcap ${EXAMPLESDIR}
 
 .include "../../mk/bsd.pkg.mk"
diff -r 00787cee3003 -r 4c8617e9216f print/LPRng-core/PLIST
--- a/print/LPRng-core/PLIST    Wed Jun 21 13:49:55 2006 +0000
+++ b/print/LPRng-core/PLIST    Wed Jun 21 13:50:46 2006 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2005/05/02 20:34:04 reed Exp $
+@comment $NetBSD: PLIST,v 1.8 2006/06/21 13:50:46 jlam Exp $
 bin/cancel
 bin/lp
 bin/lpq
@@ -34,9 +34,9 @@
 sbin/lpd
 sbin/lprng_certs
 sbin/lprng_index_certs
-share/examples/LPRng/lpd.conf.example
-share/examples/LPRng/lpd.perms.example
-share/examples/LPRng/printcap.example
+share/examples/LPRng/lpd.conf
+share/examples/LPRng/lpd.perms
+share/examples/LPRng/printcap
 share/examples/rc.d/LPRng
 @dirrm share/examples/LPRng
 @dirrm libexec/LPRng
diff -r 00787cee3003 -r 4c8617e9216f print/LPRng-core/files/LPRng.sh
--- a/print/LPRng-core/files/LPRng.sh   Wed Jun 21 13:49:55 2006 +0000
+++ b/print/LPRng-core/files/LPRng.sh   Wed Jun 21 13:50:46 2006 +0000
@@ -1,59 +1,27 @@
 #!/bin/sh
 #
-# $NetBSD: LPRng.sh,v 1.3 2004/09/06 10:44:44 martti Exp $
+# $NetBSD: LPRng.sh,v 1.4 2006/06/21 13:50:46 jlam Exp $
 #
-# PROVIDE: lpd
+# PROVIDE: LPRng 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
+. /etc/rc.subr
 
-cmd=${1:-start}
-
-case ${cmd} in
-start)
-       if [ "$pid" = "" -a -x ${command} ]
-       then
-               echo "Starting LPRng."



Home | Main Index | Thread Index | Old Index