summaryrefslogtreecommitdiffstats
path: root/mail/cyrus-imapd22/pkg-install
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2004-07-19 12:22:38 +0000
committerume <ume@FreeBSD.org>2004-07-19 12:22:38 +0000
commita2becb68c0fa9724bfa8691b644685c9c9e6bc26 (patch)
tree55b90a4752fe51ebb462214fbbd222eadc502704 /mail/cyrus-imapd22/pkg-install
parent9afeffa8fe8883117609990e24d0be1b88b022c8 (diff)
downloadFreeBSD-ports-a2becb68c0fa9724bfa8691b644685c9c9e6bc26.zip
FreeBSD-ports-a2becb68c0fa9724bfa8691b644685c9c9e6bc26.tar.gz
Utilize EXAMPLESDIR.
Diffstat (limited to 'mail/cyrus-imapd22/pkg-install')
-rw-r--r--mail/cyrus-imapd22/pkg-install13
1 files changed, 6 insertions, 7 deletions
diff --git a/mail/cyrus-imapd22/pkg-install b/mail/cyrus-imapd22/pkg-install
index a4a1d68..556a643 100644
--- a/mail/cyrus-imapd22/pkg-install
+++ b/mail/cyrus-imapd22/pkg-install
@@ -3,9 +3,8 @@
#set -vx
PKG_BATCH=${BATCH:=NO}
-
-PKG_PREFIX=${PKG_PREFIX:=/usr/local}
-
+PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
+EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
#
@@ -28,7 +27,7 @@ modify_cyrus_user() {
checkfile() {
- diff -bBqw $1 $1.dist >/dev/null 2>&1
+ diff -bBqw $1 $2 >/dev/null 2>&1
case $? in
0) # config file exists, but is the same
;;
@@ -37,7 +36,7 @@ checkfile() {
echo " of the port. See $1.dist for details.";
;;
*) # no config file exists, copy it
- install -c -m 644 $1.dist $1
+ install -c -m 644 $2 $1
;;
esac
}
@@ -49,8 +48,8 @@ case $2 in
POST-INSTALL)
modify_cyrus_user
cd ${PKG_PREFIX}
- checkfile ${PKG_PREFIX}/etc/imapd.conf
- checkfile ${PKG_PREFIX}/etc/cyrus.conf
+ checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf
+ checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf
if grep 'sieve' /etc/services; then
echo
else
OpenPOWER on IntegriCloud