diff options
Diffstat (limited to 'mail/nmh/Makefile')
-rw-r--r-- | mail/nmh/Makefile | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/mail/nmh/Makefile b/mail/nmh/Makefile index 17e04320f4b..70a241cffe0 100644 --- a/mail/nmh/Makefile +++ b/mail/nmh/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2000/03/02 00:23:14 hubertf Exp $ +# $NetBSD: Makefile,v 1.34 2000/03/02 05:11:42 kim Exp $ # FreeBSD Id: Makefile,v 1.2 1997/08/04 06:51:28 markm Exp # @@ -60,12 +60,31 @@ post-configure: < ${WRKSRC}/config.h.bak > ${WRKSRC}/config.h .endif +# ABOUT CONFIGURATION FILES: +# - mhn.defaults is generated by nmh during make; we don't use that +# copy because its contents depend on what happened to be installed +# on the build system; we want a reliably reconstructable package +# - mhn.defaults and mts.conf are only created if they don't exist; +# the PLIST only has mhn.defaults.dist and mts.conf.dist, so that +# local modifications to the configuration files won't get lost on +# upgrading the package + post-install: @${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 ${PREFIX}/etc/nmh + @${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 .include "../../mk/bsd.pkg.mk" |