diff options
Diffstat (limited to 'misc/vfu/pkg')
-rw-r--r-- | misc/vfu/pkg/DEINSTALL | 65 | ||||
-rw-r--r-- | misc/vfu/pkg/INSTALL | 56 | ||||
-rw-r--r-- | misc/vfu/pkg/PLIST | 6 |
3 files changed, 124 insertions, 3 deletions
diff --git a/misc/vfu/pkg/DEINSTALL b/misc/vfu/pkg/DEINSTALL new file mode 100644 index 00000000000..7bdba62b8e2 --- /dev/null +++ b/misc/vfu/pkg/DEINSTALL @@ -0,0 +1,65 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1 2001/06/20 05:27:33 jlam Exp $ + +PKGNAME=$1 +STAGE=$2 + +CAT="@CAT@" +RM="@RM@" + +SAMPLECONFDIR=${PKG_PREFIX}/share/examples/vfu +CONFDIR=${PKG_PREFIX}/etc +CONFFILES="vfurc" + +case ${STAGE} in +DEINSTALL) + # Remove configuration files if they don't differ from the default + # config file. + # + for file in ${CONFFILES} + do + FILE=${CONFDIR}/${file} + SAMPLEFILE=${SAMPLECONFDIR}/${file} + if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + then + ${RM} -f ${FILE} + fi + done + ;; + +POST-DEINSTALL) + modified_files='' + for file in ${CONFFILES} + 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 + ;; + +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 diff --git a/misc/vfu/pkg/INSTALL b/misc/vfu/pkg/INSTALL new file mode 100644 index 00000000000..4f429ace98a --- /dev/null +++ b/misc/vfu/pkg/INSTALL @@ -0,0 +1,56 @@ +#! /bin/sh +# +# $NetBSD: INSTALL,v 1.1 2001/06/20 05:27:33 jlam Exp $ + +PKGNAME=$1 +STAGE=$2 + +CAT="@CAT@" +CHMOD="@CHMOD@" +CP="@CP@" + +SAMPLECONFDIR=${PKG_PREFIX}/share/examples/vfu +CONFDIR=${PKG_PREFIX}/etc +CONFFILES="vfurc" + +case ${STAGE} in +PRE-INSTALL) + ;; + +POST-INSTALL) + echo "Installing configuration files:" + for file in ${CONFFILES} + do + FILE=${CONFDIR}/${file} + SAMPLEFILE=${SAMPLECONFDIR}/${file} + 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}/${file} + echo " ${FILE}" + done + ${CAT} << EOF +=========================================================================== +EOF + ;; + +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 diff --git a/misc/vfu/pkg/PLIST b/misc/vfu/pkg/PLIST index a09b0a92988..620582b5abe 100644 --- a/misc/vfu/pkg/PLIST +++ b/misc/vfu/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.6 2000/06/15 20:56:03 hubertf Exp $ +@comment $NetBSD: PLIST,v 1.7 2001/06/20 05:27:33 jlam Exp $ bin/vfu bin/ftparc bin/rx_auto @@ -6,10 +6,10 @@ bin/rx_deb bin/rx_ftp bin/rx_tar bin/rx_zip -share/doc/vfu/vfurc.example -@exec [ -f %D/etc/vfurc ] || /bin/cp -p %D/%F %D/etc/vfurc share/doc/vfu/COPYING share/doc/vfu/INSTALL share/doc/vfu/README share/doc/vfu/VFU.txt +share/examples/vfu/vfurc +@dirrm share/examples/vfu @dirrm share/doc/vfu |