summaryrefslogtreecommitdiff
path: root/mail/postfix
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-07-30 21:05:41 +0000
committerjlam <jlam@pkgsrc.org>2004-07-30 21:05:41 +0000
commit8e4e3ffbc9b941fabe5cdcc2d3055e1d4022d983 (patch)
tree90f33a51019f85b91b5f29838193d07638327f1c /mail/postfix
parent639bbb6920daeb910a770275d112821bcf89483e (diff)
downloadpkgsrc-8e4e3ffbc9b941fabe5cdcc2d3055e1d4022d983.tar.gz
Convert to use bsd.options.mk. The relevant options variable to set
for each package can be determined by invoking: make show-var VARNAME=PKG_OPTIONS_VAR The old options are still supported unless the variable named in PKG_OPTIONS_VAR is set within make(1) (usually via /etc/mk.conf).
Diffstat (limited to 'mail/postfix')
-rw-r--r--mail/postfix/Makefile12
-rw-r--r--mail/postfix/Makefile.options85
2 files changed, 65 insertions, 32 deletions
diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
index 7c0a7d6bc4b..e91b3b70c6c 100644
--- a/mail/postfix/Makefile
+++ b/mail/postfix/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.144 2004/07/29 10:15:38 martti Exp $
+# $NetBSD: Makefile,v 1.145 2004/07/30 21:05:41 jlam Exp $
DISTNAME= postfix-2.1.4
CATEGORIES= mail
@@ -42,9 +42,7 @@ CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\"
CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\"
# Makefile.options appends to CCARGS and AUXLIBS the options needed to
-# build Postfix with support for various add-on modules. It also defines
-# _POSTFIX_OPTIONS, which is POSTFIX_OPTIONS filtered to only contain
-# supported modules.
+# build Postfix with support for various add-on modules.
#
.include "Makefile.options"
@@ -85,7 +83,7 @@ CONF_FILES_PERMS+= ${EXAMPLEDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_} \
${ROOT_USER} ${ROOT_GROUP} 755
.endfor
.undef _file_
-.if !empty(_POSTFIX_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
MAKE_DIRS+= ${SASLLIBDIR}
CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf
.endif
@@ -108,7 +106,7 @@ do-configure:
post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/mailer.conf \
> ${WRKDIR}/mailer.conf
-.if !empty(_POSTFIX_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf
.endif
@@ -121,7 +119,7 @@ do-install:
${INSTALL_DATA_DIR} ${EXAMPLEDIR}
${INSTALL_DATA_DIR} ${DOCDIR}
-${RM} -f ${WRKSRC}/conf/*.orig
-.if !empty(_POSTFIX_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${EXAMPLEDIR}
.endif
@for i in ${POSTFIX_EXAMPLE_FILES}; do \
diff --git a/mail/postfix/Makefile.options b/mail/postfix/Makefile.options
index a871cc437de..b8d626445d2 100644
--- a/mail/postfix/Makefile.options
+++ b/mail/postfix/Makefile.options
@@ -1,29 +1,65 @@
-# $NetBSD: Makefile.options,v 1.4 2004/07/24 22:45:15 recht Exp $
-#
-# POSTFIX_ALL_OPTIONS lists all of the currently-supported optional modules
-# that may be built into Postfix.
+# $NetBSD: Makefile.options,v 1.5 2004/07/30 21:05:41 jlam Exp $
+
+# Global and legacy options
#
-# POSTFIX_OPTIONS is a list of the modules that will be built into Postfix.
+# XXX Support for the following variables will be removed after the
+# XXX pkgsrc-2004Q3 branch is released:
+# XXX
+# XXX POSTFIX_USE_INET6 POSTFIX_USE_TLS
+# XXX POSTFIX_USE_PCRE POSTFIX_USE_MYSQL
+# XXX POSTFIX_USE_PGSQL POSTFIX_USE_VERP
+# XXX POSTFIX_USE_SASL_AUTH POSTFIX_OPTIONS
#
-POSTFIX_ALL_OPTIONS= inet6 ldap mysql mysql4 pcre sasl tls
-POSTFIX_OPTIONS?= # empty
-BUILD_DEFS+= POSTFIX_OPTIONS
-
-_POSTFIX_OPTIONS= # empty
-.for _opt_ in ${POSTFIX_OPTIONS}
-. if empty(_POSTFIX_OPTIONS:M${_opt_})
-. if !empty(POSTFIX_ALL_OPTIONS:M${_opt_})
-_POSTFIX_OPTIONS+= ${_opt_}
-. else
-PKG_FAIL_REASON+= "\"${_opt_}\" is not a supported Postfix build option."
+.if defined(USE_SASL) || defined(USE_SASL2) || defined(USE_OPENLDAP) || \
+ defined(POSTFIX_USE_INET6) || defined(POSTFIX_USE_TLS) || \
+ defined(POSTFIX_USE_PCRE) || defined(POSTFIX_USE_MYSQL) || \
+ defined(POSTFIX_USE_PGSQL) || defined(POSTFIX_USE_VERP) || \
+ defined(POSTFIX_USE_SASL_AUTH)
+. if !defined(PKG_OPTIONS.postfix)
+. if defined(USE_SASL) && !empty(USE_SASL:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= sasl
+. endif
+. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= sasl
+. endif
+. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= ldap
+. endif
+. if defined(POSTFIX_USE_INET6) && !empty(POSTFIX_USE_INET6:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= inet6
+. endif
+. if defined(POSTFIX_USE_TLS) && !empty(POSTFIX_USE_TLS:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= tls
+. endif
+. if defined(POSTFIX_USE_PCRE) && !empty(POSTFIX_USE_PCRE:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= pcre
+. endif
+. if defined(POSTFIX_USE_MYSQL) && !empty(POSTFIX_USE_MYSQL:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= mysql
+. endif
+. if defined(POSTFIX_USE_PGSQL) && !empty(POSTFIX_USE_PGSQL:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= pgsql
+. endif
+. if defined(POSTFIX_USE_VERP) && !empty(POSTFIX_USE_VERP:M[yY][eE][sS])
+PKG_OPTIONS.postfix+= verp
+. endif
+. if defined(POSTFIX_USE_SASL_AUTH) && defined(POSTFIX_USE_SASL_AUTH)
+PKG_OPTIONS.postfix+= sasl
+. endif
+. if defined(POSTFIX_OPTIONS)
+PKG_OPTIONS.postfix= ${POSTFIX_OPTIONS}
. endif
. endif
-.endfor
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.postfix
+PKG_SUPPORTED_OPTIONS= inet6 ldap mysql mysql4 pcre sasl tls
+.include "../../mk/bsd.options.mk"
###
### IPv6 and STARTTLS support (http://www.ipnet6.org/postfix/)
###
-.if !empty(_POSTFIX_OPTIONS:Minet6) || !empty(_POSTFIX_OPTIONS:Mtls)
+.if !empty(PKG_OPTIONS:Minet6) || !empty(PKG_OPTIONS:Mtls)
. include "../../security/openssl/buildlink3.mk"
PATCHFILES+= tls+ipv6-1.25-pf-2.1.3.patch.gz
PATCH_SITES+= ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.25/
@@ -41,7 +77,7 @@ MESSAGE_SRC+= ${PKGDIR}/MESSAGE.tls
###
### Support "pcre" map type for regular expressions.
###
-.if !empty(_POSTFIX_OPTIONS:Mpcre)
+.if !empty(PKG_OPTIONS:Mpcre)
. include "../../devel/pcre/buildlink3.mk"
CCARGS+= -DHAS_PCRE
AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \
@@ -54,7 +90,7 @@ CCARGS+= -DNO_PCRE
###
### Support LDAP directories for table lookups.
###
-.if !empty(_POSTFIX_OPTIONS:Mldap)
+.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CCARGS+= -DHAS_LDAP
AUXLIBS+= -L${BUILDLINK_PREFIX.openldap}/lib \
@@ -72,12 +108,12 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.db4}/lib \
###
### Support using a MySQL database server for table lookups.
###
-.if !empty(_POSTFIX_OPTIONS:Mmysql4)
+.if !empty(PKG_OPTIONS:Mmysql4)
. include "../../databases/mysql4-client/buildlink3.mk"
CCARGS+= -DHAS_MYSQL
CCARGS+= `${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config --include`
AUXLIBS+= `${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config --libs`
-.elif !empty(_POSTFIX_OPTIONS:Mmysql)
+.elif !empty(PKG_OPTIONS:Mmysql)
. include "../../databases/mysql-client/buildlink3.mk"
CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
@@ -88,7 +124,7 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
## ###
## ### Support using a PostgreSQL database server for table lookups.
## ###
-## .if !empty(_POSTFIX_OPTIONS:Mpgsql)
+## .if !empty(PKG_OPTIONS:Mpgsql)
## . include "../../mk/pgsql.buildlink3.mk"
## . include "../../security/openssl/buildlink3.mk"
## PATCHFILES+= postfix-pg.postfix-2.0.0.2.patch
@@ -104,7 +140,7 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
### SASL support for SMTP authentication. If neither SASLv1 or SASLv2 is
### explicitly specified, then build with SASLv2.
###
-.if !empty(_POSTFIX_OPTIONS:Msasl)
+.if !empty(PKG_OPTIONS:Msasl)
. if !defined(USE_SASL2) && !defined(USE_SASL)
. include "../../security/cyrus-sasl2/buildlink3.mk"
SASLLIBDIR= ${PREFIX}/lib/sasl2
@@ -130,7 +166,6 @@ AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl
. endif
-
PLIST_SRC+= ${PKGDIR}/PLIST.sasl
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}