2017-12-09 03:35:52 +01:00
|
|
|
# $NetBSD: Makefile,v 1.300 2017/12/09 02:35:52 taca Exp $
|
2015-09-07 11:47:01 +02:00
|
|
|
|
|
|
|
.include "../../mail/postfix/Makefile.common"
|
|
|
|
|
2001-12-01 13:24:23 +01:00
|
|
|
COMMENT= Postfix SMTP server and tools
|
2001-03-20 14:02:04 +01:00
|
|
|
|
2006-05-01 04:57:03 +02:00
|
|
|
CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]*
|
2012-09-09 20:47:48 +02:00
|
|
|
CONFLICTS+= esmtp>=1.2 nullmailer-[0-9]*
|
2004-03-07 11:16:05 +01:00
|
|
|
|
2006-02-27 14:22:55 +01:00
|
|
|
USE_TOOLS+= perl
|
2003-02-01 00:53:04 +01:00
|
|
|
|
2016-10-28 18:10:51 +02:00
|
|
|
SPECIAL_PERMS+= sbin/postdrop ${POSTFIX_USER} ${MAILDROP_GROUP} 2555
|
|
|
|
SPECIAL_PERMS+= sbin/postqueue ${POSTFIX_USER} ${MAILDROP_GROUP} 2555
|
2009-05-20 09:46:09 +02:00
|
|
|
|
2006-02-27 08:10:59 +01:00
|
|
|
REPLACE_PERL+= auxiliary/qshape/qshape.pl
|
|
|
|
|
2004-08-05 05:04:33 +02:00
|
|
|
# options.mk appends to CCARGS and AUXLIBS the options needed to build
|
|
|
|
# Postfix with support for various add-on modules.
|
2004-07-19 21:59:16 +02:00
|
|
|
#
|
2004-08-05 05:04:33 +02:00
|
|
|
.include "options.mk"
|
2003-05-21 11:24:00 +02:00
|
|
|
|
2008-07-29 07:14:15 +02:00
|
|
|
FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
|
2004-07-19 21:59:16 +02:00
|
|
|
MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
|
2004-07-20 00:10:52 +02:00
|
|
|
MESSAGE_SUBST+= DOCDIR=${DOCDIR}
|
2003-01-14 14:05:14 +01:00
|
|
|
|
2004-07-19 21:59:16 +02:00
|
|
|
MESSAGE_SRC+= ${PKGDIR}/MESSAGE
|
|
|
|
.if exists(${PKGDIR}/MESSAGE.${OPSYS})
|
|
|
|
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
|
2002-11-26 08:20:06 +01:00
|
|
|
.endif
|
2004-07-19 21:59:16 +02:00
|
|
|
PLIST_SRC+= ${PKGDIR}/PLIST
|
2002-11-26 08:20:06 +01:00
|
|
|
|
2004-07-19 21:59:16 +02:00
|
|
|
RCD_SCRIPTS= postfix
|
2005-12-31 16:16:18 +01:00
|
|
|
OWN_DIRS+= ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc
|
2016-10-28 18:10:51 +02:00
|
|
|
OWN_DIRS_PERMS+= ${POSTFIX_DATA_DIR} ${POSTFIX_USER} ${POSTFIX_GROUP} 0700
|
2015-09-07 11:47:01 +02:00
|
|
|
MAKE_DIRS+= ${METADIR}/dynamicmaps.cf.d ${METADIR}/postfix-files.d
|
2002-11-26 08:20:06 +01:00
|
|
|
|
2016-10-28 18:10:51 +02:00
|
|
|
PKG_GROUPS?= ${POSTFIX_GROUP} ${MAILDROP_GROUP}
|
|
|
|
PKG_USERS?= ${POSTFIX_USER}:${POSTFIX_GROUP}
|
|
|
|
|
|
|
|
PKG_GECOS.${POSTFIX_USER}= Postfix User
|
|
|
|
PKG_HOME.${POSTFIX_USER}= ${POSTFIX_QUEUE_DIR}
|
2002-07-22 12:39:26 +02:00
|
|
|
|
2004-07-20 00:04:40 +02:00
|
|
|
CONF_FILES= # empty
|
2009-05-13 12:33:23 +02:00
|
|
|
.for i in main.cf master.cf
|
2006-10-16 13:03:07 +02:00
|
|
|
CONF_FILES+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i}
|
2004-07-20 00:04:40 +02:00
|
|
|
.endfor
|
|
|
|
CONF_FILES_PERMS= # empty
|
2003-05-01 16:07:56 +02:00
|
|
|
|
2006-01-10 21:31:00 +01:00
|
|
|
SUBST_CLASSES+= paths
|
|
|
|
SUBST_FILES.paths= ${WRKDIR}/mailer.conf
|
|
|
|
SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
|
|
|
|
SUBST_STAGE.paths= post-patch
|
|
|
|
|
2015-09-07 11:47:01 +02:00
|
|
|
INSTALLATION_DIRS+= ${LIBEXECDIR} ${METADIR} ${SHLIBDIR} ${EXAMPLEDIR} ${DOCDIR}
|
2009-08-09 23:15:31 +02:00
|
|
|
|
2006-01-10 21:31:00 +01:00
|
|
|
post-extract:
|
2006-10-16 12:43:32 +02:00
|
|
|
cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
|
2006-10-18 11:26:53 +02:00
|
|
|
rm -f ${WRKSRC}/auxiliary/MacOSX/Postfix.StartupItem/Postfix
|
2006-01-10 21:31:00 +01:00
|
|
|
|
2001-03-20 14:02:04 +01:00
|
|
|
post-build:
|
2004-07-30 23:05:41 +02:00
|
|
|
.if !empty(PKG_OPTIONS:Msasl)
|
2004-07-19 21:59:16 +02:00
|
|
|
${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf
|
|
|
|
.endif
|
2001-03-20 14:02:04 +01:00
|
|
|
|
2004-07-19 21:59:16 +02:00
|
|
|
do-install:
|
2006-10-16 12:43:32 +02:00
|
|
|
rm -f ${WRKSRC}/conf/*.orig
|
2004-07-30 23:05:41 +02:00
|
|
|
.if !empty(PKG_OPTIONS:Msasl)
|
2009-08-09 23:15:31 +02:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${DESTDIR}${EXAMPLEDIR}
|
2003-11-26 07:03:41 +01:00
|
|
|
.endif
|
2017-04-11 11:33:30 +02:00
|
|
|
cd ${WRKSRC} && ${SH} ./postfix-install -non-interactive \
|
2009-08-09 23:15:31 +02:00
|
|
|
${DESTDIR_INSTALLOPTIONS} config_directory="${EXAMPLEDIR}"
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/mailer.conf \
|
|
|
|
${DESTDIR}${EXAMPLEDIR}/mailer.conf
|
2006-02-27 08:10:59 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl \
|
2009-08-09 23:15:31 +02:00
|
|
|
${DESTDIR}${PREFIX}/sbin/qshape
|
2007-05-30 09:56:27 +02:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 \
|
2009-08-09 23:15:31 +02:00
|
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
|
2001-03-20 14:02:04 +01:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|