From befbdedefec27347b26752fa343f771079b29e78 Mon Sep 17 00:00:00 2001 From: Wesley Shields 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/postfix27/files/pkg-install.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'mail/postfix27/files') 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 -- cgit v1.2.3