summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorjlam <jlam>2001-06-20 07:46:13 +0000
committerjlam <jlam>2001-06-20 07:46:13 +0000
commit4c1fb097fdbc1e37a956a280d2a38e145210ac61 (patch)
tree2eb48c4205b0fe58730dd9e24e70ed6d4c71e1ad /mail
parent394b16b78496b6cf9bd20cc9c14a4d133f53d3e6 (diff)
downloadpkgsrc-4c1fb097fdbc1e37a956a280d2a38e145210ac61.tar.gz
Move Muttrc and mime.types to ${PREFIX}/share/doc/mutt/samples and add
DEINSTALL/INSTALL files to handle copying and removing them to and from ${PREFIX}/etc.
Diffstat (limited to 'mail')
-rw-r--r--mail/mutt-devel/pkg/DEINSTALL67
-rw-r--r--mail/mutt-devel/pkg/INSTALL57
-rw-r--r--mail/mutt-devel/pkg/PLIST7
3 files changed, 128 insertions, 3 deletions
diff --git a/mail/mutt-devel/pkg/DEINSTALL b/mail/mutt-devel/pkg/DEINSTALL
new file mode 100644
index 00000000000..a19377020bc
--- /dev/null
+++ b/mail/mutt-devel/pkg/DEINSTALL
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2001/06/20 07:46:13 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-devel/pkg/INSTALL b/mail/mutt-devel/pkg/INSTALL
new file mode 100644
index 00000000000..dab39f021d1
--- /dev/null
+++ b/mail/mutt-devel/pkg/INSTALL
@@ -0,0 +1,57 @@
+#! /bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2001/06/20 07:46:13 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-devel/pkg/PLIST b/mail/mutt-devel/pkg/PLIST
index 2e0d690e05c..a0eef23b266 100644
--- a/mail/mutt-devel/pkg/PLIST
+++ b/mail/mutt-devel/pkg/PLIST
@@ -1,11 +1,9 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2001/06/03 06:49:59 tron Exp $
+@comment $NetBSD: PLIST,v 1.2 2001/06/20 07:46:13 jlam Exp $
bin/flea
bin/mutt
bin/muttbug
bin/pgpewrap
bin/pgpring
-etc/Muttrc
-etc/mime.types
man/man1/flea.1
man/man1/mutt.1
man/man1/mutt_dotlock.1
@@ -35,6 +33,7 @@ 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
@@ -56,6 +55,7 @@ share/doc/mutt/samples/iconv/iconv.solaris-2.5.1.rc
share/doc/mutt/samples/iconv/iconv.solaris-2.6-cjk.rc
share/doc/mutt/samples/iconv/iconv.solaris-2.6.rc
share/doc/mutt/samples/iconv/iconv.solaris-2.7.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
@@ -85,6 +85,7 @@ ${PKGLOCALEDIR}/locale/tr/LC_MESSAGES/mutt.mo
${PKGLOCALEDIR}/locale/uk/LC_MESSAGES/mutt.mo
${PKGLOCALEDIR}/locale/zh_CN.GB2312/LC_MESSAGES/mutt.mo
${PKGLOCALEDIR}/locale/zh_TW.Big5/LC_MESSAGES/mutt.mo
+share/mutt/.directory
@dirrm share/mutt
@dirrm share/doc/mutt/samples/iconv
@dirrm share/doc/mutt/samples