config files should be installed in /etc/mutt, deal with this correctly.

This commit is contained in:
brad 2000-07-22 23:51:19 +00:00
parent 280e0ec5ec
commit d10da77a34
5 changed files with 109 additions and 11 deletions

View File

@ -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 <bsd.port.mk>

25
mail/mutt/pkg/DEINSTALL Normal file
View File

@ -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

74
mail/mutt/pkg/INSTALL Normal file
View File

@ -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

View File

@ -1,4 +0,0 @@
************************************************************
A sample muttrc and mime.types is available in
${PREFIX}/share/mutt/{Muttrc,mime.types}
************************************************************

View File

@ -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