pkgsrc/mail/postfix-current/Makefile

145 lines
4.6 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.57 2006/02/05 12:55:32 martti Exp $
2004-03-06 16:08:32 +01:00
DISTNAME= postfix-2.3-20060202
Updated postfix-current to 2.3-20060103 Postfix snapshot 20051220 provides a plug-in architecture for SASL authentication. With this, Postfix can support multiple SASL implementations without source code patches. Incompatibility with snapshot 20051220 ====================================== The Postfix-with-Cyrus-SASL build procedure has changed. You now need to specify -DUSE_CYRUS_SASL in addition to -DUSE_SASL_AUTH or else you end up without any Cyrus SASL support. The error messages are: unsupported SASL server implementation: cyrus unsupported SASL client implementation: cyrus Major changes with snapshot 20051220 ==================================== Plug-in support for SASL authentication in the SMTP server and in the SMTP+LMTP client. With this, Postfix can support multiple SASL implementations without source code patches. Some distributors may even make SASL support a run-time linking option, just like they do with Postfix lookup tables. Hints and tips for plug-in developers are in the xsasl/README file. For backwards compatibility the default plug-in type is Cyrus SASL, so everything should behave like it did before. Some error messages are slightly different, but these are generally improvements. The "postconf -a" command shows what plug-in implementations are available for the SMTP server, and "postconf -A" does the same for the SMTP+LMTP client. Plug-in implementations are selected with the smtpd_sasl_type, smtp_sasl_type and lmtp_sasl_type configuration parameters. Other new configuration parameters are smtpd_sasl_path, smtp_sasl_path and lmtp_sasl_path. These are better left alone; they are introduced for the convenience of other SASL implementations.
2006-01-10 07:39:00 +01:00
#PKGREVISION= 1
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
DIST_SUBDIR= postfix
CONFLICTS+= sendmail-[0-9]* fastforward>=0.51nb2
2004-03-06 16:08:32 +01:00
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_TOOLS+= perl
.include "../../mk/bsd.prefs.mk"
2004-03-06 16:08:32 +01:00
# 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_QUEUE_DIR?= ${VARBASE}/spool/postfix
# CCARGS is a list of options to pass to the preprocessor/compiler.
# AUXLIBS is a list of options to pass to the linker.
#
CCARGS= # empty
AUXLIBS= ${LDFLAGS}
FIX_RPATH+= AUXLIBS
2004-03-06 16:08:32 +01:00
# Set some default paths to override ${WRKSRC}/src/global/mail_params.h.
CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\"
CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
2004-03-06 16:08:32 +01:00
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}/man\"
CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\"
CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\"
# 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|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|" \
-e "s|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|" \
-e "s|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|" \
-e "s|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|" \
-e "s|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|" \
-e "s|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|" \
-e "s|^\(setgid_group\) =.*|\1 = maildrop|" \
-e "s|^\(manpage_directory\) =.*|\1 = ${PREFIX}/man|" \
-e "s|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|" \
-e "s|^\(readme_directory\) =.*|\1 = ${DOCDIR}|" \
-e "/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g"
2004-03-06 16:08:32 +01:00
# options.mk appends to CCARGS and AUXLIBS the options needed to build
# Postfix with support for various add-on modules.
#
.include "options.mk"
2004-03-06 16:08:32 +01:00
PKG_SYSCONFSUBDIR= postfix
LIBEXECDIR= ${PREFIX}/libexec/postfix
DOCDIR= ${PREFIX}/share/doc/postfix
EXAMPLEDIR= ${PREFIX}/share/examples/postfix
2004-03-06 16:08:32 +01:00
FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR:Q}
MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
MESSAGE_SUBST+= DOCDIR=${DOCDIR}
2004-03-06 16:08:32 +01:00
MESSAGE_SRC+= ${PKGDIR}/MESSAGE
.if exists(${PKGDIR}/MESSAGE.${OPSYS})
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
2004-03-06 16:08:32 +01:00
.endif
PLIST_SRC+= ${PKGDIR}/PLIST
2004-03-06 16:08:32 +01:00
BUILD_TARGET= # empty
MAKE_ENV+= CC=${CC:Q} OPT=${CFLAGS:M*:Q}
MAKE_ENV+= AUXLIBS=${AUXLIBS:Q} CCARGS=${CCARGS:Q}
2004-03-06 16:08:32 +01:00
RCD_SCRIPTS= postfix
OWN_DIRS+= ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc
MAKE_DIRS+= ${PKG_SYSCONFDIR}
2004-03-06 16:08:32 +01:00
PKG_GROUPS?= postfix maildrop
PKG_USERS?= postfix:postfix::Postfix\ User:${POSTFIX_QUEUE_DIR}
2004-03-06 16:08:32 +01:00
CONF_FILES= # empty
.for _file_ in main.cf master.cf postfix-files
CONF_FILES+= ${EXAMPLEDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_}
.endfor
2004-03-06 16:08:32 +01:00
CONF_FILES_PERMS= # empty
.for _file_ in post-install postfix-script
CONF_FILES_PERMS+= ${EXAMPLEDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_} \
2004-03-06 16:08:32 +01:00
${ROOT_USER} ${ROOT_GROUP} 755
.endfor
.if !empty(PKG_OPTIONS:Msasl)
MAKE_DIRS+= ${SASLLIBDIR}
CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf
.endif
2004-03-06 16:08:32 +01:00
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
post-extract:
${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
2004-03-06 16:08:32 +01:00
do-configure:
cd ${WRKSRC} && \
${SETENV} ${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
2004-03-06 16:08:32 +01:00
.endif
2004-03-06 16:08:32 +01:00
do-install:
${INSTALL_DATA_DIR} ${LIBEXECDIR}
${INSTALL_DATA_DIR} ${EXAMPLEDIR}
${INSTALL_DATA_DIR} ${DOCDIR}
-${RM} -f ${WRKSRC}/conf/*.orig
.if !empty(PKG_OPTIONS:Msasl)
${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${EXAMPLEDIR}
2004-03-06 16:08:32 +01:00
.endif
${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${EXAMPLEDIR}
${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${EXAMPLEDIR}
${INSTALL_DATA} ${WRKDIR}/mailer.conf ${EXAMPLEDIR}/mailer.conf
cd ${WRKSRC}; ${SH} ./postfix-install -non-interactive \
config_directory="${EXAMPLEDIR}"
2004-03-06 16:08:32 +01:00
.include "../../mk/bsd.pkg.mk"