aboutsummaryrefslogtreecommitdiffstats
path: root/mail/postfix27
diff options
context:
space:
mode:
authorwxs <wxs@FreeBSD.org>2009-06-11 09:42:24 +0800
committerwxs <wxs@FreeBSD.org>2009-06-11 09:42:24 +0800
commitd9f7236bfa1334a8570fb5e63505cb0bcad3e560 (patch)
treecf00fe63c5d185888d7e328c21b3d1c75319db11 /mail/postfix27
parentbf5c155d3f23ff72c9661907bec7cb571c43cff7 (diff)
downloadfreebsd-ports-gnome-d9f7236bfa1334a8570fb5e63505cb0bcad3e560.tar.gz
freebsd-ports-gnome-d9f7236bfa1334a8570fb5e63505cb0bcad3e560.tar.zst
freebsd-ports-gnome-d9f7236bfa1334a8570fb5e63505cb0bcad3e560.zip
- Cleanup pkg-install script to handle documentation installation correctly.
This resulted in a bizarre case where making a backup package after an upgrade would fail (ports/135051). - Don't install obsolete files by adding them to ${WRKSRC}/conf/postfix-files. - Whitespace cleanup. - Define and pass DAEMONDIR to the pkg-install script. PR: ports/135051 Submitted by: Takefu Kenji <takefu@airport.fm>, Yarema <yds@CoolRat.org> Approved by: sahil@tandon.net (maintainer)
Diffstat (limited to 'mail/postfix27')
-rw-r--r--mail/postfix27/Makefile32
-rw-r--r--mail/postfix27/files/pkg-install.in14
-rw-r--r--mail/postfix27/pkg-plist1
3 files changed, 34 insertions, 13 deletions
diff --git a/mail/postfix27/Makefile b/mail/postfix27/Makefile
index 1bae4b6b7938..9aa8a6de1e5d 100644
--- a/mail/postfix27/Makefile
+++ b/mail/postfix27/Makefile
@@ -7,6 +7,7 @@
PORTNAME= postfix
PORTVERSION= 2.6.2
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \
@@ -77,6 +78,9 @@ MLINKS= sendmail.1 mailq.1 \
bounce.8 trace.8 \
smtp.8 lmtp.8
+HTML1= SOHO_README.html body_checks.5.html bounce.5.html postfix-power.png \
+ scache.8.html tlsmgr.8.html
+
.if !defined(DEBUG)
MAKEFILEFLAGS+= DEBUG=
.endif
@@ -86,7 +90,7 @@ MAKEFILEFLAGS+= CC="${CC}" OPT="${CFLAGS}"
.include <bsd.port.pre.mk>
POSTFIX_CCARGS+= -DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \
- -DDEF_DAEMON_DIR=\\\"${PREFIX}/libexec/postfix\\\" \
+ -DDEF_DAEMON_DIR=\\\"${DAEMONDIR}\\\" \
-DDEF_COMMAND_DIR=\\\"${PREFIX}/sbin\\\" \
-DDEF_SENDMAIL_PATH=\\\"${PREFIX}/sbin/sendmail\\\" \
-DDEF_NEWALIAS_PATH=\\\"${PREFIX}/bin/newaliases\\\" \
@@ -211,12 +215,14 @@ PLIST_SUB+= TEST="@comment "
.endif
.if defined(NOPORTDOCS)
-READMEDIR=no
+READMEDIR= no
.else
-READMEDIR=${DOCSDIR}
+READMEDIR= ${DOCSDIR}
.endif
-SUB_LIST+= REQUIRE="${_REQUIRE}" READMEDIR="${READMEDIR}"
+DAEMONDIR= ${PREFIX}/libexec/postfix
+
+SUB_LIST+= REQUIRE="${_REQUIRE}" READMEDIR="${READMEDIR}" DAEMONDIR="${DAEMONDIR}"
SUB_FILES+= pkg-install pkg-message
# sed script for files in ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man
@@ -274,6 +280,12 @@ pre-patch:
${REINPLACE_CMD} -E -e '${REINPLACE}'
post-patch:
+ @${ECHO} '$$readme_directory/SOHO_README:f:root:-:644' \
+ >> ${WRKSRC}/conf/postfix-files
+.for f in ${HTML1}
+ @${ECHO} '$$html_directory/$f:f:root:-:644' \
+ >> ${WRKSRC}/conf/postfix-files
+.endfor
.if defined(WITH_VDA)
@${ECHO} '$$readme_directory/VDA_README:f:root:-:644' \
>> ${WRKSRC}/conf/postfix-files
@@ -290,7 +302,10 @@ pre-su-install:
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
- @cd ${WRKSRC} && ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp
+ @cd ${WRKSRC} && ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \
+ daemon_directory=${DAEMONDIR} \
+ html_directory=${READMEDIR} \
+ readme_directory=${READMEDIR}
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${PREFIX}/bin/rmail
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${PREFIX}/bin/qshape
${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 ${MANPREFIX}/man/man1
@@ -300,16 +315,11 @@ do-install:
.for f in ${MANTEST}
${INSTALL_MAN} ${WRKSRC}/man/man1/${f} ${MANPREFIX}/man/man1
.endfor
-.if !defined(NOPORTDOCS)
- ${INSTALL} -o ${DOCOWN} -g ${DOCGRP} -m 555 -d ${DOCSDIR}
- @cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.jpg *.png ${DOCSDIR} && \
- ${ECHO_MSG} "Installed HTML documentation in ${DOCSDIR}"
-.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
# Fix compressed man pages
- @${REINPLACE_CMD} -i '' -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${PREFIX}/libexec/postfix/postfix-files
+ @${REINPLACE_CMD} -i '' -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${DAEMONDIR}/postfix-files
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/mail/postfix27/files/pkg-install.in b/mail/postfix27/files/pkg-install.in
index e700453e617f..eb5129c70ce9 100644
--- a/mail/postfix27/files/pkg-install.in
+++ b/mail/postfix27/files/pkg-install.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/mail/postfix27/files/pkg-install.in,v 1.2 2009-06-04 07:45:27 mm Exp $
+# $FreeBSD: /tmp/pcvs/ports/mail/postfix27/files/pkg-install.in,v 1.3 2009-06-11 01:42:24 wxs Exp $
#
# If the POSTFIX_DEFAULT_MTA environment variable is set to YES, it
@@ -9,7 +9,7 @@
PREFIX=${PKG_PREFIX:=%%PREFIX%%}
ETCDIR=${ETCDIR:=%%ETCDIR%%}
-DAEMONDIR=${DAEMONDIR:=${PREFIX}/libexec/postfix}
+DAEMONDIR=${DAEMONDIR:=%%DAEMONDIR%%}
READMEDIR=${READMEDIR:=%%READMEDIR%%}
BATCH=${BATCH:=no}
POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no}
@@ -114,8 +114,18 @@ if [ "$2" = "PRE-INSTALL" ]; then
fi
if [ "$2" = "POST-INSTALL" ]; then
+ SAMPLES="main.cf master.cf"
+ for file in $SAMPLES
+ do
+ if [ ! -f ${ETCDIR}/$file ]; then
+ cp ${DAEMONDIR}/$file ${ETCDIR}/
+ fi
+ done
+
/bin/sh ${DAEMONDIR}/post-install tempdir=/tmp \
daemon_directory=${DAEMONDIR} \
+ html_directory=${READMEDIR} \
+ readme_directory=${READMEDIR} \
upgrade-package
fi
diff --git a/mail/postfix27/pkg-plist b/mail/postfix27/pkg-plist
index 298ef69caf43..8fb4a369b2c8 100644
--- a/mail/postfix27/pkg-plist
+++ b/mail/postfix27/pkg-plist
@@ -136,6 +136,7 @@ sbin/sendmail
%%PORTDOCS%%%%DOCSDIR%%/SMTPD_POLICY_README.html
%%PORTDOCS%%%%DOCSDIR%%/SMTPD_PROXY_README
%%PORTDOCS%%%%DOCSDIR%%/SMTPD_PROXY_README.html
+%%PORTDOCS%%%%DOCSDIR%%/SOHO_README
%%PORTDOCS%%%%DOCSDIR%%/SOHO_README.html
%%PORTDOCS%%%%DOCSDIR%%/STANDARD_CONFIGURATION_README
%%PORTDOCS%%%%DOCSDIR%%/STANDARD_CONFIGURATION_README.html