aboutsummaryrefslogtreecommitdiff
path: root/mail/postfix-current/Makefile
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2015-05-10 15:24:31 +0000
committerOlli Hauer <ohauer@FreeBSD.org>2015-05-10 15:24:31 +0000
commitf11c883807c98d92d0ff749a58d14fdb6bbd51c4 (patch)
tree935bcdcd4d5a86787125ef1dc92a1ee8d16b0b5e /mail/postfix-current/Makefile
parent6efaeef862f6b5e49c3c33084ce0ea7b4a966c1d (diff)
downloadports-f11c883807c98d92d0ff749a58d14fdb6bbd51c4.tar.gz
ports-f11c883807c98d92d0ff749a58d14fdb6bbd51c4.zip
- update to version 3.0.1
- rename OPTIONS to match default name of most ports - SASL2 -> SASL - OPENLDAP -> LDAP - install main.cf and master.cf with the @sample macro - rework pkg-install - fix wrong permission for /var/db/postfix [1] - sets WANT_OPENLDAP_SASL option for openldap port when postfix LDAP_SASL option is set [2] - make usage of new ${opt}_DEPENDS notation Release 3.0.1 or 3.0.2 is now a strong candidate to become the new default mail/postfix port (missing components are VDA and SPF). Changelog: 20150211 Cleanup: strncasecmp_utf8() streamlining. Files: util/stringops.h, util/allascii.c, util/strcasecmp_utf8.c. 20150214 Bugfix (introduced: Postfix 3.0): missing #ifdef USE_TLS inside #ifdef USE_SASL_AUTH. Viktor Dukhovni. File: smtpd/smtpd.c. 20150217 Cleanup: missing <string.h> include. File: util/allascii.c. 20150221 Bugfix (introduced: Postfix 3.0): don't append '.' to the DNS resource record value, when converting TXT records to the string form that is used used by xxx_dns_reply_filter. File: dns/dns_strrecord.c. 20150313 Documentation: incorrect Postfix version number for postscreen_dnsbl_timeout. Quanah Gibson-Mount. File: postscreen/postscreen.c. 20150324 Bugfix (introduced: Postfix 2.6): sender_dependent_relayhost_maps ignored the relayhost setting in the case of a DUNNO lookup result. It would use the recipient domain instead. Viktor Dukhovni. Wietse took the pieces of code that enforce the precedence of a sender-dependent relayhost, the global relayhost, and the recipient domain, and put that code together in once place so that it is easier to maintain. File: trivial-rewrite/resolve.c. 20150328 Bugfix (introduced: Postfix 1.1.0): post-install expanded macros in parameter values when trying to detect parameter overrides, causing unnecessary main.cf updates during Postfix start-up. Julian Reich, Viktor Dukhovni, and Wietse. File: conf/post-install. 20150330 Bitrot: prepare for future changes in OpenSSL API. Viktor Dukhovni. File: tls_dane.c. PR: 198215 [1] PR: 198857 [2]
Notes
Notes: svn path=/head/; revision=385964
Diffstat (limited to 'mail/postfix-current/Makefile')
-rw-r--r--mail/postfix-current/Makefile113
1 files changed, 67 insertions, 46 deletions
diff --git a/mail/postfix-current/Makefile b/mail/postfix-current/Makefile
index 0b437a9bdf90..31a3cecb4043 100644
--- a/mail/postfix-current/Makefile
+++ b/mail/postfix-current/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= postfix
-DISTVERSION= 3.0-20150208
+DISTVERSION= 3.0-20150410
PORTEPOCH= 4
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/ \
@@ -14,7 +14,7 @@ MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/ \
#MASTER_SITES:= ${MASTER_SITES:S|$|experimental/|}
MASTER_SITES:= ${MASTER_SITES:S|$|official/|}
PKGNAMESUFFIX= -current
-DISTNAME= ${PORTNAME}-3.0.0
+DISTNAME= ${PORTNAME}-3.0.1
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= ohauer@FreeBSD.org
@@ -26,7 +26,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
CONFLICTS_INSTALL?= courier-0.* opensmtpd-[0-9]* \
- postfix-2.* postfix-base-2.* postfix2[789]-* \
+ postfix-2.* postfix-base-2.* \
postfix21?-* postfix-tls-* \
sendmail-8.* sendmail+*-8.* smail-3.* zmailer-2.*
@@ -41,37 +41,44 @@ USE_PERL5= build
SCRIPTS_ENV+= POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}"
OPTIONS_SUB= yes
-OPTIONS_DEFINE= BDB CDB DOCS EAI INST_BASE LDAP_SASL LMDB MYSQL NIS \
- OPENLDAP PCRE PGSQL SASL2 SPF SQLITE TEST TLS VDA
+OPTIONS_DEFINE= BDB CDB DOCS EAI INST_BASE LDAP LDAP_SASL LMDB MYSQL \
+ NIS PCRE PGSQL SASL SPF SQLITE TEST TLS VDA
OPTIONS_RADIO= RG1 RG2
OPTIONS_RADIO_RG1= DOVECOT DOVECOT2
OPTIONS_RADIO_RG2= SASLKRB5 SASLKMIT
OPTIONS_DEFAULT= PCRE TLS
-PCRE_DESC= Perl Compatible Regular Expressions
-EAI_DESC= Email Address Internationalization (EAI, RFC 6531..6533)
-SASL2_DESC= Cyrus SASLv2 (Simple Auth. and Sec. Layer)
-DOVECOT_DESC= Dovecot 1.x SASL authentication method
-DOVECOT2_DESC= Dovecot 2.x SASL authentication method
-SASLKRB5_DESC= If your SASL req. Kerberos5, select this
-SASLKMIT_DESC= If your SASL req. MIT Kerberos5, select this
-TLS_DESC= SSL and TLS support
-BDB_DESC= Berkeley DB (uses WITH_BDB_VER)
-MYSQL_DESC= MySQL maps (uses WITH_MYSQL_VER)
-PGSQL_DESC= PostgreSQL maps (uses DEFAULT_PGSQL_VER)
-SQLITE_DESC= SQLite maps
-OPENLDAP_DESC= OpenLDAP maps (uses WITH_OPENLDAP_VER)
-LDAP_SASL_DESC= OpenLDAP client-to-server SASL auth
+BDB_USE= BDB=yes
+CDB_LIB_DEPENDS= libcdb.so:${PORTSDIR}/databases/tinycdb
+EAI_LIB_DEPENDS= libicuuc.so:${PORTSDIR}/devel/icu
+LDAP_USE= OPENLDAP=yes
+LMDB_LIB_DEPENDS= liblmdb.so:${PORTSDIR}/databases/lmdb
+MYSQL_USE= MYSQL=yes
+PCRE_LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
+PGSQL_USES= pgsql
+SASLKMIT_LIB_DEPENDS= libkrb5.so:${PORTSDIR}/security/krb5
+SASL_LIB_DEPENDS= libsasl2.so:${PORTSDIR}/security/cyrus-sasl2
+SPF_LIB_DEPENDS= libspf2.so:${PORTSDIR}/mail/libspf2
+SQLITE_USE= SQLITE=yes
+TLS_USE= OPENSSL=yes
+
CDB_DESC= CDB maps lookups
-NIS_DESC= NIS maps lookups
-VDA_DESC= VDA (Virtual Delivery Agent 32Bit)
-TEST_DESC= SMTP/LMTP test server and generator
-SPF_DESC= SPF support (via libspf2 1.2.x)
+EAI_DESC= Email Address Internationalization (EAI, RFC 6531..6533)
INST_BASE_DESC= Install into /usr and /etc/postfix
+LDAP_DESC= LDAP maps (uses WITH_OPENLDAP_VER)
+LDAP_SASL_DESC= LDAP client-to-server SASL auth
LMDB_DESC= LMDB maps
+SPF_DESC= SPF support (via libspf2 1.2.x)
+TEST_DESC= SMTP/LMTP test server and generator
+VDA_DESC= VDA (Virtual Delivery Agent 32Bit)
+
RG1_DESC= Dovecot SASL authentication methods
+DOVECOT_DESC= Dovecot 1.x SASL authentication method
+DOVECOT2_DESC= Dovecot 2.x SASL authentication method
RG2_DESC= Kerberos network authentication protocol type
+SASLKRB5_DESC= If your SASL req. Kerberos5, select this
+SASLKMIT_DESC= If your SASL req. MIT Kerberos5, select this
.include <bsd.port.options.mk>
@@ -146,7 +153,6 @@ POSTFIX_CCARGS+= -DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \
_REQUIRE= LOGIN cleanvar
.if ${PORT_OPTIONS:MEAI}
-LIB_DEPENDS+= libicuuc.so:${PORTSDIR}/devel/icu
POSTFIX_CCARGS+= -DHAS_EAI -I${LOCALBASE}/include
POSTFIX_AUXLIBS+= -L${LOCALBASE}/lib -licuuc
.else
@@ -154,15 +160,14 @@ POSTFIX_CCARGS+= -DNO_EAI
.endif
.if ${PORT_OPTIONS:MPCRE}
-LIB_DEPENDS+= libpcre.so:${PORTSDIR}/devel/pcre
+DYN_EXT+= pcre
POSTFIX_CCARGS+= -DHAS_PCRE -I${LOCALBASE}/include
POSTFIX_DYN_AUXLIBS+= "AUXLIBS_PCRE=`${LOCALBASE}/bin/pcre-config --libs`"
.else
POSTFIX_CCARGS+= -DNO_PCRE
.endif
-.if ${PORT_OPTIONS:MSASL2}
-LIB_DEPENDS+= libsasl2.so:${PORTSDIR}/security/cyrus-sasl2
+.if ${PORT_OPTIONS:MSASL}
POSTFIX_CCARGS+= -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${LOCALBASE}/include -I${LOCALBASE}/include/sasl
POSTFIX_AUXLIBS+= -L${LOCALBASE}/lib -lsasl2 -lpam -lcrypt
.endif
@@ -182,12 +187,10 @@ POSTFIX_AUXLIBS+= -lkrb5 -lhx509 -lcrypto -lcrypt -lcom_err -lasn1 -lroken
.endif
.if ${PORT_OPTIONS:MSASLKMIT}
-LIB_DEPENDS+= libkrb5.so:${PORTSDIR}/security/krb5
POSTFIX_AUXLIBS+= -Wl,--rpath,$${KRB5_HOME:-${LOCALBASE}}/lib -lkrb5 -lcrypto -lcrypt -lcom_err
.endif
.if ${PORT_OPTIONS:MTLS}
-USE_OPENSSL= yes
POSTFIX_CCARGS+= -DUSE_TLS -I${OPENSSLINC}
# XXX LDFLAGS possible breaks dynamic building
POSTFIX_AUXLIBS+= -L${OPENSSLLIB} ${LDFLAGS} -lssl -lcrypto
@@ -197,7 +200,6 @@ POSTFIX_CCARGS+= -DNO_TLS
.if ${PORT_OPTIONS:MSPF}
BROKEN= At the moment, SPF support is unavailable for ${PORTNAME}-${DISTVERSION}
-LIB_DEPENDS+= libspf2.so:${PORTSDIR}/mail/libspf2
PATCH_SITES+= ${MASTER_SITE_LOCAL}
PATCH_SITE_SUBDIR= mm
PATCHFILES+= postfix-2.8.0-libspf2-1.2.x-0.patch.gz
@@ -207,33 +209,32 @@ POSTFIX_AUXLIBS+= -L${LOCALBASE}/lib -lspf2
.endif
.if ${PORT_OPTIONS:MBDB}
-USE_BDB= yes
POSTFIX_CCARGS+= -I${BDB_INCLUDE_DIR}
POSTFIX_AUXLIBS+= -L${BDB_LIB_DIR} -l${BDB_LIB_NAME}
.endif
.if ${PORT_OPTIONS:MMYSQL}
-USE_MYSQL= yes
+DYN_EXT+= mysql
POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
POSTFIX_DYN_AUXLIBS+= "AUXLIBS_MYSQL=-L${LOCALBASE}/lib/mysql -lmysqlclient -lz -lm"
_REQUIRE+= mysql
.endif
.if ${PORT_OPTIONS:MPGSQL}
-USES+= pgsql
+DYN_EXT+= pgsql
POSTFIX_CCARGS+= -DHAS_PGSQL -I${LOCALBASE}/include
POSTFIX_DYN_AUXLIBS+= "AUXLIBS_PGSQL=-L${LOCALBASE}/lib -lpq"
_REQUIRE+= postgresql
.endif
.if ${PORT_OPTIONS:MSQLITE}
-USE_SQLITE= yes
+DYN_EXT+= sqlite
POSTFIX_CCARGS+= -DHAS_SQLITE -I${LOCALBASE}/include
POSTFIX_DYN_AUXLIBS+= "AUXLIBS_SQLITE=-L${LOCALBASE}/lib -lsqlite3 -lpthread"
.endif
-.if ${PORT_OPTIONS:MOPENLDAP}
-USE_OPENLDAP= yes
+.if ${PORT_OPTIONS:MLDAP}
+DYN_EXT+= ldap
. if defined(WITH_OPENLDAP_VER)
WANT_OPENLDAP_VER= ${WITH_OPENLDAP_VER}
. endif
@@ -241,15 +242,16 @@ POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
POSTFIX_DYN_AUXLIBS+= "AUXLIBS_LDAP=-L${LOCALBASE}/lib -lldap -L${LOCALBASE}/lib -llber"
_REQUIRE+= slapd
. if ${PORT_OPTIONS:MLDAP_SASL}
-. if ! ${PORT_OPTIONS:MSASL2}
+. if ! ${PORT_OPTIONS:MSASL}
LIB_DEPENDS+= libsasl2.so:${PORTSDIR}/security/cyrus-sasl2
. endif
+WANT_OPENLDAP_SASL= yes
POSTFIX_CCARGS+= -I${LOCALBASE}/include/sasl -DUSE_LDAP_SASL
. endif
.endif
.if ${PORT_OPTIONS:MCDB}
-LIB_DEPENDS+= libcdb.so:${PORTSDIR}/databases/tinycdb
+DYN_EXT+= cdb
POSTFIX_CCARGS+= -DHAS_CDB -I${LOCALBASE}/include
POSTFIX_DYN_AUXLIBS+= "AUXLIBS_CDB=-L${LOCALBASE}/lib -lcdb"
.endif
@@ -269,7 +271,7 @@ MANTEST= qmqp-sink.1 qmqp-source.1 smtp-sink.1 smtp-source.1
.endif
.if ${PORT_OPTIONS:MLMDB}
-LIB_DEPENDS+= liblmdb.so:${PORTSDIR}/databases/lmdb
+DYN_EXT+= lmdb
POSTFIX_CCARGS+= -DHAS_LMDB -I${LOCALBASE}/include
POSTFIX_DYN_AUXLIBS+= "AUXLIBS_LMDB=-L${LOCALBASE}/lib -llmdb"
.endif
@@ -292,10 +294,10 @@ REINPLACE= s!^PATH=.*!PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PREFIX}/bin:${PREFIX}
s!($config_directory/(access|aliases|canonical|generic|header_checks|relocated|transport|virtual):f:root:-:644:)p1!\1o!;
pre-patch:
-.if ${PORT_OPTIONS:MSASL2} && ! ${PORT_OPTIONS:MMYSQL} && exists(${LOCALBASE}/lib/libsasl2.a)
+.if ${PORT_OPTIONS:MSASL} && ! ${PORT_OPTIONS:MMYSQL} && exists(${LOCALBASE}/lib/libsasl2.a)
@if /usr/bin/nm ${LOCALBASE}/lib/libsasl2.a | ${GREP} -wq "mysql_init"; then \
${ECHO_MSG}; \
- ${ECHO_MSG} "Your SASL2 library it's compiled with MYSQL"; \
+ ${ECHO_MSG} "Your SASL library it's compiled with MYSQL"; \
${ECHO_MSG} "If you use MYSQL in ${PORTNAME} consider CTRL+C and"; \
${ECHO_MSG} "select MYSQL OPTION in config menu."; \
${ECHO_MSG} "# make clean config"; \
@@ -359,8 +361,6 @@ do-install:
readme_directory=${READMEDIR} \
sendmail_path=${PREFIX}/sbin/sendmail )
-# == do not overwrite existing config
- ${RM} ${STAGEDIR}${ETCDIR}/main.cf ${STAGEDIR}${ETCDIR}/master.cf
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${STAGEDIR}${PREFIX}/bin/rmail
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${STAGEDIR}${PREFIX}/bin/qshape
${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 ${STAGEDIR}${MANPREFIX}/man/man1
@@ -369,10 +369,31 @@ do-install:
${INSTALL_MAN} ${MANTEST:S|^|${WRKSRC}/man/man1/|} ${STAGEDIR}${MANPREFIX}/man/man1
.endif
-post-install:
+post-stage:
+# == do not overwrite existing config
+ ${MV} ${STAGEDIR}${ETCDIR}/main.cf ${STAGEDIR}${ETCDIR}/main.cf.sample
+ ${MV} ${STAGEDIR}${ETCDIR}/master.cf ${STAGEDIR}${ETCDIR}/master.cf.sample
+
+# == chop dynamicmaps.cf entries into dedicated .cf files
+# for future sub-packages support
+.for f in ${DYN_EXT}
+# adjust dynamicmaps.cf
+ ${GREP} -e "^#" -e "^${f}" ${STAGEDIR}${META_DIRECTORY}/dynamicmaps.cf \
+ > ${STAGEDIR}${META_DIRECTORY}/dynamicmaps.cf.d/${f}.cf && \
+ ${SED} -i '' -e '/${f}/d' ${STAGEDIR}${META_DIRECTORY}/dynamicmaps.cf
+
+# adjust / generate postfix-files for dynamic modules
+ ${SED} -i '' -e '/postfix-${f}.so/d' ${STAGEDIR}${META_DIRECTORY}/postfix-files && \
+ ${PRINTF} '# Do not edit this file.\
+ \n$$shlib_directory/postfix-${f}.so:f:root:-:755\
+ \n$$meta_directory/postfix-files.d/${f}-files:f:root:-:644\
+ \n$$meta_directory/dynamicmaps.cf.d/${f}.cf:f:root:-:644\n' \
+ > ${STAGEDIR}${META_DIRECTORY}/postfix-files.d/${f}-files
+.endfor
+
# Fix compressed man pages and strip executables
- ${REINPLACE_CMD} -i '' -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${STAGEDIR}${META_DIRECTORY}/postfix-files
- -@${STRIP_CMD} ${STRIP_LIBEXEC:S|^|${STAGEDIR}${PREFIX}/libexec/postfix/|}
+ ${SED} -i '' -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${STAGEDIR}${META_DIRECTORY}/postfix-files
+ -@${STRIP_CMD} ${STRIP_LIBEXEC:S|^|${STAGEDIR}${DAEMONDIR}/|}
-@${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/*
-@${STRIP_CMD} ${STAGEDIR}${SHLIB_DIRECTORY}/*.so