aboutsummaryrefslogtreecommitdiff
path: root/mail/postfix27/Makefile
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2000-11-14 06:28:58 +0000
committerWill Andrews <will@FreeBSD.org>2000-11-14 06:28:58 +0000
commit6a1b37225e32c4289e7ee279b1dd4797d33d6790 (patch)
tree590b6e84e2571733c16e213e6cce5fc8b78cbe36 /mail/postfix27/Makefile
parenta84e5809ef9baa99d16f255d9cc62a9eded79b9d (diff)
downloadports-6a1b37225e32c4289e7ee279b1dd4797d33d6790.tar.gz
ports-6a1b37225e32c4289e7ee279b1dd4797d33d6790.zip
Notes
Diffstat (limited to 'mail/postfix27/Makefile')
-rw-r--r--mail/postfix27/Makefile219
1 files changed, 138 insertions, 81 deletions
diff --git a/mail/postfix27/Makefile b/mail/postfix27/Makefile
index 0dcea195540d..a481cc275f22 100644
--- a/mail/postfix27/Makefile
+++ b/mail/postfix27/Makefile
@@ -6,109 +6,157 @@
#
PORTNAME= postfix
-PORTVERSION= 19991231.08
+PORTVERSION= 19991231.10
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
- ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
- ftp://ftp.reverse.net/pub/postfix/official/ \
- ftp://postfix.eu.org/pub/postfix/official/ \
- ftp://ftp.sunet.se/pub/unix/mail/postfix/official/ \
+ ftp://ftp.tux.org/pub/net/postfix/official/ \
+ ftp://ftp.utoronto.ca/mirror/packages/postfix/official/ \
+ ftp://ftp.samurai.com/pub/postfix/official/ \
+ ftp://ftp.nl.uu.net/pub/unix/mail/postfix/official/ \
ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/official/ \
- ftp://ftp.postfix.oaktree.co.uk/pub/postfix/official/
-DISTNAME= ${PORTNAME}-19991231-pl08
+ ftp://ftp.mira.net/pub/unix/mail/postfix/official/ \
+ ftp://coda.nctu.edu.tw/network/mail/postfix/official/
+DISTNAME= ${PORTNAME}-19991231-pl10
MAINTAINER= blaz@amis.net
-# WARNING: this is based on a patch submitted by a user and has not been
-# tested. Use it at your own risk !
+.if !defined(DEBUG)
+MAKEFILEFLAGS+= DEBUG=
+.endif
+
+.if defined(CC)
+MAKEFILEFLAGS+= CC="${CC}"
+.endif
+
+MAKEFILEFLAGS+= OPT="${CFLAGS}"
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+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
+
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+
+MAN8= bounce.8 cleanup.8 defer.8 error.8 local.8 master.8 pickup.8 \
+ pipe.8 qmgr.8 showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+CONF1= access aliases canonical main.cf master.cf \
+ relocated transport virtual
+
+CONF2= sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-filter.cf sample-local.cf sample-misc.cf \
+ sample-rate.cf sample-regexp.cf sample-relocated.cf \
+ sample-resource.cf sample-rewrite.cf sample-smtp.cf \
+ sample-smtpd.cf sample-transport.cf sample-virtual.cf
+
+BIN1= bounce cleanup error local master pickup \
+ pipe qmgr showq smtp smtpd trivial-rewrite
+
+BIN2= postalias postcat postconf postdrop postfix \
+ postkick postlock postlog postmap postsuper sendmail
+
.if defined(WITH_MYSQL)
BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
-# WARNING: this is based on a patch submitted by a user and has not been
-# tested. Use it at your own risk !
.if defined(WITH_LDAP)
+CONF2+= sample-ldap.cf
BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
+PLIST_SUB+= WITH_LDAP=""
+.else
+PLIST_SUB+= WITH_LDAP="@comment "
.endif
-ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
+.if defined(WITH_PCRE)
+CONF2+= sample-pcre.cf
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libpcre.a:${PORTSDIR}/devel/pcre
+POSTFIX_CCARGS+= -DHAS_PCRE -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libpcre.a
+PLIST_SUB+= WITH_PCRE=""
+.else
+PLIST_SUB+= WITH_PCRE="@comment "
+.endif
-SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
-MAKE_ENV+= "OPT=${CFLAGS}"
+post-patch:
+ (cd ${WRKSRC} && make -f Makefile.init makefiles ${MAKEFILEFLAGS} \
+ CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}" && \
+ ${ECHO} "all: default" >> Makefile)
-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
-MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
-MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
- showq.8 smtp.8 smtpd.8 trivial-rewrite.8 error.8
-
-SHAREMODE= 0444
-PDOC= ${PREFIX}/share/doc/postfix
+pre-install:
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
- @${MKDIR} -m 755 ${PREFIX}/etc/postfix
- @${CHOWN} root:wheel ${PREFIX}/etc/postfix
- @${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
- ${PREFIX}/etc/postfix/LICENSE
- @for f in access main.cf master.cf ; do \
- ${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
- ${PREFIX}/etc/postfix/sample-$$f ; \
- done
- @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
- sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
- sample-rate.cf sample-relocated.cf sample-resource.cf \
- sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
- sample-transport.cf sample-virtual.cf ; do \
- ${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
- ${PREFIX}/etc/postfix/$$f ;\
- done
- @${INSTALL} -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ @${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 \
${PREFIX}/etc/postfix/postfix-script
- @${MKDIR} -m 0755 ${PREFIX}/libexec/postfix
- @for f in bounce cleanup error local master pickup pipe qmgr \
- showq smtp smtpd trivial-rewrite ; do \
- ${INSTALL} -C -o root -g wheel -m 0755 -s \
- ${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
- done
- @for f in postalias postcat postconf postfix postkick postlock postlog\
- postmap postsuper sendmail smtp-sink smtp-source ; do \
- ${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
- ${PREFIX}/sbin/$$f ;\
- done
- @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
- ${PREFIX}/sbin/postdrop
- @for f in ${MAN1} ; do \
- ${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
- ${PREFIX}/man/man1/$$f ;\
- done
- @for f in ${MAN5} ; do \
- ${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
- ${PREFIX}/man/man5/$$f ;\
- done
- @for f in ${MAN8} ; do \
- ${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
- ${PREFIX}/man/man8/$$f ;\
- done
- @${INSTALL} -d -m 555 -o ${DOCOWN} -g ${DOCGRP} ${PDOC}
- @cd ${WRKSRC} && ${INSTALL_DATA} \
- html/*.html html/*.gif ${PDOC} && \
- ${ECHO_MSG} "Installed HTML documentation in ${PDOC}"
- @${MKDIR} -m 0755 /var/spool/postfix
- @${ECHO_MSG} "--------------------------------------------------"
- @${ECHO_MSG} "- To replace your existing sendmail with postfix -"
- @${ECHO_MSG} "- type \"make replace\" -"
- @${ECHO_MSG} "--------------------------------------------------"
-pre-install:
- @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+.for file in ${BIN1}
+ @${INSTALL_PROGRAM} \
+ ${WRKSRC}/libexec/${file} \
+ ${PREFIX}/libexec/postfix
+.endfor
+
+.for file in ${BIN2}
+ @${INSTALL_PROGRAM} \
+ ${WRKSRC}/${file}/${file} \
+ ${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)
+ @${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${PREFIX}/share/doc/postfix
+ @cd ${WRKSRC} && ${INSTALL_DATA} LDAP_README MYSQL_README ${PREFIX}/share/doc/postfix
+ @${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${PREFIX}/share/doc/postfix/html
+ @cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.gif ${PREFIX}/share/doc/postfix/html && \
+ ${ECHO_MSG} "Installed documentation in ${PREFIX}/share/doc/postfix"
+.endif
+
+ @${ECHO_MSG} '--------------------------------------------------'
+ @${ECHO_MSG} '- To replace your existing sendmail with postfix -'
+ @${ECHO_MSG} '- type "make replace" -'
+ @${ECHO_MSG} '--------------------------------------------------'
post-install:
- @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.pre.mk>
@@ -116,32 +164,41 @@ replace:
.if ${OSVERSION} >= 400014
@${ECHO_MSG} "===> Activating postfix in /etc/mail/mailer.conf"
${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.bak
- ${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
+ ${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
+ ${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
.else
@${ECHO_MSG} "===> Replacing sendmail"
@if [ -e /usr/sbin/sendmail ]; then \
${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
${CHMOD} 0 /usr/sbin/sendmail.OFF; \
fi
+
@if [ -e ${PREFIX}/sbin/sendmail ]; then \
${LN} -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
fi
+
@${ECHO_MSG} "===> Replacing mailq"
@if [ -e /usr/bin/mailq ]; then \
${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
${CHMOD} 0 /usr/bin/mailq.OFF; \
fi
+
@if [ -e ${PREFIX}/sbin/sendmail ]; then \
${LN} -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
fi
+
@${ECHO_MSG} "===> Replacing newaliases"
@if [ -e /usr/bin/newaliases ]; then \
${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
${CHMOD} 0 /usr/bin/newaliases.OFF; \
fi
+
@if [ -e ${PREFIX}/sbin/sendmail ]; then \
${LN} -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
fi