From d9f7236bfa1334a8570fb5e63505cb0bcad3e560 Mon Sep 17 00:00:00 2001 From: wxs Date: Thu, 11 Jun 2009 01:42:24 +0000 Subject: - 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 , Yarema Approved by: sahil@tandon.net (maintainer) --- mail/postfix/Makefile | 32 +++++++++++++++++++++----------- mail/postfix/files/pkg-install.in | 14 ++++++++++++-- mail/postfix/pkg-plist | 1 + mail/postfix25/Makefile | 32 +++++++++++++++++++++----------- mail/postfix25/files/pkg-install.in | 14 ++++++++++++-- mail/postfix25/pkg-plist | 1 + mail/postfix26/Makefile | 32 +++++++++++++++++++++----------- mail/postfix26/files/pkg-install.in | 14 ++++++++++++-- mail/postfix26/pkg-plist | 1 + mail/postfix27/Makefile | 32 +++++++++++++++++++++----------- mail/postfix27/files/pkg-install.in | 14 ++++++++++++-- mail/postfix27/pkg-plist | 1 + mail/postfix28/Makefile | 32 +++++++++++++++++++++----------- mail/postfix28/files/pkg-install.in | 14 ++++++++++++-- mail/postfix28/pkg-plist | 1 + 15 files changed, 170 insertions(+), 65 deletions(-) (limited to 'mail') diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index 1bae4b6b7938..9aa8a6de1e5d 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/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 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 diff --git a/mail/postfix/files/pkg-install.in b/mail/postfix/files/pkg-install.in index f26f5dbcf002..f69931e37b4e 100644 --- a/mail/postfix/files/pkg-install.in +++ b/mail/postfix/files/pkg-install.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/postfix/files/pkg-install.in,v 1.2 2009-06-04 07:45:27 mm Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/postfix/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/postfix/pkg-plist b/mail/postfix/pkg-plist index 298ef69caf43..8fb4a369b2c8 100644 --- a/mail/postfix/pkg-plist +++ b/mail/postfix/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 diff --git a/mail/postfix25/Makefile b/mail/postfix25/Makefile index 1bae4b6b7938..9aa8a6de1e5d 100644 --- a/mail/postfix25/Makefile +++ b/mail/postfix25/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 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 diff --git a/mail/postfix25/files/pkg-install.in b/mail/postfix25/files/pkg-install.in index 9abb7340da66..9f75b2d3bd42 100644 --- a/mail/postfix25/files/pkg-install.in +++ b/mail/postfix25/files/pkg-install.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/postfix25/files/Attic/pkg-install.in,v 1.2 2009-06-04 07:45:27 mm Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/postfix25/files/Attic/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/postfix25/pkg-plist b/mail/postfix25/pkg-plist index 298ef69caf43..8fb4a369b2c8 100644 --- a/mail/postfix25/pkg-plist +++ b/mail/postfix25/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 diff --git a/mail/postfix26/Makefile b/mail/postfix26/Makefile index 1bae4b6b7938..9aa8a6de1e5d 100644 --- a/mail/postfix26/Makefile +++ b/mail/postfix26/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 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 diff --git a/mail/postfix26/files/pkg-install.in b/mail/postfix26/files/pkg-install.in index bf9002fa2198..44935a0cdca6 100644 --- a/mail/postfix26/files/pkg-install.in +++ b/mail/postfix26/files/pkg-install.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/postfix26/files/pkg-install.in,v 1.2 2009-06-04 07:45:27 mm Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/postfix26/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/postfix26/pkg-plist b/mail/postfix26/pkg-plist index 298ef69caf43..8fb4a369b2c8 100644 --- a/mail/postfix26/pkg-plist +++ b/mail/postfix26/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 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 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 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 diff --git a/mail/postfix28/Makefile b/mail/postfix28/Makefile index 1bae4b6b7938..9aa8a6de1e5d 100644 --- a/mail/postfix28/Makefile +++ b/mail/postfix28/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 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 diff --git a/mail/postfix28/files/pkg-install.in b/mail/postfix28/files/pkg-install.in index f23dd9aaf902..59fbdd8f48b0 100644 --- a/mail/postfix28/files/pkg-install.in +++ b/mail/postfix28/files/pkg-install.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/postfix28/files/pkg-install.in,v 1.2 2009-06-04 07:45:27 mm Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/postfix28/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/postfix28/pkg-plist b/mail/postfix28/pkg-plist index 298ef69caf43..8fb4a369b2c8 100644 --- a/mail/postfix28/pkg-plist +++ b/mail/postfix28/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 -- cgit