1 # $NetBSD: Makefile,v 1.36 2000/03/16 13:44:53 wiz Exp $
2 # FreeBSD Id: Makefile,v 1.2 1997/08/04 06:51:28 markm Exp
7 MASTER_SITES= ftp://ftp.mhost.com/pub/nmh/ \
8 ftp://ftp.gw.com/pub/unix/mail/mh/nmh/
10 MAINTAINER= kim@tac.nyc.ny.us
11 HOMEPAGE= http://www.mhost.com/nmh/
15 # We choose DOT_LOCKING in our patches because ".lock" files are
16 # the most common locking mechanism supported by mail software.
17 # It also works well over NFS.
19 # Locks supported by `mail.local' are ".lock" and flock(2).
21 .include "../../mk/bsd.prefs.mk"
23 # Mail Transport Agent - either "smtp" or "sendmail"
28 --libdir=${PREFIX}/libexec/nmh \
29 --sysconfdir=${PREFIX}/etc/nmh \
34 CONFIGURE_ARGS+=--with-editor=${NMH_EDITOR}
38 CONFIGURE_ARGS+=--with-pager=${NMH_PAGER}
41 .if defined(KERBEROS) && ${KERBEROS} == 4
43 CONFIGURE_ARGS+=--with-krb4=yes
45 CONFIGURE_ARGS+=--with-krb4=no
50 BUILD_DEFS+= NMH_MTA NMH_EDITOR NMH_PAGER NMH_HASH_BACKUP
52 # Since we patch the autoconf files as well as their outputs, avoid attempt
53 # to regenerate header input files with 'autoheader' by Makefile.
55 ${TOUCH} ${WRKSRC}/stamp-h.in
57 .if defined(NMH_HASH_BACKUP) && (${NMH_HASH_BACKUP} == yes)
59 ${MV} ${WRKSRC}/config.h ${WRKSRC}/config.h.bak
60 ${SED} -e 's/^\(#define *BACKUP_PREFIX\) *.*/\1 "#"/' \
61 < ${WRKSRC}/config.h.bak > ${WRKSRC}/config.h
64 # ABOUT CONFIGURATION FILES:
65 # - mhn.defaults is generated by nmh during make; we don't use that
66 # copy because its contents depend on what happened to be installed
67 # on the build system; we want a reliably reconstructable package
68 # - mhn.defaults and mts.conf are only created if they don't exist;
69 # the PLIST only has mhn.defaults.dist and mts.conf.dist, so that
70 # local modifications to the configuration files won't get lost on
71 # upgrading the package
74 @${INSTALL_DATA_DIR} ${PREFIX}/${DOCDIR}
75 @for f in `${GREP} '^${DOCDIR}/' ${PKGDIR}/PLIST`; do \
76 ${INSTALL_DATA} ${WRKSRC}/`basename $$f` ${PREFIX}/${DOCDIR}; \
78 @${INSTALL_DATA} ${FILESDIR}/mhn.defaults.dist ${PREFIX}/etc/nmh
79 @if [ ! -f ${PREFIX}/etc/nmh/mhn.defaults ]; then \
81 ${PREFIX}/etc/nmh/mhn.defaults.dist \
82 ${PREFIX}/etc/nmh/mhn.defaults; \
84 @if [ ! -f ${PREFIX}/etc/nmh/mts.conf ]; then \
86 ${PREFIX}/etc/nmh/mts.conf.dist \
87 ${PREFIX}/etc/nmh/mts.conf; \
89 @PKG_PREFIX='${PREFIX}' ${SH} -f ${PKGDIR}/INSTALL
91 .include "../../mk/bsd.pkg.mk"