From d10da77a340c195640162a251cb81eeee165d6e5 Mon Sep 17 00:00:00 2001 From: brad Date: Sat, 22 Jul 2000 23:51:19 +0000 Subject: [PATCH] config files should be installed in /etc/mutt, deal with this correctly. --- mail/mutt/Makefile | 7 ++-- mail/mutt/pkg/DEINSTALL | 25 ++++++++++++++ mail/mutt/pkg/INSTALL | 74 +++++++++++++++++++++++++++++++++++++++++ mail/mutt/pkg/MESSAGE | 4 --- mail/mutt/pkg/PLIST | 10 +++--- 5 files changed, 109 insertions(+), 11 deletions(-) create mode 100644 mail/mutt/pkg/DEINSTALL create mode 100644 mail/mutt/pkg/INSTALL delete mode 100644 mail/mutt/pkg/MESSAGE diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile index 83d0465146c..0f3eb44ffc6 100644 --- a/mail/mutt/Makefile +++ b/mail/mutt/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.35 2000/07/11 07:15:00 brad Exp $ +# $OpenBSD: Makefile,v 1.36 2000/07/22 23:51:19 brad Exp $ DISTNAME= mutt-1.2.4i CATEGORIES= mail @@ -24,7 +24,7 @@ FLAVORS=slang curses imap pop FLAVOR?=curses CONFIGURE_STYLE= gnu -SYSCONFDIR= ${PREFIX}/share/mutt +SYSCONFDIR= /etc/mutt CONFIGURE_ARGS= --with-sharedir="${PREFIX}/share/mutt" \ --with-docdir="${PREFIX}/share/doc/mutt" \ --enable-external_dotlock @@ -71,5 +71,8 @@ pre-fetch: post-install: @strip ${PREFIX}/bin/mutt + ${INSTALL_DATA_DIR} ${PREFIX}/lib/mutt + ${INSTALL_DATA} ${WRKSRC}/Muttrc ${PREFIX}/lib/mutt/Muttrc.sample + ${INSTALL_DATA} ${WRKSRC}/mime.types ${PREFIX}/lib/mutt/mime.types.sample .include diff --git a/mail/mutt/pkg/DEINSTALL b/mail/mutt/pkg/DEINSTALL new file mode 100644 index 00000000000..25acdbb6092 --- /dev/null +++ b/mail/mutt/pkg/DEINSTALL @@ -0,0 +1,25 @@ +#!/bin/sh +# $OpenBSD: DEINSTALL,v 1.1 2000/07/22 23:51:20 brad Exp $ +# +# mutt de-installation + +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +CONFIG_DIR=/etc/mutt + +if [ -d ${CONFIG_DIR} ]; then + echo + echo "+---------------" + echo "| To completely deinstall the $1 package you need to perform" + echo "| this step as root:" + echo "|" + echo "| rm -rf ${CONFIG_DIR}" + echo "|" + echo "| Do not do this if you plan on re-installing $1" + echo "| at some future time." + echo "+---------------" + echo +fi + +exit 0 diff --git a/mail/mutt/pkg/INSTALL b/mail/mutt/pkg/INSTALL new file mode 100644 index 00000000000..712b707516c --- /dev/null +++ b/mail/mutt/pkg/INSTALL @@ -0,0 +1,74 @@ +#!/bin/sh +# $OpenBSD: INSTALL,v 1.1 2000/07/22 23:51:20 brad Exp $ +# +# Pre/post-installation setup of mutt + +# exit on errors, use a sane path and install prefix +# +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +CONFIG_DIR=/etc/mutt +SAMPLE_CONFIG_DIR=${PREFIX}/lib/mutt + +# Function: tell the user what s/he needs to do to use the port just installed +# +do_notice() +{ + echo + echo "+---------------" + echo "| The existing $1 configuration files in ${CONFIG_DIR}," + echo "| have NOT been changed. You may want to compare them to the" + echo "| current sample files in ${SAMPLE_CONFIG_DIR}," + echo "| and update your configuration as needed." + echo "+---------------" + echo +} + +# Function: install default config files from the samples +# +do_install() +{ + install -d -o root -g wheel -m 755 ${CONFIG_DIR} + install -o root -g wheel -m 644 ${SAMPLE_CONFIG_DIR}/Muttrc.sample ${CONFIG_DIR}/Muttrc + install -o root -g wheel -m 644 ${SAMPLE_CONFIG_DIR}/mime.types.sample ${CONFIG_DIR}/mime.types + echo + echo "+---------------" + echo "| The $1 configuration files have been installed into" + echo "| ${CONFIG_DIR}. Please view these files and change" + echo "| the configuration to meet your needs." + echo "+---------------" + echo +} + +# verify proper execution +# +if [ $# -ne 2 ]; then + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 +fi + +# Verify/process the command +# +case $2 in + PRE-INSTALL) + : nothing to pre-install for this port + ;; + POST-INSTALL) + if [ ! -d $CONFIG_DIR ]; then + do_install $1 + else + if [ ! -f $CONFIG_DIR/Muttrc ]; then + do_install $! + else + do_notice $1 + fi + fi + ;; + *) + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/mail/mutt/pkg/MESSAGE b/mail/mutt/pkg/MESSAGE deleted file mode 100644 index 8292df3dad5..00000000000 --- a/mail/mutt/pkg/MESSAGE +++ /dev/null @@ -1,4 +0,0 @@ -************************************************************ - A sample muttrc and mime.types is available in - ${PREFIX}/share/mutt/{Muttrc,mime.types} -************************************************************ diff --git a/mail/mutt/pkg/PLIST b/mail/mutt/pkg/PLIST index ce19bce5958..fb776e5ca46 100644 --- a/mail/mutt/pkg/PLIST +++ b/mail/mutt/pkg/PLIST @@ -1,9 +1,11 @@ -@comment $OpenBSD: PLIST,v 1.12 2000/07/09 03:14:52 brad Exp $ +@comment $OpenBSD: PLIST,v 1.13 2000/07/22 23:51:20 brad Exp $ bin/mutt bin/mutt_dotlock bin/muttbug bin/pgpewrap bin/pgpring +lib/mutt/Muttrc.sample +lib/mutt/mime.types.sample man/man1/mutt.1 man/man1/mutt_dotlock.1 man/man5/muttrc.5 @@ -20,6 +22,7 @@ share/doc/mutt/README.UPGRADE share/doc/mutt/TODO share/doc/mutt/applying-patches.txt share/doc/mutt/devel-notes.txt +share/doc/mutt/manual.txt share/doc/mutt/html/manual-1.html share/doc/mutt/html/manual-2.html share/doc/mutt/html/manual-3.html @@ -28,7 +31,6 @@ share/doc/mutt/html/manual-5.html share/doc/mutt/html/manual-6.html 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/Pine.rc share/doc/mutt/samples/Tin.rc @@ -58,9 +60,7 @@ share/locale/sk/LC_MESSAGES/mutt.mo share/locale/sv/LC_MESSAGES/mutt.mo share/locale/uk/LC_MESSAGES/mutt.mo share/locale/zh_TW.Big5/LC_MESSAGES/mutt.mo -share/mutt/Muttrc -share/mutt/mime.types -@dirrm share/mutt +@dirrm lib/mutt @dirrm share/doc/mutt/samples @dirrm share/doc/mutt/html @dirrm share/doc/mutt