summaryrefslogtreecommitdiff
path: root/mail/nmh/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'mail/nmh/Makefile')
-rw-r--r--mail/nmh/Makefile56
1 files changed, 43 insertions, 13 deletions
diff --git a/mail/nmh/Makefile b/mail/nmh/Makefile
index 0fbaf70f1c1..408d8bfcaed 100644
--- a/mail/nmh/Makefile
+++ b/mail/nmh/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.54 2004/01/02 20:54:17 cjep Exp $
+# $NetBSD: Makefile,v 1.55 2005/01/16 19:19:46 jmmv Exp $
# FreeBSD Id: Makefile,v 1.2 1997/08/04 06:51:28 markm Exp
#
DISTNAME= nmh-1.0.4
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= mail
MASTER_SITES= ftp://ftp.mhost.com/pub/nmh/ \
ftp://ftp.gw.com/pub/unix/mail/mh/nmh/
@@ -27,8 +27,10 @@ CONFLICTS+= ja-mh6-[0-9]*
NMH_MTA?= smtp
GNU_CONFIGURE= # defined
+USE_PKGINSTALL= yes
+
CONFIGURE_ARGS+= --libdir=${PREFIX}/libexec/nmh
-CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/nmh
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --enable-nmh-pop
CONFIGURE_ARGS+= --with-mts=${NMH_MTA}
@@ -51,9 +53,43 @@ CONFIGURE_ARGS+= --without-krb4
.endif
DOCDIR= share/doc/nmh
+EGDIR= ${PREFIX}/share/examples/nmh
BUILD_DEFS+= NMH_MTA NMH_EDITOR NMH_PAGER NMH_HASH_BACKUP
+PKG_SYSCONFSUBDIR= nmh
+CONF_FILES= # empty
+.for f in MailAliases \
+ components \
+ digestcomps \
+ distcomps \
+ forwcomps \
+ mhl.body \
+ mhl.digest \
+ mhl.format \
+ mhl.forward \
+ mhl.headers \
+ mhl.reply \
+ mhn.defaults \
+ mts.conf \
+ rcvdistcomps \
+ rcvdistcomps.outbox \
+ replcomps \
+ replgroupcomps \
+ scan.MMDDYY \
+ scan.YYYYMMDD \
+ scan.default \
+ scan.mailx \
+ scan.nomime \
+ scan.size \
+ scan.time \
+ scan.timely \
+ scan.unseen \
+ tmac.h
+CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
+.endfor
+.undef f
+
.if defined(NMH_HASH_BACKUP) && (${NMH_HASH_BACKUP} == yes)
post-configure:
${MV} ${WRKSRC}/config.h ${WRKSRC}/config.h.bak
@@ -61,21 +97,15 @@ 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
+# This hopefully makes sure the permissions and ownership are right.
+pre-install:
+ ${INSTALL_DATA_DIR} ${EGDIR}
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.dist ${PREFIX}/etc/nmh
- PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+ ${INSTALL_DATA} ${FILESDIR}/mhn.defaults.dist ${EGDIR}/mhn.defaults
.include "../../mk/bsd.pkg.mk"