aboutsummaryrefslogtreecommitdiff
path: root/sysutils/LPRng
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2005-04-04 12:32:57 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2005-04-04 12:32:57 +0000
commitb34a004c7708f3d41e2a7e1a0820c3d67ce94cce (patch)
treec5a06f949286089790491b6b3c94511a86a3a42a /sysutils/LPRng
parentdf862338c48447acc7cece0fb65756244b717c5c (diff)
downloadports-b34a004c7708f3d41e2a7e1a0820c3d67ce94cce.tar.gz
ports-b34a004c7708f3d41e2a7e1a0820c3d67ce94cce.zip
Notes
Diffstat (limited to 'sysutils/LPRng')
-rw-r--r--sysutils/LPRng/Makefile53
-rw-r--r--sysutils/LPRng/distinfo4
-rw-r--r--sysutils/LPRng/files/pkg-install.in119
-rw-r--r--sysutils/LPRng/files/pkg-message.in (renamed from sysutils/LPRng/pkg-message)6
-rw-r--r--sysutils/LPRng/pkg-deinstall36
-rw-r--r--sysutils/LPRng/pkg-install172
-rw-r--r--sysutils/LPRng/pkg-plist22
7 files changed, 176 insertions, 236 deletions
diff --git a/sysutils/LPRng/Makefile b/sysutils/LPRng/Makefile
index c2ed3ce018e8..cda6b71bdeef 100644
--- a/sysutils/LPRng/Makefile
+++ b/sysutils/LPRng/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= LPRng
-PORTVERSION= 3.8.26
+PORTVERSION= 3.8.28
CATEGORIES= sysutils print
MASTER_SITES= ftp://ftp.lprng.com/pub/%SUBDIR%/ \
ftp://ftp.cise.ufl.edu/pub/mirrors/%SUBDIR%/ \
@@ -23,8 +23,14 @@ LIB_DEPENDS= gdbm.3:${PORTSDIR}/databases/gdbm
GNU_CONFIGURE= yes
USE_INC_LIBTOOL_VER=13
-INSTALLS_SHLIB= yes
+SUB_FILES= pkg-message pkg-install
+SUB_LIST= SYSCONFDIR="${SYSCONFDIR}"
+
+PKGDEINSTALL= ${PKGINSTALL}
+
+CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" \
+ CPPFLAGS="-I${LOCALBASE}/include"
CONFIGURE_ARGS= \
--with-sbindir=${PREFIX}/sbin \
--with-filterdir=${PREFIX}/libexec/filters \
@@ -32,15 +38,20 @@ CONFIGURE_ARGS= \
--with-lpd_conf_path=${PREFIX}/etc/lpd.conf \
--with-lpd_perms_path=${PREFIX}/etc/lpd.perms \
--with-printcap_path=/etc/printcap \
- LDFLAGS="-L${LOCALBASE}/lib" \
- CPPFLAGS="-I${LOCALBASE}/include" \
--with-ld_library_path="${PREFIX}/lib:/lib:/usr/lib:/${LOCALBASE}/lib" \
--enable-gdbm=${LOCALBASE}
-.if defined(PREFIX)
- CONFIGURE_ARGS+= --prefix="${PREFIX}"
+
+.if defined(PORT_REPLACES_BASE_LPR)
+PREFIX= /usr
+SYSCONFDIR= /etc
.endif
+
.if defined(SYSCONFDIR)
- CONFIGURE_ARGS+= --sysconfdir="${SYSCONFDIR}"
+CONFIGURE_ARGS+= --sysconfdir="${SYSCONFDIR}"
+PLIST_SUB+= CWD="" SYSCONFDIR="${SYSCONFDIR:S,^/,,}"
+.else
+SYSCONFDIR= ${PREFIX}/etc
+PLIST_SUB+= CWD="@comment " SYSCONFDIR="${SYSCONFDIR:S,^${PREFIX}/,,}"
.endif
MAN1= lpf.1 psbanner.1 lp.1 cancel.1 lprng_certs.1 lprng_index_certs.1 \
@@ -48,9 +59,15 @@ MAN1= lpf.1 psbanner.1 lp.1 cancel.1 lprng_certs.1 lprng_index_certs.1 \
MAN5= printcap.5 lpd.conf.5 lpd.perms.5
MAN8= lpc.8 checkpc.8 lpd.8
+.include <bsd.port.pre.mk>
+
+.if ${PREFIX} == "/usr"
+CONFIGURE_ARGS+= --mandir="${PREFIX}/share/man"
+.endif
+
pre-everything::
@${ECHO_MSG} "If you want to replace the default printing system with LPRng, use:"
- @${ECHO_MSG} " make PREFIX=/usr SYSCONFDIR=/etc clean all install"
+ @${ECHO_MSG} " make PORT_REPLACES_BASE_LPR=yes clean all install"
@${ECHO_MSG} " OR"
@${ECHO_MSG} " make CONFIGURE_SCRIPT=STANDARD_configuration clean all install"
@if [ "${PREFIX}" = "/usr" -a ! -d /usr/man ] ; then \
@@ -63,18 +80,30 @@ pre-everything::
${ECHO_MSG} 'man pages and defaults to $${PREFIX}/man, which is incorrect for FreeBSD.'; \
fi
+post-patch:
+ @${ECHO} "#! /bin/sh" > ${WRKSRC}/postinstall.freebsd.sh
+
+pre-install: apply-slist
+ @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
post-install:
+ @${INSTALL_DATA} ${WRKSRC}/lpd.conf ${SYSCONFDIR}/lpd.conf.sample
+ @${INSTALL_DATA} ${WRKSRC}/lpd.perms ${SYSCONFDIR}/lpd.perms.sample
+ @${INSTALL_DATA} ${WRKSRC}/printcap ${SYSCONFDIR}/printcap.sample
+ @${MKDIR} ${PREFIX}/etc/rc.d
+ @${INSTALL_DATA} ${WRKSRC}/init.freebsd ${PREFIX}/etc/rc.d/lprng.sh
.if !defined(NOPORTDOCS)
@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}
@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}/Reference
@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}/PrintingCookbook
.for ext in html pdf ppt ps txt gif jpg png
- for i in `${LS} ${WRKSRC}/DOCS | ${GREP} "\.${ext}$$"`; \
+ @for i in `${LS} ${WRKSRC}/DOCS | ${GREP} "\.${ext}$$"`; \
do ${INSTALL_DATA} ${WRKSRC}/DOCS/$$i ${DOCSDIR}; done
- for i in `${LS} ${WRKSRC}/PrintingCookbook/HTML | ${GREP} "\.${ext}$$"`; \
+ @for i in `${LS} ${WRKSRC}/PrintingCookbook/HTML | ${GREP} "\.${ext}$$"`; \
do ${INSTALL_DATA} ${WRKSRC}/PrintingCookbook/HTML/$$i ${DOCSDIR}/PrintingCookbook; done;
.endfor
.endif
- @${SED} -e "s!DOCSDIR!${DOCSDIR}/!" ${PKGMESSAGE}
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/sysutils/LPRng/distinfo b/sysutils/LPRng/distinfo
index 47fc7b49c266..d9217fd4ed73 100644
--- a/sysutils/LPRng/distinfo
+++ b/sysutils/LPRng/distinfo
@@ -1,2 +1,2 @@
-MD5 (LPRng-3.8.26.tgz) = 654a4a05a9b43b7592060a57c743c940
-SIZE (LPRng-3.8.26.tgz) = 10557934
+MD5 (LPRng-3.8.28.tgz) = 1b3a0abd291b260eab6087ac0e61ed84
+SIZE (LPRng-3.8.28.tgz) = 10212500
diff --git a/sysutils/LPRng/files/pkg-install.in b/sysutils/LPRng/files/pkg-install.in
new file mode 100644
index 000000000000..0dde0937c7b1
--- /dev/null
+++ b/sysutils/LPRng/files/pkg-install.in
@@ -0,0 +1,119 @@
+#! /bin/sh
+
+prefix=%%PREFIX%%
+sysconfdir=%%SYSCONFDIR%%
+
+case "x$2" in
+
+"xPRE-INSTALL")
+
+ # Preserve original files from being overwritten.
+
+ if [ "x$prefix" = "x/usr" ]; then
+ cd $prefix
+ for i in bin/lp bin/lpq bin/lpr bin/lprm sbin/lpc sbin/lpd \
+ share/man/man1/lp.1.gz share/man/man1/lpq.1.gz \
+ share/man/man1/lpr.1.gz share/man/man1/lprm.1.gz \
+ share/man/man5/printcap.5.gz share/man/man8/lpc.8.gz \
+ share/man/man8/lpd.8.gz ; do
+ cp -p $i $i.orig
+ done
+ fi
+
+ ;;
+
+"xPOST-INSTALL")
+
+ cd $sysconfdir
+
+ # Preserve original configuration files from being overwritten.
+ # Restore previously saved configuration if possible.
+
+ if [ "x$sysconfdir" = "x/etc" ]; then
+ for i in lpd.conf lpd.perms printcap; do
+ [ -f $i ] && mv $i $i.orig
+ [ -f $i.saved ] && mv $i.saved $i || cp $i.sample $i
+ done
+ else
+ for i in lpd.conf lpd.perms printcap; do
+ [ -f $i.saved ] && mv $i.saved $i || cp $i.sample $i
+ done
+ fi
+
+ # This is a trick to detect if the user installed a new world at deinstall stage.
+
+ if [ "x$prefix" = "x/usr" ]; then
+ cd $prefix
+ for i in bin/lp bin/lpq bin/lpr bin/lprm sbin/lpc sbin/lpd \
+ share/man/man1/lp.1.gz share/man/man1/lpq.1.gz \
+ share/man/man1/lpr.1.gz share/man/man1/lprm.1.gz \
+ share/man/man5/printcap.5.gz share/man/man8/lpc.8.gz \
+ share/man/man8/lpd.8.gz ; do
+ touch $i.orig
+ done
+ fi
+
+ ;;
+
+"xDEINSTALL")
+
+ cd $sysconfdir
+
+ # Remove unchanged files.
+
+ for i in lpd.conf lpd.perms printcap; do
+ cmp -s $i $i.sample && rm -f $i
+ done
+
+ # Remove backup files if installworld overwrited LPRng files.
+
+ if [ "x$prefix" = "x/usr" ]; then
+ cd $prefix
+ for i in bin/lp bin/lpq bin/lpr bin/lprm sbin/lpc sbin/lpd \
+ share/man/man1/lp.1.gz share/man/man1/lpq.1.gz \
+ share/man/man1/lpr.1.gz share/man/man1/lprm.1.gz \
+ share/man/man5/printcap.5.gz share/man/man8/lpc.8.gz \
+ share/man/man8/lpd.8.gz ; do
+ [ $i -nt $i.orig ] && rm $i.orig
+ done
+ fi
+
+ ;;
+
+"xPOST-DEINSTALL")
+
+ cd $sysconfdir
+
+ # Save remaining modified files so we can restore them at next install.
+ # Restore original files when LPRng files haven't changed.
+
+ for i in lpd.conf lpd.perms printcap; do
+ if [ "x$sysconfdir" = "x/etc" ]; then
+ if [ -f $i ]; then
+ mv $i $i.saved
+ else
+ [ -f $i.orig ] && mv $i.orig $i
+ fi
+ else
+ [ -f $i ] && mv $i $i.saved
+ fi
+ done
+
+ # Restore backup files.
+
+ if [ "x$prefix" = "x/usr" ]; then
+ cd $prefix
+ for i in bin/lp bin/lpq bin/lpr bin/lprm sbin/lpc sbin/lpd \
+ share/man/man1/lp.1.gz share/man/man1/lpq.1.gz \
+ share/man/man1/lpr.1.gz share/man/man1/lprm.1.gz \
+ share/man/man5/printcap.5.gz share/man/man8/lpc.8.gz \
+ share/man/man8/lpd.8.gz ; do
+ [ -f $i.orig ] && mv $i.orig $i
+ done
+ fi
+
+ ;;
+
+esac
+
+exit 0
diff --git a/sysutils/LPRng/pkg-message b/sysutils/LPRng/files/pkg-message.in
index 6de11ed35725..796b60392027 100644
--- a/sysutils/LPRng/pkg-message
+++ b/sysutils/LPRng/files/pkg-message.in
@@ -1,3 +1,4 @@
+**********************************************************************
If LPRng is not activated at installation time,
to activate the LPRng printing system do the following:
@@ -10,12 +11,12 @@ On FreeBSD:
- run 'checkpc -f' to make sure that necessary files have been created
- reboot or kill the old lpd using 'killall lpd' and
- start the new one using '/usr/local/etc/rc.d/lprng.sh start'.
+ start the new one using '%%PREFIX%%/etc/rc.d/lprng.sh start'.
LPRng uses the printcap, lpd.conf, and lpd.perms configuration files
For further information, see the LPRng Documentation:
- DOCSDIR
+ %%DOCSDIR%%
The LPRng Web Site is http://www.lprng.com
@@ -26,3 +27,4 @@ papowell@astart.com 6741 Convoy Court
Network and System San Diego, CA 92111
Consulting 858-874-6543 FAX 858-751-2435
LPRng - Print Spooler (http://www.lprng.com)
+**********************************************************************
diff --git a/sysutils/LPRng/pkg-deinstall b/sysutils/LPRng/pkg-deinstall
deleted file mode 100644
index 9741d3044c16..000000000000
--- a/sysutils/LPRng/pkg-deinstall
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-PREFIX=/usr/local
-LPD_PATH="/usr/local/sbin/lpd"
-INSTALL="/usr/bin/install -c -o root -g wheel"
-LPD_PERMS_PATH="/usr/local/etc/lpd/lpd.perms"
-LPD_CONF_PATH="/usr/local/etc/lpd/lpd.conf"
-PRINTCAP_PATH="/usr/local/etc/printcap"
-SYSCONFDIR=/usr/local/etc
-SBINDIR=/usr/local/sbin
-FILTER_DIR=/usr/local/libexec/filters
-LOCKFILE="/var/run/lpd"
-CONFIG_SUBDIR=lpd
-PSHOWALL="-ax"
-VERSION=3.8.23
-INIT=
-MANDIR=/usr/local/man
-#
-# -- START --
-# preremove.freebsd.sh,v 1.1 2001/08/21 20:33:17 root Exp
-#
-# This is the shell script that does the preremove
-# lpd shutdown. It is the script from hell
-echo RUNNING preremove.freebsd.sh parms "'$0 $@'"
-if [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
-if [ "X$2" = "XDEINSTALL" ] ; then
- echo "Stopping LPD"
- killall -INT lpd
- if [ -f /etc/rc.conf ] ; then
- perl -spi.bak -e '$_ = "" if( /lprng_enable/ );' ${DESTDIR}/etc/rc.conf
- fi
- init=/usr/local/etc/rc.d/lprng.sh
- if [ -f $init ] ; then
- rm -f $init
- fi
-fi
-exit 0
diff --git a/sysutils/LPRng/pkg-install b/sysutils/LPRng/pkg-install
deleted file mode 100644
index 238018dccdb0..000000000000
--- a/sysutils/LPRng/pkg-install
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/bin/sh
-PREFIX=/usr/local
-LPD_PATH="/usr/local/sbin/lpd"
-INSTALL="/usr/bin/install -c -o root -g wheel"
-LPD_PERMS_PATH="/usr/local/etc/lpd/lpd.perms"
-LPD_CONF_PATH="/usr/local/etc/lpd/lpd.conf"
-PRINTCAP_PATH="/usr/local/etc/printcap"
-SYSCONFDIR=/usr/local/etc
-SBINDIR=/usr/local/sbin
-FILTER_DIR=/usr/local/libexec/filters
-LOCKFILE="/var/run/lpd"
-CONFIG_SUBDIR=lpd
-PSHOWALL="-ax"
-VERSION=3.8.23
-INIT=
-MANDIR=/usr/local/man
-#
-# -- START --
-# postinstall.freebsd.sh,v 1.1 2001/08/21 20:33:16 root Exp
-#
-# If you are building a PORT, see the
-# DISTRIBUTIONS/Freebsd directory for a complete port
-# building package.
-#
-# This is the shell script that does the postinstall
-# dynamic fixup
-# 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
-# in place. You need to do this during the postinstall
-# step in the package installation.
-#
-echo RUNNING postinstall.freebsd.sh parms "'$0 $@'" MAKEPACKAGE="$MAKEPACKAGE" MAKEINSTALL="$MAKEINSTALL" PREFIX="$PREFIX" INIT="$INIT" cwd `pwd`
-if [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
-
-fix () {
- v=`echo $1 | sed -e 's/[:;].*//'`;
- p=`echo $2 | sed -e 's/:.*//'`; d=`dirname $p`;
- if expr "$p" : "\|" >/dev/null ; then
- echo "$v is a filter '$p'"
- return 0
- fi
- echo "Putting $p in $d, using $v.sample"
- if [ ! -d "$d" ] ; then
- echo "Directory $d does not exist!"
- mkdir -p $d
- fi
- old_version=` echo $p | sed -e "s,/$CONFIG_SUBDIR/,/,"`
- if [ ! -f "$p" -a "$old_version" != "$p" -a -f "$old_version" ] ; then
- echo "WARNING: Location of $p changed from $old_version"
- echo " Copying $old_version to $p"
- cp "$old_version" "$p" || echo "cannot copy $old_version to $p"
- fi
- if [ -f $v.sample ] ; then
- if [ $v.sample != $p.sample ] ; then ${INSTALL} $v.sample $p.sample; fi
- elif [ -f $v ] ; then
- if [ $v != $p.sample ] ; then ${INSTALL} $v $p.sample; fi
- else
- echo "Do not have $v.sample or $v"
- fi
- if [ ! -f $p.sample ] ; then
- echo "Do not have $p.sample"
- elif [ ! -f $p ] ; then
- ${INSTALL} -m 644 $p.sample $p;
- fi;
-}
-
-startserver(){
- cnf=${DESTDIR}/etc/rc.conf
- if [ -f ${cnf} ] ; then
- if grep lprng ${cnf} ; then
- : # no changes
- else
- echo 'lprng_enable="YES"' >> ${cnf}
- fi
- fi
- echo "Stopping LPD"
- killall lpd || true
- sleep 2;
- # check the printcap information
- echo "Checking Printcap Info and fixing permissions"
- ${SBINDIR}/checkpc -f || true
- # restart the server
- echo "Restarting server"
- sh $init start || true
- echo "Done"
-}
-
-# we use the /usr/local/etc/rc.d method to start
-init=${DESTDIR}/usr/local/etc/rc.d/lprng.sh
-
-# we have to take them from one place and put in another
-if [ "X$MAKEPACKAGE" = "XYES" ] ; then
- hold=${DESTDIR}${SYSCONFDIR}/lpd
- echo "Setting up configuration files path for package" ${hold}
- # we put files into the destination
- if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
- ${INSTALL} lpd.perms ${hold}/lpd.perms.sample
- ${INSTALL} lpd.conf ${hold}/lpd.conf.sample
- ${INSTALL} printcap ${hold}/printcap.sample
- ${INSTALL} init.freebsd ${hold}/lprng.sh.sample
- exit 0
-fi
-
-if [ "X$MAKEINSTALL" = XYES ] ; then
- hold=${DESTDIR}${SYSCONFDIR}/lpd
- echo "Setting up configuration files path for installation" ${hold}
- # we have the port pre-install operation
- if [ "$MANDIR" = "/usr/man" -a ! -d ${DESTDIR}/usr/man ] ; then
- # we have the dreaded standard installation
- # try to make a symbolic link to
- echo "Creating symbolic link from /usr/man to /usr/share/man"
- v=`ln -s ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man`;
- fi
- if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
- ${INSTALL} lpd.perms ${hold}/lpd.perms.sample
- ${INSTALL} lpd.conf ${hold}/lpd.conf.sample
- ${INSTALL} printcap ${hold}/printcap.sample
- ${INSTALL} init.freebsd ${hold}/lprng.sh.sample
-
- fix ${hold}/lpd.perms "${DESTDIR}${LPD_PERMS_PATH}"
- fix ${hold}/lpd.conf "${DESTDIR}${LPD_CONF_PATH}"
- fix ${hold}/printcap "${DESTDIR}${PRINTCAP_PATH}"
- if [ "$INIT" != no ] ; then
- echo "Setting up init script $init using init.freebsd"
- if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
- rm -f $init
- ${INSTALL} -m 755 init.freebsd $init
- #startserver;
- fi
-
- exit 0
-fi
-
-# run from a package
-if [ "X$2" = "XPOST-INSTALL" ] ; then
- # when doing an install from a package we get the file from the hold locations
- hold=etc/lpd
- echo "Installing configuration files from `pwd` - $hold - `ls $hold`"
- if [ -f ${hold}/lpd.perms.sample ] ; then
- fix ${hold}/lpd.perms "${LPD_PERMS_PATH}"
- fix ${hold}/lpd.conf "${LPD_CONF_PATH}"
- fix ${hold}/printcap "${PRINTCAP_PATH}"
- echo "Setting up init script $init.sample using ${hold}/lprng.sh.sample"
- ${INSTALL} -c -m 755 ${hold}/lprng.sh.sample $init.sample;
- if [ "$INIT" != no ] ; then
- echo "Setting up init script $init using $init.sample"
- ${INSTALL} -c -m 755 $init.sample $init;
- #startserver;
- fi
- else
- echo "WARNING: configuration files missing from package! CWD " `pwd`
- echo "Contents"
- ls
- echo "Hold $hold"
- ls $hold
- exit 1
- fi
- exit 0;
-fi
-if [ "X$2" = "XPRE-INSTALL" ] ; then
- # we have the port pre-install operation
- if [ "$MANDIR" = "/usr/man" -a ! -d /usr/man ] ; then
- # we have the dreaded standard installation
- # try to make a symbolic link to
- echo "Creating symbolic link from /usr/man to /usr/share/man"
- v=`ln -s /usr/share/man /usr/man`;
- fi
- exit 0
-fi
-exit 0
diff --git a/sysutils/LPRng/pkg-plist b/sysutils/LPRng/pkg-plist
index b47fa6e87147..a53362fcb891 100644
--- a/sysutils/LPRng/pkg-plist
+++ b/sysutils/LPRng/pkg-plist
@@ -4,14 +4,7 @@ bin/lpq
bin/lpr
bin/lprm
bin/lpstat
-etc/lpd.conf
-etc/lpd.conf.sample
-etc/lpd.perms
-etc/lpd.perms.sample
-etc/lpd/lpd.conf.sample
-etc/lpd/lpd.perms.sample
-etc/lpd/lprng.sh.sample
-etc/lpd/printcap.sample
+etc/rc.d/lprng.sh
lib/liblpr.a
libexec/filters/lpbanner
libexec/filters/lpf
@@ -61,8 +54,13 @@ sbin/lprng_index_certs
%%PORTDOCS%%%%DOCSDIR%%/license.txt
%%PORTDOCS%%%%DOCSDIR%%/rfc1179.txt
%%PORTDOCS%%%%DOCSDIR%%/y2k.txt
-@dirrm %%PORTDOCS%%%%DOCSDIR%%/Reference
-@dirrm %%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook
-@dirrm %%PORTDOCS%%%%DOCSDIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/Reference
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/PrintingCookbook
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm libexec/filters
-@dirrm etc/lpd
+%%CWD%%@cwd /
+%%SYSCONFDIR%%/lpd.conf.sample
+%%SYSCONFDIR%%/lpd.perms.sample
+%%SYSCONFDIR%%/printcap.sample
+%%CWD%%@unexec rmdir %D/etc/rc.d 2> /dev/null || true
+%%CWD%%@unexec rmdir %D/etc 2> /dev/null || true