pkgsrc/mail/courier-mta/Makefile

114 lines
3.8 KiB
Makefile
Raw Normal View History

2021-05-24 21:49:01 +02:00
# $NetBSD: Makefile,v 1.61 2021/05/24 19:52:39 wiz Exp $
DISTNAME= courier-${COURIER_VERSION}
PKGNAME= ${DISTNAME:S/-/-mta-/}
2021-05-24 21:49:01 +02:00
PKGREVISION= 17
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/}
EXTRACT_SUFX= .tar.bz2
CONFLICTS+= esmtp>=1.2 postfix-[0-9]* qmail-[0-9]* sendmail-[0-9]*
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Courier mail transport agent
HOMEPAGE= https://www.courier-mta.org/
DEPENDS+= courier-maildir>=${COURIER_VERSION}:../../mail/courier-maildir
DEPENDS+= couriertcpd>=${COURIER_VERSION}:../../net/couriertcpd
DEPENDS+= maildrop>=2.5.0:../../mail/maildrop
USE_TOOLS+= gmake perl:run
USE_LANGUAGES= c c++
GCC_REQD+= 3.0 # need Standard C++ Library
.include "Makefile.common"
PLIST_SRC+= ${PKGDIR}/PLIST
.include "pkginstall.mk"
.include "options.mk"
2016-02-25 16:00:50 +01:00
CONFIGURE_ARGS.NetBSD+= ac_cv_path_REHASH=${FALSE:Q}
USERGROUP_PHASE= configure
CONFIGURE_ENV+= CERTTOOL=${COURIER_CERTTOOL:Q}
CONFIGURE_ENV+= OPENSSL=${COURIER_OPENSSL:Q}
CONFIGURE_ENV+= PROCMAIL=${PREFIX}/bin/procmail
CONFIGURE_ARGS+= --datadir=${DATADIR}
CONFIGURE_ARGS+= --with-mailuid=${PKG_UID.${COURIER_USER}}
CONFIGURE_ARGS+= --with-mailgid=${PKG_GID.${COURIER_GROUP}}
CONFIGURE_ARGS+= --with-paranoid-smtpext
CONFIGURE_ARGS+= --with-piddir=${COURIER_STATEDIR}/tmp
CONFIGURE_ARGS+= --with-transport=${COURIER_TRANSPORTS:M*:Q}
#CONFIGURE_ARGS+= --with-certdb=${SSLCERTS}
# This argument is actually here just to make the "webmail" configure
# script work. The value is not actually used since in reality, we are
# using the sqwebmail package to provide the Courier webmail component.
CONFIGURE_ARGS+= --enable-mimetypes=/nonexistent
INSTALL_DIRS= webadmin courier
INSTALL_AM_MAKEFLAGS+= sysconfdir=${EGDIR:Q}
INSTALL_AM_MAKEFLAGS+= htmldocdir=${DOCDIR:Q}
INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} AM_MAKEFLAGS=${INSTALL_AM_MAKEFLAGS:Q}
SUBST_CLASSES+= courier
SUBST_FILES.courier= \
courier/doc/mkesmtpdcert.html.in \
courier/filters/courierfilter.8.in \
courier/filters/courierfilter.html.in \
courier/module.esmtp/esmtpd-msa.dist.in \
courier/module.esmtp/esmtpd-ssl.dist.in \
courier/module.esmtp/esmtpd.cnf.openssl.in \
courier/module.esmtp/esmtpd.dist.in \
courier/module.esmtp/mkesmtpdcert.in
SUBST_SED.courier= -e "s|^ESMTPDSTART=.*|ESMTPDSTART=YES|g"
SUBST_SED.courier+= -e "s|^ESMTPDSSLSTART=.*|ESMTPDSSLSTART=YES|g"
SUBST_SED.courier+= -e "s|@mydatadir@|@sysconfdir@|g"
SUBST_SED.courier+= -e "s|@datadir@/esmtpd.pem|@sysconfdir@/esmtpd.pem|g"
SUBST_SED.courier+= -e "s|@datadir@/esmtpd.rand|@sysconfdir@/esmtpd.rand|g"
SUBST_SED.courier+= -e "s|@libexecdir@/filters|@libexecdir@/courier/filters|g"
SUBST_STAGE.courier= pre-configure
SUBST_CLASSES+= perms
SUBST_FILES.perms= courier/perms.sh.in
Changes 0.68.1: * rfc2045mkboundary.c was broken in 0.68 Changes 0.68: * rfc2045/rfc2045mkboundary.c (rfc2045_mk_boundary): truncate the hostname portion of the boundary to 30 chars. * courier/doc/courier.sgml: Remove descriptions of some configuration files that were moved to the courier-authlib package a while ago. They don't belong here any more. * courier/submit.C: Use the authenticated address, instead of the return address, for domain-based virtual configuration. * courier/libs/cfilename.c (config_has_vhost): Checks whether vhost.[ip] exists. * courier/module.esmtp/courieresmtpd.c (main): Only set a message's virtual host if vhost.[ip] exists. * courier/module.esmtp/esmtpclient.c (get_sourceaddr): Make sure the input buffer is null-terminated. * courier/submit.C (getrcpts): If there's no vhost setting from the sender's IP address (this includes local mail!) if vhost.domain exists, use [domain] as the virtual host. * Remove config_search(), which simply called config_localfilename(). Change all current callers to call config_localfilename(). * courier/libs/cfilename.c (config_set_local_vhost): saves a string that gets appended as a suffix, by config_localfilename(), and if that filename exists, that's returned as the filename, otherwise it's the original string without the suffix. config_get_local_vhost() returns the suffix string. to config_set_local_vhost(). * courier/libs/comsubmitclient.c (submit_fork): If config_get_local_vhost(), add a -vhost parameter to submit(). * courier/submit.C (cppmain): -vhost sets config_set_local_vhost(). * courier/submit2.C (closectl): New COMCTLFILE_VHOST parameter in the config file, taken from the vhost setting. * courier/libs/comctlfile.c (ctlfile_setvhost): If COMCTLFILE_VHOST is set, call ctlfile_setvhost(), return an indication if the vhost has changed. Absence of a COMCTLFILE_VHOST treated as a discrete "(null)" setting. * courier/module.esmtp/esmtpclient.c (esmtpchild): If ctlfile_setvhost() then disconnect the current socket, if one is open. * courier/module.esmtp/esmtpclient.c (get_sourceaddr): The IP address specified in ipout or ip6out overrides SOURCE_ADDRESS and SOURCE_ADDRESS_IPV6 environment variable. * courier/module.local/localmail.c (main): Call ctlfile_setvhost(). * courier/module.uucp/uucp.c (uux): Call ctlfile_setvhost(). * courier/module.dsn/dsn.c (main): Call ctlfile_setvhost(). * liblock/mail.c (dotlock_exists): Quell a compiler warning. * courier/courierd.dist.in SOURCE_ADDRESS: Add a note that this setting is deprecated.
2012-06-09 13:45:38 +02:00
SUBST_SED.perms= -e "s,@REAL_ROOT_USER@,"${REAL_ROOT_USER}",g" \
-e "s,@ROOT_USER@,"${ROOT_USER}",g" \
-e "s,@ROOT_GROUP@,"${ROOT_GROUP}",g"
SUBST_STAGE.perms= pre-configure
SUBST_CLASSES+= paths
SUBST_FILES.paths= ${WRKDIR}/mailer.conf
SUBST_VARS.paths= PREFIX
SUBST_STAGE.paths= pre-configure
2007-07-28 03:37:23 +02:00
REPLACE_PERL+= courier/webadmin/*.pl courier/webadmin/*.pl.in webadmin/*.pl
SPECIAL_PERMS+= ${DATADIR}/filterctl ${COURIER_USER} ${COURIER_GROUP} 0500
SPECIAL_PERMS+= ${PREFIX}/sbin/courierfilter ${COURIER_USER} \
${COURIER_GROUP} 0500
.include "../../lang/perl5/buildlink3.mk"
.include "../../security/courier-authlib/buildlink3.mk"
post-extract:
${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
2020-04-17 02:22:28 +02:00
pre-build:
${RM} -f ${WRKSRC}/version
post-build:
${TOUCH} ${WRKDIR}/locallowercase
post-install:
cd ${WRKSRC}/courier && \
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} \
DESTDIR=${DESTDIR} install-permissions
${INSTALL_DATA} ${WRKDIR}/mailer.conf ${DESTDIR}${EGDIR}
${INSTALL_DATA} ${WRKDIR}/locallowercase \
${DESTDIR}${EGDIR}/locallowercase
.include "../../mk/bsd.pkg.mk"