diff options
author | Marc G. Fournier <scrappy@FreeBSD.org> | 2006-04-15 16:05:33 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@FreeBSD.org> | 2006-04-15 16:05:33 +0000 |
commit | bf25f044454eb7856fbe55acbe4439a4e0928d68 (patch) | |
tree | 04e3ac8722f33c5217243c8ddd333794aa6d8929 /mail/horde-turba | |
parent | 959a3b03d8c9b2854dce7893c916c96d279ab744 (diff) | |
download | ports-bf25f044454eb7856fbe55acbe4439a4e0928d68.tar.gz ports-bf25f044454eb7856fbe55acbe4439a4e0928d68.zip |
Notes
Diffstat (limited to 'mail/horde-turba')
-rw-r--r-- | mail/horde-turba/Makefile | 9 | ||||
-rw-r--r-- | mail/horde-turba/files/pkg-deinstall.in | 9 | ||||
-rw-r--r-- | mail/horde-turba/files/pkg-install.in | 23 | ||||
-rw-r--r-- | mail/horde-turba/pkg-plist | 5 |
4 files changed, 29 insertions, 17 deletions
diff --git a/mail/horde-turba/Makefile b/mail/horde-turba/Makefile index 76740d503218..f18b1d2cb54c 100644 --- a/mail/horde-turba/Makefile +++ b/mail/horde-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/horde-turba/files/pkg-deinstall.in b/mail/horde-turba/files/pkg-deinstall.in index afe8f9215da2..fced5020f1b0 100644 --- a/mail/horde-turba/files/pkg-deinstall.in +++ b/mail/horde-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/horde-turba/files/pkg-install.in b/mail/horde-turba/files/pkg-install.in new file mode 100644 index 000000000000..e0611782bf84 --- /dev/null +++ b/mail/horde-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/horde-turba/pkg-plist b/mail/horde-turba/pkg-plist index f6fd94a1e219..ad3564974fa4 100644 --- a/mail/horde-turba/pkg-plist +++ b/mail/horde-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 |