summaryrefslogtreecommitdiff
path: root/mail/turba
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2006-04-15 16:05:33 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2006-04-15 16:05:33 +0000
commitbf25f044454eb7856fbe55acbe4439a4e0928d68 (patch)
tree04e3ac8722f33c5217243c8ddd333794aa6d8929 /mail/turba
parent- Update to 1.61.19 (diff)
After a recent discussion on freebsd-ports, I have modified the Horde ports, so that
they now do not overwrite existing configuration files. Rather than backing up the old ones and allowing the user to merge the files by hand, config files are left untouched. Submitted by: Shaun Amott <shaun@inerd.com>
Notes
Notes: svn path=/head/; revision=159609
Diffstat (limited to 'mail/turba')
-rw-r--r--mail/turba/Makefile9
-rw-r--r--mail/turba/files/pkg-deinstall.in9
-rw-r--r--mail/turba/files/pkg-install.in23
-rw-r--r--mail/turba/pkg-plist5
4 files changed, 29 insertions, 17 deletions
diff --git a/mail/turba/Makefile b/mail/turba/Makefile
index 76740d503218..f18b1d2cb54c 100644
--- a/mail/turba/Makefile
+++ b/mail/turba/Makefile
@@ -53,7 +53,7 @@ LTURBADIR?= ${LHORDEDIR}/turba
PLIST_SUB= TURBADIR=${LTURBADIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
-SUB_FILES= pkg-message pkg-deinstall
+SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_LIST= TURBADIR=${TURBADIR} CONFDIR=${CONFDIR}
TURBADIR= ${PREFIX}/${LTURBADIR}
@@ -90,11 +90,7 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${TURBADIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${TURBADIR}
-.for FILE in ${CONFFILE}
- @if [ ! -f ${CONFDIR}/${FILE} ]; then \
- ${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
- fi
-.endfor
+
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${TURBADIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${INSTALL_DATA} ${WRKDIR}/httpd-turba.conf ${HORDE_INC}
@@ -107,6 +103,7 @@ do-install:
.endif
post-install:
+ @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
diff --git a/mail/turba/files/pkg-deinstall.in b/mail/turba/files/pkg-deinstall.in
index afe8f9215da2..fced5020f1b0 100644
--- a/mail/turba/files/pkg-deinstall.in
+++ b/mail/turba/files/pkg-deinstall.in
@@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%TURBADIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
- 0) # original config file, will be deleted by pkg-plist
+ 0) # original config file, delete it
+ rm -f $cf
;;
- 1) # config file has been updated, must be backuped
- cp -p $cf $cf.previous
- echo "===> Backing-up..."
- echo "---> $cf has been saved ***"
- echo "---> as $cf.previous ***"
+ 1) # config file has been updated, leave it alone
;;
*) # not found?
;;
diff --git a/mail/turba/files/pkg-install.in b/mail/turba/files/pkg-install.in
new file mode 100644
index 000000000000..e0611782bf84
--- /dev/null
+++ b/mail/turba/files/pkg-install.in
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PATH=/usr/sbin:/usr/bin:/bin ; export PATH
+
+case $2 in
+ PRE-INSTALL)
+ ;;
+
+ POST-INSTALL)
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ # Copy over sample config files unless they already exist
+
+ for cf in `ls %%TURBADIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
+ if [ ! -f $cf ]; then
+ cp -p $cf.dist $cf
+ fi
+ done
+ fi
+ ;;
+esac
diff --git a/mail/turba/pkg-plist b/mail/turba/pkg-plist
index f6fd94a1e219..ad3564974fa4 100644
--- a/mail/turba/pkg-plist
+++ b/mail/turba/pkg-plist
@@ -10,16 +10,11 @@
%%TURBADIR%%/addressbooks.php
%%TURBADIR%%/browse.php
%%TURBADIR%%/config/.htaccess
-%%TURBADIR%%/config/attributes.php
%%TURBADIR%%/config/attributes.php.dist
%%TURBADIR%%/config/conf.xml
-%%TURBADIR%%/config/menu.php
%%TURBADIR%%/config/menu.php.dist
-%%TURBADIR%%/config/mime_drivers.php
%%TURBADIR%%/config/mime_drivers.php.dist
-%%TURBADIR%%/config/prefs.php
%%TURBADIR%%/config/prefs.php.dist
-%%TURBADIR%%/config/sources.php
%%TURBADIR%%/config/sources.php.dist
%%TURBADIR%%/data.php
%%TURBADIR%%/delete.php