summaryrefslogtreecommitdiff
path: root/mail/postfix-current
diff options
context:
space:
mode:
authorDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2002-02-11 17:46:31 +0000
committerDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2002-02-11 17:46:31 +0000
commit6780341a68ec3d708f8e75af5f53a9c972725f67 (patch)
tree6ed96a063f2ac421e1d9d1f4bf0f662d58cec04d /mail/postfix-current
parentDepend on correct port. Therefore, bump PORTREVISION (diff)
Fix installation of config files as to not overwrite current ones
PR: 34618 Submitted by: maintainer
Diffstat (limited to 'mail/postfix-current')
-rw-r--r--mail/postfix-current/Makefile14
-rw-r--r--mail/postfix-current/pkg-install15
-rw-r--r--mail/postfix-current/pkg-plist24
3 files changed, 33 insertions, 20 deletions
diff --git a/mail/postfix-current/Makefile b/mail/postfix-current/Makefile
index fb7c5e7a3bc1..0e7d713c2755 100644
--- a/mail/postfix-current/Makefile
+++ b/mail/postfix-current/Makefile
@@ -7,7 +7,7 @@
PORTNAME= postfix
PORTVERSION= 20020115
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/ \
ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/%SUBDIR%/ \
@@ -34,6 +34,9 @@ MAN8= bounce.8 cleanup.8 defer.8 error.8 flush.8 lmtp.8 local.8 \
NO_LATEST_LINK= yes
+CONF1= main.cf master.cf access aliases canonical pcre_table regexp_table \
+ relocated transport virtual
+
.if !defined(DEBUG)
MAKEFILEFLAGS+= DEBUG=
.endif
@@ -80,11 +83,10 @@ do-install:
sample_directory=${PREFIX}/etc/postfix \
readme_directory=${READMEDIR}
- @${INSTALL_DATA} ${WRKSRC}/conf/main.cf \
- ${PREFIX}/etc/postfix/sample-main.cf
-
- @${INSTALL_DATA} ${WRKSRC}/conf/master.cf \
- ${PREFIX}/etc/postfix/sample-master.cf
+.for file in ${CONF1}
+ ${INSTALL_DATA} ${WRKSRC}/conf/${file} \
+ ${PREFIX}/etc/postfix/sample-${file}
+.endfor
@${INSTALL_SCRIPT} \
${WRKSRC}/auxiliary/rmail/rmail \
diff --git a/mail/postfix-current/pkg-install b/mail/postfix-current/pkg-install
index 2e4266564c2b..24bdf1d98728 100644
--- a/mail/postfix-current/pkg-install
+++ b/mail/postfix-current/pkg-install
@@ -83,12 +83,15 @@ if [ x"$2" = xPRE-INSTALL ]; then
fi
if [ x"$2" = xPOST-INSTALL ]; then
- if [ ! -f ${PKG_PREFIX}/etc/postfix/main.cf ]; then
- cp ${PKG_PREFIX}/etc/postfix/sample-main.cf ${PKG_PREFIX}/etc/postfix/main.cf
- fi
- if [ ! -f ${PKG_PREFIX}/etc/postfix/master.cf ]; then
- cp ${PKG_PREFIX}/etc/postfix/sample-master.cf ${PKG_PREFIX}/etc/postfix/master.cf
- fi
+ CONF1="main.cf master.cf access aliases canonical pcre_table \
+ regexp_table relocated transport virtual"
+
+ for file in $CONF1
+ do
+ if [ ! -f ${PKG_PREFIX}/etc/postfix/$file ]; then
+ cp ${PKG_PREFIX}/etc/postfix/sample-$file ${PKG_PREFIX}/etc/postfix/$file
+ fi
+ done
sh ${PKG_PREFIX}/etc/postfix/post-install tempdir=/tmp \
config_directory=${PKG_PREFIX}/etc/postfix \
diff --git a/mail/postfix-current/pkg-plist b/mail/postfix-current/pkg-plist
index 30f295d6dfe2..6fb4d1ca6d99 100644
--- a/mail/postfix-current/pkg-plist
+++ b/mail/postfix-current/pkg-plist
@@ -1,17 +1,25 @@
@unexec if cmp -s %D/etc/postfix/main.cf %D/etc/postfix/sample-main.cf; then rm -f %D/etc/postfix/main.cf; fi
@unexec if cmp -s %D/etc/postfix/master.cf %D/etc/postfix/sample-master.cf; then rm -f %D/etc/postfix/master.cf; fi
+@unexec if cmp -s %D/etc/postfix/access %D/etc/postfix/sample-access; then rm -f %D/etc/postfix/access; fi
+@unexec if cmp -s %D/etc/postfix/aliases %D/etc/postfix/sample-aliases; then rm -f %D/etc/postfix/aliases; fi
+@unexec if cmp -s %D/etc/postfix/canonical %D/etc/postfix/sample-canonical; then rm -f %D/etc/postfix/canonical; fi
+@unexec if cmp -s %D/etc/postfix/pcre_table %D/etc/postfix/sample-pcre_table; then rm -f %D/etc/postfix/pcre_table; fi
+@unexec if cmp -s %D/etc/postfix/regexp_table %D/etc/postfix/sample-regexp_table; then rm -f %D/etc/postfix/regexp_table; fi
+@unexec if cmp -s %D/etc/postfix/relocated %D/etc/postfix/sample-relocated; then rm -f %D/etc/postfix/relocated; fi
+@unexec if cmp -s %D/etc/postfix/transport %D/etc/postfix/sample-transport; then rm -f %D/etc/postfix/transport; fi
+@unexec if cmp -s %D/etc/postfix/virtual %D/etc/postfix/sample-virtual; then rm -f %D/etc/postfix/virtual; fi
bin/rmail
etc/postfix/LICENSE
-etc/postfix/access
-etc/postfix/aliases
-etc/postfix/canonical
etc/postfix/main.cf.default
-etc/postfix/pcre_table
etc/postfix/post-install
etc/postfix/postfix-files
etc/postfix/postfix-script
-etc/postfix/regexp_table
-etc/postfix/relocated
+etc/postfix/sample-access
+etc/postfix/sample-aliases
+etc/postfix/sample-canonical
+etc/postfix/sample-pcre_table
+etc/postfix/sample-regexp_table
+etc/postfix/sample-relocated
etc/postfix/sample-aliases.cf
etc/postfix/sample-auth.cf
etc/postfix/sample-canonical.cf
@@ -40,8 +48,8 @@ etc/postfix/sample-smtp.cf
etc/postfix/sample-smtpd.cf
etc/postfix/sample-transport.cf
etc/postfix/sample-virtual.cf
-etc/postfix/transport
-etc/postfix/virtual
+etc/postfix/sample-transport
+etc/postfix/sample-virtual
%%SUB_TLS%%etc/postfix/sample-tls.cf
libexec/postfix/bounce
libexec/postfix/cleanup