1999-03-29 20:15:09 +00:00
|
|
|
# New ports collection makefile for: postfix
|
2001-03-04 19:35:00 +00:00
|
|
|
# Date created: 18 Mar 1999
|
1999-03-29 20:15:09 +00:00
|
|
|
# Whom: torstenb
|
|
|
|
#
|
1999-08-25 06:51:17 +00:00
|
|
|
# $FreeBSD$
|
1999-03-29 20:15:09 +00:00
|
|
|
#
|
|
|
|
|
2000-04-13 20:01:08 +00:00
|
|
|
PORTNAME= postfix
|
2001-11-15 15:54:22 +00:00
|
|
|
PORTVERSION= 20010228.7
|
2001-03-04 19:35:00 +00:00
|
|
|
CATEGORIES= mail ipv6
|
|
|
|
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \
|
|
|
|
ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/%SUBDIR%/ \
|
2000-11-14 06:28:58 +00:00
|
|
|
ftp://ftp.tux.org/pub/net/postfix/official/ \
|
|
|
|
ftp://ftp.utoronto.ca/mirror/packages/postfix/official/ \
|
|
|
|
ftp://ftp.samurai.com/pub/postfix/official/ \
|
2001-02-05 17:29:38 +00:00
|
|
|
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/postfix/official/&,}
|
2001-03-04 19:35:00 +00:00
|
|
|
MASTER_SITE_SUBDIR= . old related/postfix
|
2001-09-23 02:53:35 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION:S/./-pl0/}
|
2001-03-05 14:21:35 +00:00
|
|
|
DIST_SUBDIR= ${PORTNAME}
|
1999-03-29 20:15:09 +00:00
|
|
|
|
2001-06-17 21:49:56 +00:00
|
|
|
MAINTAINER= dwcjr@FreeBSD.org
|
1999-03-29 20:15:09 +00:00
|
|
|
|
2000-11-14 06:28:58 +00:00
|
|
|
MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
|
|
|
|
postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
|
|
|
|
sendmail.1
|
|
|
|
|
2001-03-04 19:35:00 +00:00
|
|
|
MAN5= access.5 aliases.5 canonical.5 regexp_table.5 relocated.5 \
|
|
|
|
transport.5 virtual.5
|
2000-11-14 06:28:58 +00:00
|
|
|
|
2001-03-04 19:35:00 +00:00
|
|
|
MAN8= bounce.8 cleanup.8 defer.8 error.8 flush.8 lmtp.8 local.8 \
|
|
|
|
master.8 pickup.8 pipe.8 qmgr.8 showq.8 smtp.8 smtpd.8 \
|
|
|
|
spawn.8 trivial-rewrite.8
|
2000-11-14 06:28:58 +00:00
|
|
|
|
|
|
|
CONF1= access aliases canonical main.cf master.cf \
|
2001-03-04 19:35:00 +00:00
|
|
|
regexp_table relocated transport virtual
|
2000-11-14 06:28:58 +00:00
|
|
|
|
|
|
|
CONF2= sample-aliases.cf sample-canonical.cf sample-debug.cf \
|
2001-03-04 19:35:00 +00:00
|
|
|
sample-filter.cf sample-flush.cf sample-local.cf sample-misc.cf \
|
2000-11-14 06:28:58 +00:00
|
|
|
sample-rate.cf sample-regexp.cf sample-relocated.cf \
|
|
|
|
sample-resource.cf sample-rewrite.cf sample-smtp.cf \
|
2001-09-23 17:52:03 +00:00
|
|
|
sample-smtpd.cf sample-transport.cf sample-virtual.cf install.cf
|
2000-11-14 06:28:58 +00:00
|
|
|
|
2001-03-04 19:35:00 +00:00
|
|
|
BIN1= bounce cleanup error flush lmtp local master pickup \
|
|
|
|
pipe qmgr showq smtp smtpd spawn trivial-rewrite
|
2000-11-14 06:28:58 +00:00
|
|
|
|
|
|
|
BIN2= postalias postcat postconf postdrop postfix \
|
|
|
|
postkick postlock postlog postmap postsuper sendmail
|
|
|
|
|
2001-03-04 19:35:00 +00:00
|
|
|
.if defined(NOPORTDOCS)
|
|
|
|
PLIST_SUB+= SUB_DOCS="@comment "
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SUB_DOCS=""
|
|
|
|
DOCDIR= ${PREFIX}/share/doc/postfix
|
2000-01-28 21:07:45 +00:00
|
|
|
.endif
|
|
|
|
|
2001-03-04 19:35:00 +00:00
|
|
|
.if !defined(DEBUG)
|
|
|
|
MAKEFILEFLAGS+= DEBUG=
|
2000-01-28 21:07:45 +00:00
|
|
|
.endif
|
|
|
|
|
2001-03-04 19:35:00 +00:00
|
|
|
.if defined(CC)
|
|
|
|
MAKEFILEFLAGS+= CC="${CC}"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
MAKEFILEFLAGS+= OPT="${CFLAGS}"
|
|
|
|
|
|
|
|
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
|
|
|
|
PREFIX="${PREFIX}" \
|
|
|
|
TOUCH="${TOUCH}" \
|
|
|
|
MKDIR="${MKDIR}" \
|
|
|
|
MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
|
|
|
|
|
|
|
|
pre-fetch:
|
|
|
|
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postfix
|
|
|
|
|
|
|
|
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
|
|
|
|
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
|
2000-11-14 06:28:58 +00:00
|
|
|
.endif
|
2000-01-29 14:13:21 +00:00
|
|
|
|
2001-09-23 17:52:03 +00:00
|
|
|
post-extract:
|
|
|
|
@${CP} ${FILESDIR}/install.cf ${WRKSRC}/conf
|
|
|
|
|
2000-11-14 06:28:58 +00:00
|
|
|
post-patch:
|
2001-03-04 19:35:00 +00:00
|
|
|
(cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \
|
2000-11-14 06:28:58 +00:00
|
|
|
CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}" && \
|
|
|
|
${ECHO} "all: default" >> Makefile)
|
1999-03-29 20:15:09 +00:00
|
|
|
|
2000-11-14 06:28:58 +00:00
|
|
|
pre-install:
|
|
|
|
@PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
1999-05-02 20:26:38 +00:00
|
|
|
|
1999-03-29 20:15:09 +00:00
|
|
|
do-install:
|
2000-11-14 06:28:58 +00:00
|
|
|
@${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 0755 \
|
|
|
|
${PREFIX}/etc/postfix \
|
|
|
|
${PREFIX}/libexec/postfix \
|
|
|
|
/var/spool/postfix
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/conf/LICENSE ${PREFIX}/etc/postfix
|
|
|
|
|
|
|
|
.for file in ${CONF1}
|
|
|
|
@${INSTALL_DATA} \
|
|
|
|
${WRKSRC}/conf/${file} \
|
|
|
|
${PREFIX}/etc/postfix/sample-${file}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for file in ${CONF2}
|
|
|
|
@${INSTALL_DATA} \
|
|
|
|
${WRKSRC}/conf/${file} \
|
|
|
|
${PREFIX}/etc/postfix
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
@${INSTALL_SCRIPT} \
|
|
|
|
${WRKSRC}/conf/postfix-script-sgid \
|
1999-03-29 20:15:09 +00:00
|
|
|
${PREFIX}/etc/postfix/postfix-script
|
|
|
|
|
2000-11-14 06:28:58 +00:00
|
|
|
.for file in ${BIN1}
|
|
|
|
@${INSTALL_PROGRAM} \
|
|
|
|
${WRKSRC}/libexec/${file} \
|
|
|
|
${PREFIX}/libexec/postfix
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for file in ${BIN2}
|
|
|
|
@${INSTALL_PROGRAM} \
|
2001-03-04 19:35:00 +00:00
|
|
|
${WRKSRC}/src/${file}/${file} \
|
|
|
|
${PREFIX}/sbin
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for file in ${BIN3}
|
|
|
|
@${INSTALL_PROGRAM} \
|
|
|
|
${WRKSRC}/src/smtpstone/${file} \
|
2000-11-14 06:28:58 +00:00
|
|
|
${PREFIX}/sbin
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for file in ${MAN1}
|
|
|
|
@${INSTALL_MAN} \
|
|
|
|
${WRKSRC}/man/man1/${file} \
|
|
|
|
${PREFIX}/man/man1
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for file in ${MAN5}
|
|
|
|
@${INSTALL_MAN} \
|
|
|
|
${WRKSRC}/man/man5/${file} \
|
|
|
|
${PREFIX}/man/man5
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for file in ${MAN8}
|
|
|
|
@${INSTALL_MAN} \
|
|
|
|
${WRKSRC}/man/man8/${file} \
|
|
|
|
${PREFIX}/man/man8
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.if !defined(NOPORTDOCS)
|
2001-03-04 19:35:00 +00:00
|
|
|
@${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${DOCDIR}
|
|
|
|
@cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.gif ${DOCDIR} && \
|
|
|
|
${ECHO_MSG} "Installed HTML documentation in ${DOCDIR}"
|
2000-11-14 06:28:58 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
@${ECHO_MSG} '--------------------------------------------------'
|
|
|
|
@${ECHO_MSG} '- To replace your existing sendmail with postfix -'
|
|
|
|
@${ECHO_MSG} '- type "make replace" -'
|
|
|
|
@${ECHO_MSG} '--------------------------------------------------'
|
2000-02-13 20:17:43 +00:00
|
|
|
|
1999-03-29 20:15:09 +00:00
|
|
|
post-install:
|
2000-11-14 06:28:58 +00:00
|
|
|
@PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
1999-03-29 20:15:09 +00:00
|
|
|
|
2001-03-04 19:35:00 +00:00
|
|
|
post-clean:
|
|
|
|
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
|
|
|
|
|
2000-04-03 01:54:16 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
1999-03-29 20:15:09 +00:00
|
|
|
replace:
|
2000-04-03 01:54:16 +00:00
|
|
|
.if ${OSVERSION} >= 400014
|
|
|
|
@${ECHO_MSG} "===> Activating postfix in /etc/mail/mailer.conf"
|
|
|
|
${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.bak
|
2000-11-14 06:28:58 +00:00
|
|
|
${ECHO} "#" > /etc/mail/mailer.conf
|
|
|
|
${ECHO} -n "# Execute the Postfix sendmail program" >> /etc/mail/mailer.conf
|
|
|
|
${ECHO} ", named ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
|
|
|
|
${ECHO} "#" >> /etc/mail/mailer.conf
|
2001-03-04 19:35:00 +00:00
|
|
|
${ECHO} "sendmail ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
|
|
|
|
${ECHO} "send-mail ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
|
|
|
|
${ECHO} "mailq ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
|
|
|
|
${ECHO} "newaliases ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
|
2000-04-03 01:54:16 +00:00
|
|
|
.else
|
1999-05-02 20:26:38 +00:00
|
|
|
@${ECHO_MSG} "===> Replacing sendmail"
|
1999-03-29 20:15:09 +00:00
|
|
|
@if [ -e /usr/sbin/sendmail ]; then \
|
|
|
|
${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
|
1999-08-22 19:01:07 +00:00
|
|
|
${CHMOD} 0 /usr/sbin/sendmail.OFF; \
|
1999-03-29 20:15:09 +00:00
|
|
|
fi
|
2000-11-14 06:28:58 +00:00
|
|
|
|
1999-03-29 20:15:09 +00:00
|
|
|
@if [ -e ${PREFIX}/sbin/sendmail ]; then \
|
1999-05-02 20:26:38 +00:00
|
|
|
${LN} -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
|
1999-03-29 20:15:09 +00:00
|
|
|
fi
|
2000-11-14 06:28:58 +00:00
|
|
|
|
1999-05-02 20:26:38 +00:00
|
|
|
@${ECHO_MSG} "===> Replacing mailq"
|
1999-03-29 20:15:09 +00:00
|
|
|
@if [ -e /usr/bin/mailq ]; then \
|
|
|
|
${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
|
1999-08-22 19:01:07 +00:00
|
|
|
${CHMOD} 0 /usr/bin/mailq.OFF; \
|
1999-03-29 20:15:09 +00:00
|
|
|
fi
|
2000-11-14 06:28:58 +00:00
|
|
|
|
1999-03-29 20:15:09 +00:00
|
|
|
@if [ -e ${PREFIX}/sbin/sendmail ]; then \
|
1999-05-02 20:26:38 +00:00
|
|
|
${LN} -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
|
1999-03-29 20:15:09 +00:00
|
|
|
fi
|
2000-11-14 06:28:58 +00:00
|
|
|
|
1999-05-02 20:26:38 +00:00
|
|
|
@${ECHO_MSG} "===> Replacing newaliases"
|
1999-03-29 20:15:09 +00:00
|
|
|
@if [ -e /usr/bin/newaliases ]; then \
|
|
|
|
${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
|
1999-08-22 19:01:07 +00:00
|
|
|
${CHMOD} 0 /usr/bin/newaliases.OFF; \
|
1999-03-29 20:15:09 +00:00
|
|
|
fi
|
2000-11-14 06:28:58 +00:00
|
|
|
|
1999-03-29 20:15:09 +00:00
|
|
|
@if [ -e ${PREFIX}/sbin/sendmail ]; then \
|
1999-05-02 20:26:38 +00:00
|
|
|
${LN} -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
|
1999-03-29 20:15:09 +00:00
|
|
|
fi
|
2000-04-03 01:54:16 +00:00
|
|
|
.endif
|
1999-03-29 20:15:09 +00:00
|
|
|
|
2000-04-03 01:54:16 +00:00
|
|
|
.include <bsd.port.post.mk>
|