Convert to use options framework.

This commit is contained in:
jlam 2005-09-22 22:00:41 +00:00
parent 74e2928df6
commit d7c679a9a8
2 changed files with 24 additions and 9 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.56 2005/03/24 21:12:56 wiz Exp $
# $NetBSD: Makefile,v 1.57 2005/09/22 22:00:41 jlam Exp $
DISTNAME= nmh-1.0.4
PKGREVISION= 6
@ -20,11 +20,12 @@ CONFLICTS+= ja-mh6-[0-9]*
# Locks supported by `mail.local' are ".lock" and flock(2).
.include "../../mk/bsd.prefs.mk"
.include "options.mk"
# Mail Transport Agent - either "smtp" or "sendmail"
NMH_MTA?= smtp
GNU_CONFIGURE= # defined
GNU_CONFIGURE= yes
USE_PKGINSTALL= yes
CONFIGURE_ARGS+= --libdir=${PREFIX}/libexec/nmh
@ -88,13 +89,6 @@ 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
${SED} -e 's/^\(#define *BACKUP_PREFIX\) *.*/\1 "#"/' \
< ${WRKSRC}/config.h.bak > ${WRKSRC}/config.h
.endif
# This hopefully makes sure the permissions and ownership are right.
pre-install:
${INSTALL_DATA_DIR} ${EGDIR}

21
mail/nmh/options.mk Normal file
View file

@ -0,0 +1,21 @@
# $NetBSD: options.mk,v 1.1 2005/09/22 22:00:42 jlam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.nmh
PKG_SUPPORTED_OPTIONS= nmh-backup-hash
PKG_OPTIONS_LEGACY_VARS+= NMH_HASH_BACKUP:nmh-backup-hash
.include "../../mk/bsd.options.mk"
###
### Prepend a "#" instead of a "," to the name of a message that is
### "removed" by rmm.
###
.if !empty(PKG_OPTIONS:Mnmh-backup-hash)
post-configure: nmh-hash-backup
nmh-hash-backup:
cd ${WRKSRC}; file=config.h; \
${SED} -e 's/^\(#define *BACKUP_PREFIX\) *.*/\1 "#"/' \
$$file > $$file.new; \
${MV} -f $$file.new $$file
.endif