summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-06-20 07:10:59 +0000
committerjlam <jlam@pkgsrc.org>2001-06-20 07:10:59 +0000
commit4bf4ba50273ff24cc1a910fd5628d3a37342f349 (patch)
tree2f3375f96ae06b58a918abcca0bac7868b65bcf4 /mail
parent34d78e258e9168fcaa25609c97f8458fdf8e2d89 (diff)
downloadpkgsrc-4bf4ba50273ff24cc1a910fd5628d3a37342f349.tar.gz
Move sample Muttrc and mime.types to ${PREFIX}/share/doc/mutt/samples, and
add DEINSTALL/INSTALL scripts to handle copying and removing those files to and from ${PREFIX}/etc.
Diffstat (limited to 'mail')
-rw-r--r--mail/mutt/pkg/DEINSTALL67
-rw-r--r--mail/mutt/pkg/INSTALL57
-rw-r--r--mail/mutt/pkg/PLIST7
3 files changed, 128 insertions, 3 deletions
diff --git a/mail/mutt/pkg/DEINSTALL b/mail/mutt/pkg/DEINSTALL
new file mode 100644
index 00000000000..67b1078e5c7
--- /dev/null
+++ b/mail/mutt/pkg/DEINSTALL
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2001/06/20 07:10:59 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+CAT="@CAT@"
+RM="@RM@"
+
+SAMPLECONFDIR=${PKG_PREFIX}/share/doc/mutt/samples
+CONFDIR=${PKG_PREFIX}/etc
+CONFFILES="Muttrc"
+NONCONFFILES="mime.types"
+
+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}
+ 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
+ ${CAT} << EOF
+===========================================================================
+EOF
+ fi
+ ;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/mail/mutt/pkg/INSTALL b/mail/mutt/pkg/INSTALL
new file mode 100644
index 00000000000..7c480ee13cf
--- /dev/null
+++ b/mail/mutt/pkg/INSTALL
@@ -0,0 +1,57 @@
+#! /bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2001/06/20 07:10:59 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+CAT="@CAT@"
+CHMOD="@CHMOD@"
+CP="@CP@"
+
+SAMPLECONFDIR=${PKG_PREFIX}/share/doc/mutt/samples
+CONFDIR=${PKG_PREFIX}/etc
+CONFFILES="Muttrc"
+NONCONFFILES="mime.types"
+
+case ${STAGE} in
+PRE-INSTALL)
+ ;;
+
+POST-INSTALL)
+ echo "Installing configuration files:"
+ for file in ${CONFFILES} ${NONCONFFILES}
+ 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/mail/mutt/pkg/PLIST b/mail/mutt/pkg/PLIST
index f4471bae96b..111c7bb0912 100644
--- a/mail/mutt/pkg/PLIST
+++ b/mail/mutt/pkg/PLIST
@@ -1,10 +1,8 @@
-@comment $NetBSD: PLIST,v 1.13 2001/02/26 20:19:46 tron Exp $
+@comment $NetBSD: PLIST,v 1.14 2001/06/20 07:10:59 jlam Exp $
bin/mutt
bin/muttbug
bin/pgpewrap
bin/pgpring
-etc/Muttrc
-etc/mime.types
man/man1/mutt.1
man/man1/mutt_dotlock.1
man/man5/muttrc.5
@@ -31,9 +29,11 @@ share/doc/mutt/html/manual-7.html
share/doc/mutt/html/manual.html
share/doc/mutt/manual.txt
share/doc/mutt/samples/Mush.rc
+share/doc/mutt/samples/Muttrc
share/doc/mutt/samples/Pine.rc
share/doc/mutt/samples/Tin.rc
share/doc/mutt/samples/gpg.rc
+share/doc/mutt/samples/mime.types
share/doc/mutt/samples/pgp2.rc
share/doc/mutt/samples/pgp5.rc
share/doc/mutt/samples/pgp6.rc
@@ -59,6 +59,7 @@ ${PKGLOCALEDIR}/locale/sk/LC_MESSAGES/mutt.mo
${PKGLOCALEDIR}/locale/sv/LC_MESSAGES/mutt.mo
${PKGLOCALEDIR}/locale/uk/LC_MESSAGES/mutt.mo
${PKGLOCALEDIR}/locale/zh_TW.Big5/LC_MESSAGES/mutt.mo
+share/mutt/.directory
@dirrm share/mutt
@dirrm share/doc/mutt/samples
@dirrm share/doc/mutt/html