diff options
author | scrappy <scrappy@FreeBSD.org> | 2006-04-16 00:05:33 +0800 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 2006-04-16 00:05:33 +0800 |
commit | 0d8a16253dbc4d52c4478a0d64dcccf1bf083668 (patch) | |
tree | a97e142efcfbca278be5a1cb24a7033e99170b8a /mail/turba | |
parent | dcc539b5c8aeb314ad9bafcfb7f2da5807d8c958 (diff) | |
download | freebsd-ports-gnome-0d8a16253dbc4d52c4478a0d64dcccf1bf083668.tar.gz freebsd-ports-gnome-0d8a16253dbc4d52c4478a0d64dcccf1bf083668.tar.zst freebsd-ports-gnome-0d8a16253dbc4d52c4478a0d64dcccf1bf083668.zip |
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>
Diffstat (limited to 'mail/turba')
-rw-r--r-- | mail/turba/Makefile | 9 | ||||
-rw-r--r-- | mail/turba/files/pkg-deinstall.in | 9 | ||||
-rw-r--r-- | mail/turba/files/pkg-install.in | 23 | ||||
-rw-r--r-- | mail/turba/pkg-plist | 5 |
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 |