Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --- pkgsrc/mail/nmh/Makefile 2001/02/17 18:24:57 1.39 +++ pkgsrc/mail/nmh/Makefile 2005/03/24 21:12:56 1.56 @@ -1,17 +1,17 @@ -# $NetBSD: Makefile,v 1.39 2001/02/17 18:24:57 wiz Exp $ -# FreeBSD Id: Makefile,v 1.2 1997/08/04 06:51:28 markm Exp -# +# $NetBSD: Makefile,v 1.56 2005/03/24 21:12:56 wiz Exp $ DISTNAME= nmh-1.0.4 +PKGREVISION= 6 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/ +HOMEPAGE= http://www.nongnu.org/nmh/ COMMENT= Cleaned up MH mailer suite -CONFLICTS= ja-mh-* +CONFLICTS= ja-mh-[0-9]* +CONFLICTS+= ja-mh6-[0-9]* # We choose DOT_LOCKING in our patches because ".lock" files are # the most common locking mechanism supported by mail software. @@ -25,8 +25,10 @@ CONFLICTS= ja-mh-* 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} @@ -38,21 +40,53 @@ CONFIGURE_ARGS+= --with-editor=${NMH_EDI CONFIGURE_ARGS+= --with-pager=${NMH_PAGER} .endif -.if defined(KERBEROS) && ${KERBEROS} == 4 -USE_KERBEROS= # defined +.if defined(KERBEROS) +PKG_USE_KERBEROS= # defined +.if ${OPSYS} == "NetBSD" +LIBS= -lroken -lcrypt -lcom_err +.endif CONFIGURE_ARGS+= --with-krb4 .else 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 -# Since we patch the autoconf files as well as their outputs, avoid attempt -# to regenerate header input files with 'autoheader' by Makefile. -post-patch: - ${TOUCH} ${WRKSRC}/stamp-h.in +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: @@ -61,21 +95,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}; \ + ${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"