summaryrefslogtreecommitdiff
path: root/mail/nmh
diff options
context:
space:
mode:
authorjlam <jlam>2000-08-02 06:35:43 +0000
committerjlam <jlam>2000-08-02 06:35:43 +0000
commit5f0b14e44f74537fafd80d996d251b0092456c3a (patch)
tree1550e0b67910e803764e4003078514d2a834e4de /mail/nmh
parente86f1e54a35fc7e7aa44c4bd6abe94a2133afd2b (diff)
downloadpkgsrc-5f0b14e44f74537fafd80d996d251b0092456c3a.tar.gz
Factor out common post-install code in Makefile and pkg/PLIST into (an
already existing) pkg/INSTALL. Note that ${PREFIX}/etc/nmh can be removed in pkg/DEINSTALL. Make some cosmetic changes to Makefile.
Diffstat (limited to 'mail/nmh')
-rw-r--r--mail/nmh/Makefile61
-rw-r--r--mail/nmh/pkg/DEINSTALL28
-rw-r--r--mail/nmh/pkg/INSTALL35
-rw-r--r--mail/nmh/pkg/PLIST4
4 files changed, 84 insertions, 44 deletions
diff --git a/mail/nmh/Makefile b/mail/nmh/Makefile
index f3e1a2ad45c..e08dd18858c 100644
--- a/mail/nmh/Makefile
+++ b/mail/nmh/Makefile
@@ -1,16 +1,16 @@
-# $NetBSD: Makefile,v 1.37 2000/04/15 07:56:15 simonb Exp $
+# $NetBSD: Makefile,v 1.38 2000/08/02 06:35:43 jlam Exp $
# FreeBSD Id: Makefile,v 1.2 1997/08/04 06:51:28 markm Exp
#
-DISTNAME= nmh-1.0.4
-CATEGORIES= mail
-MASTER_SITES= ftp://ftp.mhost.com/pub/nmh/ \
- ftp://ftp.gw.com/pub/unix/mail/mh/nmh/
+DISTNAME= nmh-1.0.4
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.mhost.com/pub/nmh/ \
+ ftp://ftp.gw.com/pub/unix/mail/mh/nmh/
-MAINTAINER= kim@tac.nyc.ny.us
-HOMEPAGE= http://www.mhost.com/nmh/
+MAINTAINER= kim@tac.nyc.ny.us
+HOMEPAGE= http://www.mhost.com/nmh/
-CONFLICTS= ja-mh-*
+CONFLICTS= ja-mh-*
# We choose DOT_LOCKING in our patches because ".lock" files are
# the most common locking mechanism supported by mail software.
@@ -21,33 +21,32 @@ CONFLICTS= ja-mh-*
.include "../../mk/bsd.prefs.mk"
# Mail Transport Agent - either "smtp" or "sendmail"
-NMH_MTA?= smtp
+NMH_MTA?= smtp
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= \
- --libdir=${PREFIX}/libexec/nmh \
- --sysconfdir=${PREFIX}/etc/nmh \
- --enable-nmh-pop \
- --with-mts=${NMH_MTA}
+GNU_CONFIGURE= # defined
+CONFIGURE_ARGS+= --libdir=${PREFIX}/libexec/nmh
+CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/nmh
+CONFIGURE_ARGS+= --enable-nmh-pop
+CONFIGURE_ARGS+= --with-mts=${NMH_MTA}
.ifdef NMH_EDITOR
-CONFIGURE_ARGS+=--with-editor=${NMH_EDITOR}
+CONFIGURE_ARGS+= --with-editor=${NMH_EDITOR}
.endif
.ifdef NMH_PAGER
-CONFIGURE_ARGS+=--with-pager=${NMH_PAGER}
+CONFIGURE_ARGS+= --with-pager=${NMH_PAGER}
.endif
.if defined(KERBEROS) && ${KERBEROS} == 4
-USE_KERBEROS= yes
-CONFIGURE_ARGS+=--with-krb4=yes
+USE_KERBEROS= # defined
+CONFIGURE_ARGS+= --with-krb4
.else
-CONFIGURE_ARGS+=--with-krb4=no
+CONFIGURE_ARGS+= --without-krb4
.endif
-DOCDIR= share/doc/nmh
+DOCDIR= share/doc/nmh
-BUILD_DEFS+= NMH_MTA NMH_EDITOR NMH_PAGER NMH_HASH_BACKUP
+BUILD_DEFS+= NMH_MTA NMH_EDITOR NMH_PAGER NMH_HASH_BACKUP
# Since we patch the autoconf files as well as their outputs, avoid attempt
# to regenerate header input files with 'autoheader' by Makefile.
@@ -71,21 +70,11 @@ post-configure:
# upgrading the package
post-install:
- @${INSTALL_DATA_DIR} ${PREFIX}/${DOCDIR}
- @for f in `${GREP} '^${DOCDIR}/' ${PKGDIR}/PLIST`; do \
+ ${INSTALL_DATA_DIR} ${PREFIX}/${DOCDIR}
+ for f in `${GREP} '^${DOCDIR}/' ${PKGDIR}/PLIST`; do \
${INSTALL_DATA} ${WRKSRC}/`basename $$f` ${PREFIX}/${DOCDIR}; \
done
- @${INSTALL_DATA} ${FILESDIR}/mhn.defaults.dist ${PREFIX}/etc/nmh
- @if [ ! -f ${PREFIX}/etc/nmh/mhn.defaults ]; then \
- ${CP} -p \
- ${PREFIX}/etc/nmh/mhn.defaults.dist \
- ${PREFIX}/etc/nmh/mhn.defaults; \
- fi
- @if [ ! -f ${PREFIX}/etc/nmh/mts.conf ]; then \
- ${CP} -p \
- ${PREFIX}/etc/nmh/mts.conf.dist \
- ${PREFIX}/etc/nmh/mts.conf; \
- fi
- @PKG_PREFIX='${PREFIX}' ${SH} -f ${PKGDIR}/INSTALL
+ ${INSTALL_DATA} ${FILESDIR}/mhn.defaults.dist ${PREFIX}/etc/nmh
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/nmh/pkg/DEINSTALL b/mail/nmh/pkg/DEINSTALL
new file mode 100644
index 00000000000..645cd2e77e6
--- /dev/null
+++ b/mail/nmh/pkg/DEINSTALL
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2000/08/02 06:35:44 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+case ${STAGE} in
+DEINSTALL)
+ ;;
+POST-DEINSTALL)
+ CONFDIR=${PKG_PREFIX}/etc/nmh
+
+ cat << EOF
+===========================================================================
+If you won't be using ${PKGNAME} any longer, you may want to remove the
+following directories:
+
+ ${CONFDIR}
+===========================================================================
+EOF
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/mail/nmh/pkg/INSTALL b/mail/nmh/pkg/INSTALL
index 682cbe87b64..db12158b965 100644
--- a/mail/nmh/pkg/INSTALL
+++ b/mail/nmh/pkg/INSTALL
@@ -1,10 +1,32 @@
#! /bin/sh
#
-# $NetBSD: INSTALL,v 1.5 2000/03/02 05:11:45 kim Exp $
+# $NetBSD: INSTALL,v 1.6 2000/08/02 06:35:45 jlam Exp $
#
-case "$2" in
- ""|POST-INSTALL) cat <<EOF
+PKGNAME=$1
+STAGE=$2
+
+case ${STAGE} in
+PRE-INSTALL)
+ ;;
+POST-INSTALL)
+ CONFDIR=${PKG_PREFIX}/etc/nmh
+
+ echo "Installing configuration files:"
+ for file in \
+ mhn.defaults \
+ mts.conf
+ do
+ if [ -f ${CONFDIR}/${file} ]
+ then
+ echo " ${CONFDIR}/${file} already exists"
+ else
+ echo " ${CONFDIR}/${file}"
+ cp ${CONFDIR}/${file}.dist ${CONFDIR}/${file}
+ chmod 644 ${CONFDIR}/${file}
+ fi
+ done
+ cat << EOF
=============================================================
Some files you might need to customize include the following:
@@ -14,7 +36,10 @@ Some files you might need to customize include the following:
=============================================================
EOF
- ;;
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
esac
-
exit 0
diff --git a/mail/nmh/pkg/PLIST b/mail/nmh/pkg/PLIST
index d0763af63b9..3517b2ea8ce 100644
--- a/mail/nmh/pkg/PLIST
+++ b/mail/nmh/pkg/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.15 2000/04/15 07:56:16 simonb Exp $
+@comment $NetBSD: PLIST,v 1.16 2000/08/02 06:35:45 jlam Exp $
bin/ali
bin/anno
bin/burst
@@ -148,6 +148,4 @@ share/doc/nmh/README
share/doc/nmh/TODO
@dirrm libexec/nmh
@dirrm share/doc/nmh
-@exec if [ ! -f %D/etc/nmh/mhn.defaults ]; then cp -p %D/etc/nmh/mhn.defaults.dist %D/etc/nmh/mhn.defaults; fi
-@exec if [ ! -f %D/etc/nmh/mts.conf ]; then cp -p %D/etc/nmh/mts.conf.dist %D/etc/nmh/mts.conf; fi
@unexec rmdir %D/etc/nmh 2>/dev/null || true