diff options
author | scrappy <scrappy@FreeBSD.org> | 2006-04-16 00:11:25 +0800 |
---|---|---|
committer | scrappy <scrappy@FreeBSD.org> | 2006-04-16 00:11:25 +0800 |
commit | 926bb919a76a91145ce96aecb0f399e7679da855 (patch) | |
tree | b7f3fd2b31130aac3a1f5daf3465c6f64e4467fd /deskutils/horde4-nag | |
parent | 0d8a16253dbc4d52c4478a0d64dcccf1bf083668 (diff) | |
download | freebsd-ports-gnome-926bb919a76a91145ce96aecb0f399e7679da855.tar.gz freebsd-ports-gnome-926bb919a76a91145ce96aecb0f399e7679da855.tar.zst freebsd-ports-gnome-926bb919a76a91145ce96aecb0f399e7679da855.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 'deskutils/horde4-nag')
-rw-r--r-- | deskutils/horde4-nag/Makefile | 9 | ||||
-rw-r--r-- | deskutils/horde4-nag/files/pkg-deinstall.in | 9 | ||||
-rw-r--r-- | deskutils/horde4-nag/files/pkg-install.in | 23 | ||||
-rw-r--r-- | deskutils/horde4-nag/pkg-plist | 2 |
4 files changed, 29 insertions, 14 deletions
diff --git a/deskutils/horde4-nag/Makefile b/deskutils/horde4-nag/Makefile index f3ccc17bfe69..cb9a82b04abc 100644 --- a/deskutils/horde4-nag/Makefile +++ b/deskutils/horde4-nag/Makefile @@ -31,7 +31,7 @@ USE_GETTEXT= yes PLIST_SUB= NAGDIR=${LNAGDIR} 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= NAGDIR=${NAGDIR} REINPLACE_ARGS= -i "" @@ -67,11 +67,7 @@ do-install: @${CP} -Rp ${WRKSRC}/${REP} ${NAGDIR} .endfor @${CP} -p ${WRKSRC}/*.php ${NAGDIR} -.for FILE in ${CONFFILE} - @if [ ! -f ${CONFDIR}/${FILE} ]; then \ - ${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \ - fi -.endfor + @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${NAGDIR} @${CHMOD} -R o-rwx ${CONFDIR} @${INSTALL_DATA} ${WRKDIR}/httpd-nag.conf ${HORDE_INC} @@ -84,6 +80,7 @@ do-install: .endif post-install: + @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${ECHO_MSG} @${CAT} ${PKGMESSAGE} @${ECHO_MSG} diff --git a/deskutils/horde4-nag/files/pkg-deinstall.in b/deskutils/horde4-nag/files/pkg-deinstall.in index 8f85e546f5d4..6996f090da6d 100644 --- a/deskutils/horde4-nag/files/pkg-deinstall.in +++ b/deskutils/horde4-nag/files/pkg-deinstall.in @@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then for cf in `ls %%NAGDIR%%/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/deskutils/horde4-nag/files/pkg-install.in b/deskutils/horde4-nag/files/pkg-install.in new file mode 100644 index 000000000000..f7ec7e0017b6 --- /dev/null +++ b/deskutils/horde4-nag/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 %%NAGDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do + if [ ! -f $cf ]; then + cp -p $cf.dist $cf + fi + done + fi + ;; +esac diff --git a/deskutils/horde4-nag/pkg-plist b/deskutils/horde4-nag/pkg-plist index a886f7e308a1..82967b8e0125 100644 --- a/deskutils/horde4-nag/pkg-plist +++ b/deskutils/horde4-nag/pkg-plist @@ -8,9 +8,7 @@ %%PORTDOCS%%%%DOCSDIR%%/UPGRADING %%NAGDIR%%/config/.htaccess %%NAGDIR%%/config/conf.xml -%%NAGDIR%%/config/menu.php %%NAGDIR%%/config/menu.php.dist -%%NAGDIR%%/config/prefs.php %%NAGDIR%%/config/prefs.php.dist %%NAGDIR%%/data.php %%NAGDIR%%/ics.php |