diff options
-rw-r--r-- | mail/Makefile | 9 | ||||
-rw-r--r-- | mail/postfix-cdb/DESCR | 1 | ||||
-rw-r--r-- | mail/postfix-cdb/Makefile | 18 | ||||
-rw-r--r-- | mail/postfix-ldap/DESCR | 1 | ||||
-rw-r--r-- | mail/postfix-ldap/Makefile | 18 | ||||
-rw-r--r-- | mail/postfix-lmdb/DESCR | 1 | ||||
-rw-r--r-- | mail/postfix-lmdb/Makefile | 18 | ||||
-rw-r--r-- | mail/postfix-mysql/DESCR | 1 | ||||
-rw-r--r-- | mail/postfix-mysql/Makefile | 18 | ||||
-rw-r--r-- | mail/postfix-pcre/DESCR | 1 | ||||
-rw-r--r-- | mail/postfix-pcre/Makefile | 18 | ||||
-rw-r--r-- | mail/postfix-pgsql/DESCR | 1 | ||||
-rw-r--r-- | mail/postfix-pgsql/Makefile | 18 | ||||
-rw-r--r-- | mail/postfix-sqlite/DESCR | 1 | ||||
-rw-r--r-- | mail/postfix-sqlite/Makefile | 18 | ||||
-rw-r--r-- | mail/postfix/Makefile | 121 | ||||
-rw-r--r-- | mail/postfix/Makefile.common | 128 | ||||
-rw-r--r-- | mail/postfix/Makefile.module | 47 | ||||
-rw-r--r-- | mail/postfix/PLIST | 14 | ||||
-rw-r--r-- | mail/postfix/distinfo | 14 | ||||
-rw-r--r-- | mail/postfix/options.mk | 73 | ||||
-rw-r--r-- | mail/postfix/patches/patch-aa | 15 | ||||
-rw-r--r-- | mail/postfix/patches/patch-ag | 16 | ||||
-rw-r--r-- | mail/postfix/patches/patch-ai | 25 |
24 files changed, 373 insertions, 222 deletions
diff --git a/mail/Makefile b/mail/Makefile index 28def5ece9d..34f56e53fe8 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.469 2015/09/03 14:49:40 wiz Exp $ +# $NetBSD: Makefile,v 1.470 2015/09/07 09:47:01 fhajny Exp $ # COMMENT= Electronic mail utilities @@ -261,6 +261,13 @@ SUBDIR+= popa3d SUBDIR+= poppassd SUBDIR+= poppy SUBDIR+= postfix +SUBDIR+= postfix-cdb +SUBDIR+= postfix-ldap +SUBDIR+= postfix-lmdb +SUBDIR+= postfix-mysql +SUBDIR+= postfix-pcre +SUBDIR+= postfix-pgsql +SUBDIR+= postfix-sqlite SUBDIR+= postgrey SUBDIR+= prayer SUBDIR+= procmail diff --git a/mail/postfix-cdb/DESCR b/mail/postfix-cdb/DESCR new file mode 100644 index 00000000000..3a7481da55f --- /dev/null +++ b/mail/postfix-cdb/DESCR @@ -0,0 +1 @@ +Postfix SMTP server cdb backend module diff --git a/mail/postfix-cdb/Makefile b/mail/postfix-cdb/Makefile new file mode 100644 index 00000000000..b0bff84ef56 --- /dev/null +++ b/mail/postfix-cdb/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $ +# + +COMMENT= Postfix SMTP server cdb backend module + +POSTFIX_LIB= cdb +POSTFIX_LIBDIR= src/global +POSTFIX_LIB_DICT= yes +POSTFIX_LIB_MKMAP= yes + +.include "../../mail/postfix/Makefile.module" + +CCARGS+= -I${BUILDLINK_PREFIX.tinycdb}/include +AUXLIBS_MODULE= -L${BUILDLINK_PREFIX.tinycdb}/lib -lcdb \ + ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.tinycdb}/lib + +.include "../../databases/tinycdb/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/postfix-ldap/DESCR b/mail/postfix-ldap/DESCR new file mode 100644 index 00000000000..ff1863bbc95 --- /dev/null +++ b/mail/postfix-ldap/DESCR @@ -0,0 +1 @@ +Postfix SMTP server LDAP backend module diff --git a/mail/postfix-ldap/Makefile b/mail/postfix-ldap/Makefile new file mode 100644 index 00000000000..53ca9f0ffbe --- /dev/null +++ b/mail/postfix-ldap/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $ +# + +COMMENT= Postfix SMTP server LDAP backend module + +POSTFIX_LIB= ldap +POSTFIX_LIBDIR= src/global +POSTFIX_LIB_DICT= yes +POSTFIX_LIB_MKMAP= no + +.include "../../mail/postfix/Makefile.module" + +CCARGS+= -I${BUILDLINK_PREFIX.openldap-client}/include +AUXLIBS_MODULE= -L${BUILDLINK_PREFIX.openldap-client}/lib -lldap -llber \ + ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openldap-client}/lib + +.include "../../databases/openldap-client/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/postfix-lmdb/DESCR b/mail/postfix-lmdb/DESCR new file mode 100644 index 00000000000..2b5b4143411 --- /dev/null +++ b/mail/postfix-lmdb/DESCR @@ -0,0 +1 @@ +Postfix SMTP server LMDB backend module diff --git a/mail/postfix-lmdb/Makefile b/mail/postfix-lmdb/Makefile new file mode 100644 index 00000000000..79daeb06e03 --- /dev/null +++ b/mail/postfix-lmdb/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $ +# + +COMMENT= Postfix SMTP server LMDB backend module + +POSTFIX_LIB= lmdb +POSTFIX_LIBDIR= src/global +POSTFIX_LIB_DICT= yes +POSTFIX_LIB_MKMAP= yes + +.include "../../mail/postfix/Makefile.module" + +CCARGS+= -I${BUILDLINK_PREFIX.lmdb}/include +AUXLIBS_MODULE= -L${BUILDLINK_PREFIX.lmdb}/lib -llmdb \ + ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.}/lib + +.include "../../databases/lmdb/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/postfix-mysql/DESCR b/mail/postfix-mysql/DESCR new file mode 100644 index 00000000000..40e0d6fa4d2 --- /dev/null +++ b/mail/postfix-mysql/DESCR @@ -0,0 +1 @@ +Postfix SMTP server MySQL backend module diff --git a/mail/postfix-mysql/Makefile b/mail/postfix-mysql/Makefile new file mode 100644 index 00000000000..db7998c5930 --- /dev/null +++ b/mail/postfix-mysql/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $ +# + +COMMENT= Postfix SMTP server MySQL backend module + +POSTFIX_LIB= mysql +POSTFIX_LIBDIR= src/global +POSTFIX_LIB_DICT= yes +POSTFIX_LIB_MKMAP= no + +.include "../../mail/postfix/Makefile.module" + +CCARGS+= -I${BUILDLINK_PREFIX.mysql-client}/include +AUXLIBS_MODULE= -L${BUILDLINK_PREFIX.mysql-client}/lib -lmysqlclient \ + ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.}/lib + +.include "../../mk/mysql.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/postfix-pcre/DESCR b/mail/postfix-pcre/DESCR new file mode 100644 index 00000000000..643aed5db85 --- /dev/null +++ b/mail/postfix-pcre/DESCR @@ -0,0 +1 @@ +Postfix SMTP server PCRE map module diff --git a/mail/postfix-pcre/Makefile b/mail/postfix-pcre/Makefile new file mode 100644 index 00000000000..91a2fb7ec98 --- /dev/null +++ b/mail/postfix-pcre/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $ +# + +COMMENT= Postfix SMTP server PCRE map module + +POSTFIX_LIB= pcre +POSTFIX_LIBDIR= src/util +POSTFIX_LIB_DICT= yes +POSTFIX_LIB_MKMAP= no + +.include "../../mail/postfix/Makefile.module" + +CCARGS+= -I${BUILDLINK_PREFIX.pcre}/include +AUXLIBS_MODULE= -L${BUILDLINK_PREFIX.pcre}/lib -lpcre \ + ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.}/lib + +.include "../../devel/pcre/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/postfix-pgsql/DESCR b/mail/postfix-pgsql/DESCR new file mode 100644 index 00000000000..6156d52d548 --- /dev/null +++ b/mail/postfix-pgsql/DESCR @@ -0,0 +1 @@ +Postfix SMTP server PostgreSQL backend module diff --git a/mail/postfix-pgsql/Makefile b/mail/postfix-pgsql/Makefile new file mode 100644 index 00000000000..1bed5cfb540 --- /dev/null +++ b/mail/postfix-pgsql/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $ +# + +COMMENT= Postfix SMTP server PostgreSQL backend module + +POSTFIX_LIB= pgsql +POSTFIX_LIBDIR= src/global +POSTFIX_LIB_DICT= yes +POSTFIX_LIB_MKMAP= no + +.include "../../mail/postfix/Makefile.module" + +CCARGS+= -I${PGSQL_PREFIX}/include +AUXLIBS_MODULE= -L${PGSQL_PREFIX}/lib -lpq \ + ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.}/lib + +.include "../../mk/pgsql.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/postfix-sqlite/DESCR b/mail/postfix-sqlite/DESCR new file mode 100644 index 00000000000..d6a579acefa --- /dev/null +++ b/mail/postfix-sqlite/DESCR @@ -0,0 +1 @@ +Postfix SMTP server SQLite backend module diff --git a/mail/postfix-sqlite/Makefile b/mail/postfix-sqlite/Makefile new file mode 100644 index 00000000000..b77fc2e94d7 --- /dev/null +++ b/mail/postfix-sqlite/Makefile @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1 2015/09/07 09:47:02 fhajny Exp $ +# + +COMMENT= Postfix SMTP server SQLite backend module + +POSTFIX_LIB= sqlite +POSTFIX_LIBDIR= src/global +POSTFIX_LIB_DICT= yes +POSTFIX_LIB_MKMAP= no + +.include "../../mail/postfix/Makefile.module" + +CCARGS+= -I${BUILDLINK_PREFIX.sqlite3}/include +AUXLIBS_MODULE= -L${BUILDLINK_PREFIX.sqlite3}/lib -lsqlite3 \ + ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.}/lib + +.include "../../databases/sqlite3/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index 4d74ae1277e..3528a0aaca5 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -1,104 +1,24 @@ -# $NetBSD: Makefile,v 1.285 2015/07/26 15:53:11 bsiegert Exp $ - -DISTNAME= postfix-2.11.6 -PKGREVISION= 1 -CATEGORIES= mail -MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ -MASTER_SITES+= http://postfix.it-austria.net/releases/official/ -MASTER_SITES+= http://mirrors.isc.org/pub/postfix/official/ -MASTER_SITES+= http://mirror.postfix.jp/postfix-release/official/ - -MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= http://www.postfix.org/ +# $NetBSD: Makefile,v 1.286 2015/09/07 09:47:01 fhajny Exp $ + +.include "../../mail/postfix/Makefile.common" + COMMENT= Postfix SMTP server and tools -# The postfix license has only very minor diffs from cpl-1.0. -LICENSE= cpl-1.0 -#LICENSE= postfix-license CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]* CONFLICTS+= esmtp>=1.2 nullmailer-[0-9]* USE_TOOLS+= perl -CHECK_HEADERS_SKIP+= src/global/mail_params.h - -.include "../../mk/bsd.prefs.mk" SPECIAL_PERMS+= sbin/postdrop postfix maildrop 2555 SPECIAL_PERMS+= sbin/postqueue postfix maildrop 2555 -# POSTFIX_QUEUE_DIR is the default queue directory for Postfix. This is -# merely a default, and may be changed by setting "queue_directory" in -# ${PKG_SYSCONFDIR}/main.cf. -# -POSTFIX_DATA_DIR?= ${VARBASE}/db/postfix -POSTFIX_QUEUE_DIR?= ${VARBASE}/spool/postfix -BUILD_DEFS+= VARBASE POSTFIX_DATA_DIR POSTFIX_QUEUE_DIR - -# CCARGS is a list of options to pass to the preprocessor/compiler. -# AUXLIBS is a list of options to pass to the linker. -CCARGS= #defined -AUXLIBS= ${LDFLAGS} - -# Enable Dovecot SASL -CCARGS+= -DUSE_SASL_AUTH -# Enable Berkeley DB map type. BDB_LIBS is defined in mk/bdb.buildlink3.mk. -CCARGS+= -DHAS_DB -AUXLIBS+= ${BDB_LIBS} - -# Set some default paths to override ${WRKSRC}/src/global/mail_params.h. -CCARGS+= -DDEF_DATA_DIR=\"${POSTFIX_DATA_DIR}\" -CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\" -CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\" -CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\" -CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\" -CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\" -CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\" -CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\" -CCARGS+= -DDEF_MANPAGE_DIR=\"${PREFIX}/${PKGMANDIR}\" -CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\" -CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\" - REPLACE_PERL+= auxiliary/qshape/qshape.pl -# Override those same default paths in the installed example main.cf. -SUBST_CLASSES+= postfix -SUBST_STAGE.postfix= post-configure -SUBST_FILES.postfix= conf/main.cf src/global/mail_params.h -SUBST_SED.postfix= \ - -e 's|^\(data_directory\) =.*|\1 = ${POSTFIX_DATA_DIR}|' -SUBST_SED.postfix+= \ - -e 's|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|' -SUBST_SED.postfix+= \ - -e 's|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|' -SUBST_SED.postfix+= \ - -e 's|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|' -SUBST_SED.postfix+= \ - -e 's|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|' -SUBST_SED.postfix+= \ - -e 's|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|' -SUBST_SED.postfix+= \ - -e 's|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|' -SUBST_SED.postfix+= \ - -e 's|^\(setgid_group\) =.*|\1 = maildrop|' -SUBST_SED.postfix+= \ - -e 's|^\(manpage_directory\) =.*|\1 = ${PREFIX}/${PKGMANDIR}|' -SUBST_SED.postfix+= \ - -e 's|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|' -SUBST_SED.postfix+= \ - -e 's|^\(readme_directory\) =.*|\1 = ${DOCDIR}|' -SUBST_SED.postfix+= \ - -e '/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g' - # options.mk appends to CCARGS and AUXLIBS the options needed to build # Postfix with support for various add-on modules. # .include "options.mk" -PKG_SYSCONFSUBDIR= postfix -LIBEXECDIR= ${PREFIX}/libexec/postfix -DOCDIR= ${PREFIX}/share/doc/postfix -EXAMPLEDIR= ${PREFIX}/share/examples/postfix - FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR} MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR} MESSAGE_SUBST+= DOCDIR=${DOCDIR} @@ -109,14 +29,10 @@ MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS} .endif PLIST_SRC+= ${PKGDIR}/PLIST -BUILD_TARGET= # empty -MAKE_ENV+= CC=${CC:Q} OPT=${CFLAGS:Q} -MAKE_ENV+= AUXLIBS=${AUXLIBS:Q} CCARGS=${CCARGS:Q} - RCD_SCRIPTS= postfix OWN_DIRS+= ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc OWN_DIRS_PERMS+= ${POSTFIX_DATA_DIR} postfix postfix 0700 -MAKE_DIRS+= ${PKG_SYSCONFDIR} +MAKE_DIRS+= ${METADIR}/dynamicmaps.cf.d ${METADIR}/postfix-files.d PKG_GROUPS?= postfix maildrop PKG_USERS?= postfix:postfix @@ -129,38 +45,17 @@ CONF_FILES+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i} .endfor CONF_FILES_PERMS= # empty -MAKE_ENV+= DEBUG= # empty - SUBST_CLASSES+= paths SUBST_FILES.paths= ${WRKDIR}/mailer.conf SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' SUBST_STAGE.paths= post-patch -.if ${OPSYS} == "SunOS" && !exists(/usr/include/rpcsvc/nis_cache.h) -SUBST_CLASSES+= nis -SUBST_FILES.nis= src/util/sys_defs.h -SUBST_MESSAGE.nis= Working around dropped support for NIS+ on SunOS -SUBST_STAGE.nis= post-patch -SUBST_SED.nis= -e 's,\#define HAS_NISPLUS,\#undef HAS_NISPLUS,g' -.endif - -CFLAGS.SunOS+= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 - -.if !empty(USE_DESTDIR:M[Yy][Ee][Ss]) -DESTDIR_INSTALLOPTIONS=-package install_root="${DESTDIR}" -.endif - -INSTALLATION_DIRS+= ${LIBEXECDIR} ${EXAMPLEDIR} ${DOCDIR} +INSTALLATION_DIRS+= ${LIBEXECDIR} ${METADIR} ${SHLIBDIR} ${EXAMPLEDIR} ${DOCDIR} post-extract: cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf rm -f ${WRKSRC}/auxiliary/MacOSX/Postfix.StartupItem/Postfix -do-configure: - cd ${WRKSRC} && \ - env ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \ - 'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}' - post-build: .if !empty(PKG_OPTIONS:Msasl) ${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf @@ -171,7 +66,8 @@ do-install: .if !empty(PKG_OPTIONS:Msasl) ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${DESTDIR}${EXAMPLEDIR} .endif - cd ${WRKSRC} && sh ./postfix-install -non-interactive \ + cd ${WRKSRC} && ${SETENV} LD_LIBRARY_PATH=${WRKSRC}/lib sh \ + ./postfix-install -non-interactive \ ${DESTDIR_INSTALLOPTIONS} config_directory="${EXAMPLEDIR}" ${INSTALL_DATA} ${WRKDIR}/mailer.conf \ ${DESTDIR}${EXAMPLEDIR}/mailer.conf @@ -180,5 +76,4 @@ do-install: ${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 \ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 -.include "../../mk/bdb.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/mail/postfix/Makefile.common b/mail/postfix/Makefile.common new file mode 100644 index 00000000000..1d9d796a083 --- /dev/null +++ b/mail/postfix/Makefile.common @@ -0,0 +1,128 @@ +# $NetBSD: Makefile.common,v 1.1 2015/09/07 09:47:01 fhajny Exp $ +# used by mail/postfix/Makefile +# used by mail/postfix/Makefile.module + +DISTNAME= postfix-3.0.2 +CATEGORIES= mail +MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ +MASTER_SITES+= http://postfix.it-austria.net/releases/official/ +MASTER_SITES+= http://mirrors.isc.org/pub/postfix/official/ +MASTER_SITES+= http://mirror.postfix.jp/postfix-release/official/ + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.postfix.org/ +# The postfix license has only very minor diffs from cpl-1.0. +LICENSE= cpl-1.0 +#LICENSE= postfix-license + +DISTINFO_FILE= ${PKGDIR}/../../mail/postfix/distinfo +PATCHDIR= ${PKGDIR}/../../mail/postfix/patches + +CHECK_HEADERS_SKIP+= src/global/mail_params.h + +.include "../../mk/bsd.prefs.mk" + +# POSTFIX_QUEUE_DIR is the default queue directory for Postfix. This is +# merely a default, and may be changed by setting "queue_directory" in +# ${PKG_SYSCONFDIR}/main.cf. +# +POSTFIX_DATA_DIR?= ${VARBASE}/db/postfix +POSTFIX_QUEUE_DIR?= ${VARBASE}/spool/postfix +BUILD_DEFS+= VARBASE POSTFIX_DATA_DIR POSTFIX_QUEUE_DIR + +# CCARGS is a list of options to pass to the preprocessor/compiler. +# AUXLIBS is a list of options to pass to the linker. +CCARGS= #defined +AUXLIBS= ${LDFLAGS} + +# Enable Dovecot SASL +CCARGS+= -DUSE_SASL_AUTH +# Enable Berkeley DB map type. BDB_LIBS is defined in mk/bdb.buildlink3.mk. +CCARGS+= -DHAS_DB +AUXLIBS+= ${BDB_LIBS} + +# Disable modules by default +.for module in cdb ldap lmdb mysql pcre pgsql sqlite +CCARGS+= -DNO_${module:tu} +.endfor + +# Set some default paths to override ${WRKSRC}/src/global/mail_params.h. +CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\" +CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\" +CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\" +CCARGS+= -DDEF_DATA_DIR=\"${POSTFIX_DATA_DIR}\" +CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\" +CCARGS+= -DDEF_MANPAGE_DIR=\"${PREFIX}/${PKGMANDIR}\" +CCARGS+= -DDEF_META_DIR=\"${PREFIX}/${METADIR}\" +CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\" +CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\" +CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\" +CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\" +CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\" +CCARGS+= -DDEF_SHLIB_DIR=\"${PREFIX}/${SHLIBDIR}\" + +# Override those same default paths in the installed example main.cf. +SUBST_CLASSES+= postfix +SUBST_STAGE.postfix= post-configure +SUBST_FILES.postfix= conf/main.cf src/global/mail_params.h +SUBST_SED.postfix= \ + -e 's|^\(data_directory\) =.*|\1 = ${POSTFIX_DATA_DIR}|' +SUBST_SED.postfix+= \ + -e 's|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|' +SUBST_SED.postfix+= \ + -e 's|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|' +SUBST_SED.postfix+= \ + -e 's|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|' +SUBST_SED.postfix+= \ + -e 's|^\(meta_directory\) =.*|\1 = ${PREFIX}/${METADIR}|' +SUBST_SED.postfix+= \ + -e 's|^\(shlib_directory\) =.*|\1 = ${PREFIX}/${SHLIBDIR}|' +SUBST_SED.postfix+= \ + -e 's|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|' +SUBST_SED.postfix+= \ + -e 's|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|' +SUBST_SED.postfix+= \ + -e 's|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|' +SUBST_SED.postfix+= \ + -e 's|^\(setgid_group\) =.*|\1 = maildrop|' +SUBST_SED.postfix+= \ + -e 's|^\(manpage_directory\) =.*|\1 = ${PREFIX}/${PKGMANDIR}|' +SUBST_SED.postfix+= \ + -e 's|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|' +SUBST_SED.postfix+= \ + -e 's|^\(readme_directory\) =.*|\1 = ${DOCDIR}|' +SUBST_SED.postfix+= \ + -e '/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g' + +PKG_SYSCONFSUBDIR= postfix +LIBEXECDIR= ${PREFIX}/libexec/postfix +DOCDIR= ${PREFIX}/share/doc/postfix +EXAMPLEDIR= ${PREFIX}/share/examples/postfix +# Not prefixed so that we can use where relative path needed +# METADIR set for postfix-2.6.x compatibility +METADIR= libexec/postfix +SHLIBDIR= lib/postfix + +BUILD_TARGET= # empty +MAKE_ENV+= CC=${CC:Q} OPT=${CFLAGS:Q} +MAKE_ENV+= AUXLIBS=${AUXLIBS:Q} CCARGS=${CCARGS:Q} + +MAKE_ENV+= DEBUG= # empty + +.if ${OPSYS} == "SunOS" && !exists(/usr/include/rpcsvc/nis_cache.h) +CCARGS+= -DNO_NISPLUS +.endif + +CFLAGS.SunOS+= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 + +.if !empty(USE_DESTDIR:M[Yy][Ee][Ss]) +DESTDIR_INSTALLOPTIONS=-package install_root="${DESTDIR}" +.endif + +do-configure: + cd ${WRKSRC} && \ + env ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \ + 'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}' \ + shared=yes dynamicmaps=yes + +.include "../../mk/bdb.buildlink3.mk" diff --git a/mail/postfix/Makefile.module b/mail/postfix/Makefile.module new file mode 100644 index 00000000000..5cd314c8562 --- /dev/null +++ b/mail/postfix/Makefile.module @@ -0,0 +1,47 @@ +# $NetBSD: Makefile.module,v 1.1 2015/09/07 09:47:01 fhajny Exp $ +# used by mail/postfix-cdb/Makefile +# used by mail/postfix-ldap/Makefile +# used by mail/postfix-lmdb/Makefile +# used by mail/postfix-mysql/Makefile +# used by mail/postfix-pcre/Makefile +# used by mail/postfix-pgsql/Makefile +# used by mail/postfix-sqlite/Makefile + +PKGNAME= ${DISTNAME:S/postfix/postfix-${POSTFIX_LIB}/} + +.include "../../mail/postfix/Makefile.common" + +DEPENDS+= postfix-${PKGVERSION_NOREV}{,nb[0-9]*}:../../mail/postfix + +CCARGS+= -DHAS_${POSTFIX_LIB:tu} +MAKE_ENV+= AUXLIBS_${POSTFIX_LIB:tu}=${AUXLIBS_MODULE:Q} + +# Define functionality to populate dynamicmaps.cf +POSTFIX_LIBFILE= postfix-${POSTFIX_LIB}.so +.if !empty(POSTFIX_LIB_DICT:Myes) +POSTFIX_LIB_FUNCS+= dict_${POSTFIX_LIB}_open +.endif +.if !empty(POSTFIX_LIB_MKMAP:Myes) +POSTFIX_LIB_FUNCS+= mkmap_${POSTFIX_LIB}_open +.endif + +INSTALLATION_DIRS+= ${SHLIBDIR} +INSTALLATION_DIRS+= ${METADIR}/dynamicmaps.cf.d ${METADIR}/postfix-files.d + +GENERATE_PLIST+= ${ECHO} "${SHLIBDIR}/${POSTFIX_LIBFILE}"; +GENERATE_PLIST+= ${ECHO} "${METADIR}/dynamicmaps.cf.d/${POSTFIX_LIB}.cf"; +GENERATE_PLIST+= ${ECHO} "${METADIR}/postfix-files.d/${POSTFIX_LIB}.cf"; + +do-build: + cd ${WRKSRC}/src/util && ${BUILD_MAKE_CMD} update + cd ${WRKSRC}/${POSTFIX_LIBDIR} && ${BUILD_MAKE_CMD} ${POSTFIX_LIBFILE} + +do-install: + ${INSTALL_LIB} ${WRKSRC}/${POSTFIX_LIBDIR}/${POSTFIX_LIBFILE} \ + ${DESTDIR}${PREFIX}/${SHLIBDIR} + ${ECHO} "${POSTFIX_LIB} ${POSTFIX_LIBFILE} ${POSTFIX_LIB_FUNCS}" > \ + ${DESTDIR}${PREFIX}/${METADIR}/dynamicmaps.cf.d/${POSTFIX_LIB}.cf + ( ${ECHO} "\$$shlib_directory/${POSTFIX_LIBFILE}:f:root:-:755"; \ + ${ECHO} "\$$meta_directory/dynamicmaps.cf.d/${POSTFIX_LIB}.cf:f:root:-:644"; \ + ${ECHO} "\$$meta_directory/postfix-files.d/${POSTFIX_LIB}.cf:f:root:-:644"; ) \ + > ${DESTDIR}${PREFIX}/${METADIR}/postfix-files.d/${POSTFIX_LIB}.cf diff --git a/mail/postfix/PLIST b/mail/postfix/PLIST index cc7c94ed921..d2e15b05044 100644 --- a/mail/postfix/PLIST +++ b/mail/postfix/PLIST @@ -1,18 +1,25 @@ -@comment $NetBSD: PLIST,v 1.28 2014/03/11 14:05:04 jperkin Exp $ +@comment $NetBSD: PLIST,v 1.29 2015/09/07 09:47:01 fhajny Exp $ bin/mailq bin/newaliases +lib/postfix/libpostfix-dns.so +lib/postfix/libpostfix-global.so +lib/postfix/libpostfix-master.so +lib/postfix/libpostfix-tls.so +lib/postfix/libpostfix-util.so libexec/postfix/anvil libexec/postfix/bounce libexec/postfix/cleanup libexec/postfix/discard libexec/postfix/dnsblog +libexec/postfix/dynamicmaps.cf libexec/postfix/error libexec/postfix/flush libexec/postfix/lmtp libexec/postfix/local -libexec/postfix/main.cf +libexec/postfix/main.cf.proto +libexec/postfix/makedefs.out libexec/postfix/master -libexec/postfix/master.cf +libexec/postfix/master.cf.proto libexec/postfix/nqmgr libexec/postfix/oqmgr libexec/postfix/pickup @@ -186,7 +193,6 @@ share/examples/postfix/header_checks share/examples/postfix/mailer.conf share/examples/postfix/main.cf share/examples/postfix/main.cf.default -share/examples/postfix/makedefs.out share/examples/postfix/master.cf share/examples/postfix/relocated ${PLIST.csasl}share/examples/postfix/smtpd.conf diff --git a/mail/postfix/distinfo b/mail/postfix/distinfo index 865c21907ef..08eb06d5634 100644 --- a/mail/postfix/distinfo +++ b/mail/postfix/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.160 2015/07/22 00:25:37 taca Exp $ +$NetBSD: distinfo,v 1.161 2015/09/07 09:47:01 fhajny Exp $ -SHA1 (postfix-2.11.6.tar.gz) = 005f84264ae8fa6989181bc61b756a0fd8e99dfa -RMD160 (postfix-2.11.6.tar.gz) = 54a35e148ec169d86528857484e002e9326dc56e -Size (postfix-2.11.6.tar.gz) = 4030414 bytes -SHA1 (patch-aa) = 6f7dc14d53e914e9cb72752fb3941c569cd2e8f9 -SHA1 (patch-ag) = 2f96a679e7f0c2e36615f5e7993ab96296303a10 -SHA1 (patch-ai) = de5985d9fd6a81ea74b69224c82c665cd311c0c7 +SHA1 (postfix-3.0.2.tar.gz) = 9d75ca3c207441a38a79a2c8ceaa398c2b9cdc4e +RMD160 (postfix-3.0.2.tar.gz) = aba1e9decc1aa9aa0c0b68f2bb7f0432b75fabdf +Size (postfix-3.0.2.tar.gz) = 4239235 bytes +SHA1 (patch-aa) = f2c418a2fd34da7325ea2823ddd14043768f0111 +SHA1 (patch-ag) = e3d818cd75225c5b50960659827c6e27767cbd58 +SHA1 (patch-ai) = d515202c3bba755067bcb057714cb21453d15d75 SHA1 (patch-src_dns_dns__lookup.c) = 9c26686e5abd9aee36f042440e5f6a6ffca3df4a diff --git a/mail/postfix/options.mk b/mail/postfix/options.mk index 72575ba6274..80201968aa4 100644 --- a/mail/postfix/options.mk +++ b/mail/postfix/options.mk @@ -1,9 +1,9 @@ -# $NetBSD: options.mk,v 1.38 2015/04/17 02:22:52 hiramatsu Exp $ +# $NetBSD: options.mk,v 1.39 2015/09/07 09:47:01 fhajny Exp $ # Global and legacy options PKG_OPTIONS_VAR= PKG_OPTIONS.postfix -PKG_SUPPORTED_OPTIONS= ldap mysql pcre pgsql sasl sqlite tls cdb +PKG_SUPPORTED_OPTIONS= sasl tls eai PKG_SUGGESTED_OPTIONS= tls .include "../../mk/bsd.options.mk" @@ -17,60 +17,8 @@ CCARGS+= -DUSE_TLS AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \ ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \ -lssl -lcrypto -.endif - -### -### Support "pcre" map type for regular expressions. -### -.if !empty(PKG_OPTIONS:Mpcre) -. include "../../devel/pcre/buildlink3.mk" -CCARGS+= -DHAS_PCRE -AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \ - ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib \ - -lpcre .else -CCARGS+= -DNO_PCRE -.endif - -### -### Support LDAP directories for table lookups. -### -.if !empty(PKG_OPTIONS:Mldap) -. include "../../databases/openldap-client/buildlink3.mk" -CCARGS+= -DHAS_LDAP -AUXLIBS+= -L${BUILDLINK_PREFIX.openldap-client}/lib \ - ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openldap-client}/lib \ - -lldap -llber -.endif - -### -### Support using a MySQL database server for table lookups. -### -.if !empty(PKG_OPTIONS:Mmysql) -. include "../../mk/mysql.buildlink3.mk" -CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql -AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \ - ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \ - -lmysqlclient -lz -lm -.endif - -### -### Support using a PostgreSQL database server for table lookups. -### -.if !empty(PKG_OPTIONS:Mpgsql) -. include "../../mk/pgsql.buildlink3.mk" -CCARGS+= -DHAS_PGSQL -I${PGSQL_PREFIX}/include/pgsql -AUXLIBS+= -L${PGSQL_PREFIX}/lib -lpq -.endif - -### -### Support using a SQLite database for table lookups. -### See http://www.treibsand.com/postfix-sqlite/ -### -.if !empty(PKG_OPTIONS:Msqlite) -. include "../../databases/sqlite3/buildlink3.mk" -CCARGS+= -DHAS_SQLITE -I${SQLITE3_PREFIX}/include/sqlite3 -AUXLIBS+= -L${SQLITE3_PREFIX}/lib -lsqlite3 +CCARGS+= -DNO_TLS .endif ### @@ -98,12 +46,13 @@ CCARGS+= -DDEF_SERVER_SASL_TYPE=\"dovecot\" .endif ### -### Support CDB (Constant Database) map type. +### EAI (Email Address Internationalization) support (SMTPUTF8) ### -.if !empty(PKG_OPTIONS:Mcdb) -. include "../../databases/tinycdb/buildlink3.mk" -CCARGS+= -DHAS_CDB -AUXLIBS+= -L${BUILDLINK_PREFIX.tinycdb}/lib \ - ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.tinycdb}/lib \ - -lcdb +.if !empty(PKG_OPTIONS:Meai) +. include "../../textproc/icu/buildlink3.mk" +CCARGS+= -DHAS_EAI -I${BUILDLINK_PREFIX.icu}/include +AUXLIBS+= -L${BUILDLINK_PREFIX.icu}/lib -licuuc \ + ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.icu}/lib +.else +CCARGS+= -DNO_EAI .endif diff --git a/mail/postfix/patches/patch-aa b/mail/postfix/patches/patch-aa index 0daf889935e..e65d2b68ab1 100644 --- a/mail/postfix/patches/patch-aa +++ b/mail/postfix/patches/patch-aa @@ -1,10 +1,10 @@ -$NetBSD: patch-aa,v 1.23 2014/02/09 05:34:13 taca Exp $ +$NetBSD: patch-aa,v 1.24 2015/09/07 09:47:01 fhajny Exp $ Make this pkgsrc friendly. ---- postfix-install.orig 2012-05-22 19:40:29.000000000 +0000 +--- postfix-install.orig 2015-01-29 22:15:30.000000000 +0000 +++ postfix-install -@@ -370,26 +370,6 @@ HTML files. Specify \"no\" if you do not +@@ -436,26 +436,6 @@ template files main.cf.proto and master. : ${tempdir=`pwd`} : ${config_directory=`bin/postconf -c conf -h -d config_directory`} @@ -31,14 +31,17 @@ Make this pkgsrc friendly. # In case some systems special-case pathnames beginning with //. case $install_root in -@@ -744,10 +724,3 @@ bin/postconf -c $CONFIG_DIRECTORY -e \ - "sample_directory = $sample_directory" \ - "readme_directory = $readme_directory" \ +@@ -847,13 +827,3 @@ bin/postconf -c $CONFIG_DIRECTORY -e \ + "shlib_directory = $shlib_directory" \ + "meta_directory = $meta_directory" \ || exit 1 - -# If Postfix is being installed locally from source code, do the -# post-install processing now. - +-# The unexpansion above may have side effects on exported variables. +-# It does not matter because bin/postfix below will override them. +- -test -n "$install_root" || { - bin/postfix post-install $post_install_options || exit 1 -} diff --git a/mail/postfix/patches/patch-ag b/mail/postfix/patches/patch-ag index 4042eca9534..b9b83dc9ade 100644 --- a/mail/postfix/patches/patch-ag +++ b/mail/postfix/patches/patch-ag @@ -1,19 +1,11 @@ -$NetBSD: patch-ag,v 1.35 2014/08/25 16:00:54 taca Exp $ +$NetBSD: patch-ag,v 1.36 2015/09/07 09:47:01 fhajny Exp $ * Add support for NetBSD 7. * Only define HAS_DB if it hasn't been defined. ---- src/util/sys_defs.h.orig 2013-09-29 20:51:55.000000000 +0000 +--- src/util/sys_defs.h.orig 2015-07-18 13:28:17.000000000 +0000 +++ src/util/sys_defs.h -@@ -31,6 +31,7 @@ - || defined(OPENBSD5) \ - || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \ - || defined(NETBSD4) || defined(NETBSD5) || defined(NETBSD6) \ -+ || defined(NETBSD7) \ - || defined(EKKOBSD1) || defined(DRAGONFLY) - #define SUPPORTED - #include <sys/types.h> -@@ -44,7 +45,9 @@ +@@ -45,7 +45,9 @@ #define DEF_MAILBOX_LOCK "flock, dotlock" #define HAS_SUN_LEN #define HAS_FSYNC @@ -23,7 +15,7 @@ $NetBSD: patch-ag,v 1.35 2014/08/25 16:00:54 taca Exp $ #define HAS_SA_LEN #define NATIVE_DB_TYPE "hash" #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000) -@@ -1265,6 +1268,8 @@ extern int h_errno; +@@ -1267,6 +1269,8 @@ extern int h_errno; #define DEF_SMTP_CACHE_DEMAND 0 #endif diff --git a/mail/postfix/patches/patch-ai b/mail/postfix/patches/patch-ai index c4ffd0723d4..fb1916b24f2 100644 --- a/mail/postfix/patches/patch-ai +++ b/mail/postfix/patches/patch-ai @@ -1,19 +1,10 @@ -$NetBSD: patch-ai,v 1.33 2015/07/22 00:25:37 taca Exp $ +$NetBSD: patch-ai,v 1.34 2015/09/07 09:47:01 fhajny Exp $ Make this pkgsrc friendly. ---- makedefs.orig 2015-07-19 14:24:10.000000000 +0000 +--- makedefs.orig 2015-07-19 14:24:25.000000000 +0000 +++ makedefs -@@ -187,6 +187,8 @@ case "$SYSTEM.$RELEASE" in - ;; - NetBSD.6*) SYSTYPE=NETBSD6 - ;; -+ NetBSD.7*) SYSTYPE=NETBSD7 -+ ;; - BSD/OS.2*) SYSTYPE=BSDI2 - ;; - BSD/OS.3*) SYSTYPE=BSDI3 -@@ -244,13 +246,6 @@ case "$SYSTEM.$RELEASE" in +@@ -372,13 +372,6 @@ case "$SYSTEM.$RELEASE" in esac ;; ULTRIX.4*) SYSTYPE=ULTRIX4 @@ -27,7 +18,7 @@ Make this pkgsrc friendly. for l in syslog resolv; do if [ -f /usr/local/lib/lib$l.a ]; then SYSLIBS="$SYSLIBS -l$l" -@@ -288,33 +283,8 @@ case "$SYSTEM.$RELEASE" in +@@ -416,33 +409,8 @@ case "$SYSTEM.$RELEASE" in esac;; # Tested with RedHat 3.03 on 20020729. Linux.1*) SYSTYPE=LINUX1 @@ -61,8 +52,8 @@ Make this pkgsrc friendly. for name in nsl resolv $GDBM_LIBS do for lib in /usr/lib64 /lib64 /usr/lib /lib -@@ -368,25 +338,6 @@ EOF - esac +@@ -503,25 +471,6 @@ EOF + : ${PLUGIN_LD="${CC-gcc} -shared"} ;; Linux.[34].*) SYSTYPE=LINUX$RELEASE_MAJOR - case "$CCARGS" in @@ -87,7 +78,7 @@ Make this pkgsrc friendly. for name in nsl resolv do for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/* -@@ -400,24 +351,6 @@ EOF +@@ -542,24 +491,6 @@ EOF ;; GNU.0*|GNU/kFreeBSD.[567]*) SYSTYPE=GNU0 @@ -112,7 +103,7 @@ Make this pkgsrc friendly. for name in nsl resolv do for lib in /usr/lib64 /lib64 /usr/lib /lib -@@ -448,25 +381,13 @@ EOF +@@ -590,25 +521,13 @@ EOF HP-UX.A.09.*) SYSTYPE=HPUX9 SYSLIBS=-ldbm CCARGS="$CCARGS -DMISSING_USLEEP" |