pkgsrc/mail/postfix-current/Makefile

230 lines
7.1 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.33 2004/07/02 08:03:04 martti Exp $
2004-03-06 16:08:32 +01:00
DISTNAME= postfix-2.2-20040628
2004-03-06 16:08:32 +01:00
CATEGORIES= mail
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/ \
http://public.planetmirror.com.au/pub/postfix/experimental/
2004-03-06 16:08:32 +01:00
MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://www.postfix.org/
COMMENT= Postfix SMTP server and tools
2004-03-07 13:29:41 +01:00
CONFLICTS+= sendmail-[0-9]*
2004-03-06 16:08:32 +01:00
DIST_SUBDIR= postfix
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_BUILDLINK3= yes
USE_PKGINSTALL= yes
PKG_SYSCONFSUBDIR= postfix
POSTFIX_SPOOL= /var/spool/postfix
OWN_DIRS= ${POSTFIX_SPOOL}
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_COMMAND_DIR=\"${PREFIX}/sbin\"
CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
.include "../../mk/bsd.prefs.mk"
# NetBSD 1.5 and above has /etc/rc.d/postfix already which is
# suitable.
.if empty(MACHINE_PLATFORM:MNetBSD-1.[5-9]*-*)
RCD_SCRIPTS= postfix
.endif
FIX_RPATH+= AUXLIBS
BUILD_DEFS+= POSTFIX_USE_INET6
BUILD_DEFS+= POSTFIX_USE_TLS
2004-03-06 16:08:32 +01:00
BUILD_DEFS+= POSTFIX_USE_PCRE
BUILD_DEFS+= POSTFIX_USE_MYSQL
BUILD_DEFS+= POSTFIX_USE_PGSQL
BUILD_DEFS+= USE_OPENLDAP
2004-03-06 16:08:32 +01:00
BUILD_DEFS+= USE_SASL
BUILD_DEFS+= USE_SASL2
# .if defined(POSTFIX_USE_INET6) && ${POSTFIX_USE_INET6} == "YES"
# . include "../../security/openssl/buildlink3.mk"
# PATCHFILES+= tls+ipv6-1.25-pf-2.2-20040616.patch.gz
# PATCH_SITES+= ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.25/
# PATCH_DIST_STRIP= -p1
#
# CCARGS+= -DHAS_SSL
# AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
# -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
# -lssl -lcrypto
#
# PLIST_SRC+= ${PKGDIR}/PLIST.tls
# MESSAGE_SRC+= ${PKGDIR}/MESSAGE.tls
# .endif
2004-03-06 16:08:32 +01:00
.if defined(POSTFIX_USE_PCRE) && ${POSTFIX_USE_PCRE} == "YES"
. include "../../devel/pcre/buildlink3.mk"
CCARGS+= -DHAS_PCRE
AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib \
-lpcre
.else
CCARGS+= -DNO_PCRE
.endif
.if defined(USE_OPENLDAP) && ${USE_OPENLDAP} == "YES"
2004-03-06 16:08:32 +01:00
. include "../../databases/openldap/buildlink3.mk"
CCARGS+= -DHAS_LDAP
AUXLIBS+= -L${BUILDLINK_PREFIX.openldap}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openldap}/lib \
-lldap -llber
. if ${OPSYS} != "Linux"
. include "../../databases/db4/buildlink3.mk"
CCARGS+= -I${BUILDLINK_PREFIX.db4}/include/db4
AUXLIBS+= -L${BUILDLINK_PREFIX.db4}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.db4}/lib \
-ldb4
. endif
2004-03-06 16:08:32 +01:00
.endif
.if defined(POSTFIX_USE_MYSQL) && ${POSTFIX_USE_MYSQL} == "YES"
. include "../../databases/mysql-client/buildlink3.mk"
CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
-lmysqlclient -lz -lm
.endif
## .if defined(POSTFIX_USE_PGSQL) && ${POSTFIX_USE_PGSQL} == "YES"
## . include "../../databases/postgresql-lib/buildlink3.mk"
## . include "../../security/openssl/buildlink3.mk"
## PATCHFILES+= postfix-pg.postfix-2.0.0.2.patch
## PATCH_SITES+= http://www.mat.cc/postfix/
## PATCH_DIST_STRIP= -p1
##
## CCARGS+= -DHAS_PGSQL -I${BUILDLINK_PREFIX.postgresql-lib}/include/pgsql
## AUXLIBS+= -L${BUILDLINK_PREFIX.postgresql-lib}/lib -lpq \
## -L${BUILDLINK_PREFIX.openssl}/lib -lcrypt
## .endif
2004-03-06 16:08:32 +01:00
.if defined(USE_SASL2) && ${USE_SASL2} == "YES"
2004-04-14 19:52:53 +02:00
USING_SASL= YES
2004-03-06 16:08:32 +01:00
. include "../../security/cyrus-sasl2/buildlink3.mk"
CCARGS+= -DUSE_SASL2_AUTH
AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl2
.elif defined(USE_SASL) && ${USE_SASL} == "YES"
USING_SASL=YES
2004-03-06 16:08:32 +01:00
. include "../../security/cyrus-sasl/buildlink3.mk"
CCARGS+= -DUSE_SASL_AUTH
AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl
.endif
.if defined(USING_SASL)
PLIST_SRC+= ${PKGDIR}/PLIST.sasl
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
.endif
MESSAGE_SRC+= ${PKGDIR}/MESSAGE
.if exists(${PKGDIR}/MESSAGE.${OPSYS})
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
.endif
PLIST_SRC+= ${PKGDIR}/PLIST
ALL_TARGET= #empty
MAKE_ENV= CC="${CC}" OPT="${CFLAGS}"
MAKE_ENV+= AUXLIBS="${AUXLIBS}" CCARGS="${CCARGS}"
POSTFIX_CONF_FILES= conf/main.cf src/util/sys_defs.h postfix-install
Update postfix-current pacakge to postfix-20040504. pkgsrc changes: - install smtpd-policy script as example. - adapot NetBSD 2.X and later. - make local(8) handle EDQUOT as temporary error. - enable RECEIVED_ENVELOPE_FROM. Postfix changes: 20040324 Portability: ekkoBSD support by Philip Reynolds. Files: makedefs, util/sys_defs.h. 20040325 Cleanup: smtp_skip_4xx_greeting and smtp_skip_5xx_greeting functionality is moved from connection management to SMTP protocol processing, so that Postfix now logs the server response when a server refuses to provide service. Files: smtp/smtp_connect.c, smtp/smtp_proto.c. Cleanup: smtp_skip_4xx_greeting is no longer configurable; it is now permanently turned on. 20040326 Workaround: in the trivial-rewrite server, turn on the code to strip trailing "." while rewriting addresses, and change the address resolver to strip trailing "." in a compatible manner. This does not eliminate the problem that the SMTP server may use a different address for recipient validation than what the cleanup server uses for virtual alias mapping. 20040329 Bugfix: the SMTP server did not log client (and SASL) information with the real-time content filter was enabled. Files: smtpd/smtpd.c, smtpd/smtpd_sasl_proto.c. Compatibility: smtpd_reject_unlisted_sender is turned off by default, to avoid trouble with with in-house software that sends out mail software with an unreplyable address. 20040331 Bugfix: postdrop should not abandon mail submission after receiving a SIGHUP signal when SIGHUP was ignored by the parent process. Victor Duchovni, Morgan Stanley. File: postdrop/postdrop.c. Bugfix: parsing bug in PgSQL dictionaries causing UNIX sockets to be ignored. Liviu Daia. Files: global/dict*sql.c. Performance: allow MySQL and PgSQL database connections to be closed when idle for more than 1 minute; Liviu Daia. Files: global/dict*sql.c. 20040401 Sanity: the SMTP server no longer accepts sender or recipient addresses that end in the "@" null domain, as well as addresses that rewrite into such a form. Specify "resolve_null_domain=yes" to get the old behavior back. File: trivial-rewrite/resolve.c. 20040402 Cleanup: added WARN action support for access maps, for consistency with the WARN action in header and body checks. File: smtpd/smtpd_check.c. 20040407 Bugfix: missing return statement at the end of the FREE_MEMORY_AND_RETURN error handling macro. Adi Prasaja. File: trivial-rewrite/resolve.c. 20040411 Future proofing: client_rate_time_unit is renamed to anvil_rate_time_unit, so that it is no longer limited to clients only. File: src/global/mail_params.h. Cleanup: postalias and postmap now log problems to syslogd. Files: postalias/postalias.c, postmap/postmap.c. 20040413 Feature: "postfix set-permissions" (re)sets ownership and access permissions of Postfix files and directories. Feature: "postfix upgrade-configuration" updates main.cf and master.cf. This is for people who people copy over their old files after installing a newer Postfix version. Feature: HTML files are now optionally installed under control of the html_directory configuration parameter. Files: postfix-install, conf/postfix-files, conf/post-install. Cleanup: README file installation is now optional. Files: postfix-install, conf/postfix-files, conf/post-install. 20040414 Cleanup: references to sample-mumble.cf files removed, conf/mumble_table files removed, new commands added to conf/postfix-script. Cleanups: function declared in but used as void, missing include file, missing const qualifier, unused variable. Matthias Andree. Files: bounce/bounce_notify_util.c, bounce/bounce_service.h, postlog/postlog.c, smtpd/smtpd_check.c, util/attr_scan64.c. Bugfix: more robust version of SIGHUP test of 20040331. Victor Duchovni, Morgan Stanley. File: postdrop/postdrop.c. Safety: added NOCLOBBER qualifiers to local variables that might be clobbered by longjmp(). Files: util/sys_defs.h, smtp/smtp_proto.c, lmtp/lmtp_proto.c, smtpd/smtpd_check.c, smtpstone/smtp-source.c. Bugfix: sub-level Makefiles no longer turned on the extra compiler warnings. Files: Makefile.in.*, makedefs.*. 20040415 Bugfix: the LMTP client attempted to reuse a connection after timeout, causing protocol synchronization errors. Reported by Rob Mueller. File: lmtp/lmtp.c. 20040416 Cleanup: non-delivery reports now include the original recipient information. File: bounce/bounce_notify_util.c. 20040415-18 Typos: many documentation fixes by Rob Foehl. 20040418 Cleanup: "int" versus "const int" prototype mismatch between the DICT sequence method prototype and possible implementations. Files: util/dict_db.c, util/dict_dbm.c. 20040419 Bugfix: the code that rejects client/helo RESTRICTIONS with smtpd_delay_reject=no looked at the wrong evidence and rejected client/helo ACCESS MAP lookups instead. Michael Tokarev. Files: smtpd/smtpd.c, smtpd/smtpd_check.c. Bugfix: missing # in master.cf in optional submission service. 20040420 Bugfix: smtpd logged the client too often. Michael Tokarev. File: smtpd/smtpd.c. Cleanup: client_event_status_update_time renamed to anvil_status_update_time. Files: mantools/postlink, proto/postconf.proto, anvil/anvil.c. 20040421 Workaround: allow pipelined SMTP clients to overshoot the SMTP server recipient limit without triggering the server hard error limit. The SMTP server does not count "too many recipients" towards the hard error limit, as long as the number of excess recipients stays within a configurable overshoot limit (default: smtpd_recipient_overshoot_limit = 1000). Solution in cooperation with Victor Duchovni. Files: smtpd/smtpd.c, smtpd/smtpd_state.c, smtpd/smtpd.h. 20040502 Missing test for a never used flag (the problematic and thus never completed INSPECT feature that doesn't re-inject mail into Postfix). Victor Duchovni, Morgan Stanley. File: virtual/virtual.c. 20040503 Bugfix: missing "sasl enabled" guard in the SMTPD policy client. File: smtpd/smtpd_check.c.
2004-06-06 15:50:41 +02:00
POSTFIX_CONF_FILES+= src/global/mail_params.h
2004-03-06 16:08:32 +01:00
FILES_SUBST+= SHAREDIR=${SHAREDIR}
MESSAGE_SUBST+= SHAREDIR=${SHAREDIR}
PLIST_SUBST+= POSTFIX_SPOOL=${POSTFIX_SPOOL}
PKG_GROUPS?= postfix maildrop
PKG_USERS?= postfix:postfix::Postfix\\ User:${POSTFIX_SPOOL}
LIBEXECDIR= ${PREFIX}/libexec/${PKGBASE}
SHAREDIR= ${PREFIX}/share/examples/${PKGBASE}
CONF_FILES= ${SHAREDIR}/main.cf ${PKG_SYSCONFDIR}/main.cf
CONF_FILES+= ${SHAREDIR}/master.cf ${PKG_SYSCONFDIR}/master.cf
.if defined(USING_SASL)
. if defined(USE_SASL2)
MAKE_DIRS+= ${PREFIX}/lib/sasl2
CONF_FILES+= ${SHAREDIR}/smtpd.conf ${PREFIX}/lib/sasl2/smtpd.conf
. else
MAKE_DIRS+= ${PREFIX}/lib/sasl
CONF_FILES+= ${SHAREDIR}/smtpd.conf ${PREFIX}/lib/sasl/smtpd.conf
. endif
.endif
CONF_FILES_PERMS= # empty
.for confscr in post-install postfix-files postfix-script
CONF_FILES_PERMS+= ${SHAREDIR}/${confscr} ${PKG_SYSCONFDIR}/${confscr} \
${ROOT_USER} ${ROOT_GROUP} 755
.endfor
.undef confscr
INSTALL_EXTRA_TMPL+= ${PKGDIR}/INSTALL
pre-configure:
@for i in ${POSTFIX_CONF_FILES}; do \
${CP} ${WRKSRC}/$${i} ${WRKSRC}/$${i}.dist; \
${SED} -e 's|__PREFIX|'${PREFIX}'|g' \
-e 's|__PKG_SYSCONFDIR|'${PKG_SYSCONFDIR}'|g' \
< ${WRKSRC}/$${i}.dist \
> ${WRKSRC}/$${i}; \
done
do-configure:
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \
'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}'
post-build:
${SED} -e 's#@@PREFIX@@#${PREFIX}#g' \
<${FILESDIR}/mailer.conf >${WRKDIR}/mailer.conf.postfix
pre-install:
${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}
${INSTALL_DATA_DIR} ${SHAREDIR}
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/postfix
${INSTALL_DATA_DIR} ${LIBEXECDIR}
${CHOWN} ${ROOT_USER}:${ROOT_GROUP} ${SHAREDIR} ${LIBEXECDIR}
${CHMOD} 755 ${SHAREDIR} ${LIBEXECDIR}
-${RM} -f ${WRKSRC}/conf/*.orig
.if defined(USING_SASL)
. if defined(USE_SASL2)
${ECHO} "pwcheck_method: auxprop" > ${WRKDIR}/smtpd.conf
. else
${ECHO} "pwcheck_method: sasldb" > ${WRKDIR}/smtpd.conf
. endif
${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${SHAREDIR}
.endif
${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${SHAREDIR}
${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-files ${SHAREDIR}
${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${SHAREDIR}
${INSTALL_DATA} ${WRKSRC}/conf/main.cf ${SHAREDIR}
${INSTALL_DATA} ${WRKSRC}/conf/master.cf ${SHAREDIR}
${INSTALL_DATA} ${WRKDIR}/mailer.conf.postfix ${SHAREDIR}/mailer.conf
do-install:
cd ${WRKSRC} && ${SETENV} config_directory="${SHAREDIR}" \
${SH} postfix-install -non-interactive
.if ${OPSYS} == "Linux"
2004-04-14 19:52:53 +02:00
. include "../../databases/db/buildlink3.mk"
2004-03-10 19:07:16 +01:00
CCARGS+= -I${BUILDLINK_PREFIX.db2}/include/db2
AUXLIBS+= -L${BUILDLINK_PREFIX.db2}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.db2}/lib \
2004-03-06 16:08:32 +01:00
-ldb2
.endif
.include "../../mk/bsd.pkg.mk"