diff options
author | Marc G. Fournier <scrappy@FreeBSD.org> | 2006-04-15 16:11:25 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@FreeBSD.org> | 2006-04-15 16:11:25 +0000 |
commit | 5a18218c206df07b4f892a79b071cc20062c8e02 (patch) | |
tree | a18a0d6b7d6c51a0bbd9e7ad983e7a925f913e63 /deskutils/horde4-mnemo | |
parent | bf25f044454eb7856fbe55acbe4439a4e0928d68 (diff) | |
download | ports-5a18218c206df07b4f892a79b071cc20062c8e02.tar.gz ports-5a18218c206df07b4f892a79b071cc20062c8e02.zip |
Notes
Diffstat (limited to 'deskutils/horde4-mnemo')
-rw-r--r-- | deskutils/horde4-mnemo/Makefile | 9 | ||||
-rw-r--r-- | deskutils/horde4-mnemo/files/pkg-deinstall.in | 9 | ||||
-rw-r--r-- | deskutils/horde4-mnemo/files/pkg-install.in | 23 | ||||
-rw-r--r-- | deskutils/horde4-mnemo/pkg-plist | 1 |
4 files changed, 29 insertions, 13 deletions
diff --git a/deskutils/horde4-mnemo/Makefile b/deskutils/horde4-mnemo/Makefile index c768093122c6..c89b828222f1 100644 --- a/deskutils/horde4-mnemo/Makefile +++ b/deskutils/horde4-mnemo/Makefile @@ -30,7 +30,7 @@ USE_GETTEXT= yes PLIST_SUB= MNEMODIR=${LMNEMODIR} 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= MNEMODIR=${MNEMODIR} REINPLACE_ARGS= -i "" @@ -66,11 +66,7 @@ do-install: @${CP} -Rp ${WRKSRC}/${REP} ${MNEMODIR} .endfor @${CP} -p ${WRKSRC}/*.php ${MNEMODIR} -.for FILE in ${CONFFILE} - @if [ ! -f ${CONFDIR}/${FILE} ]; then \ - ${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \ - fi -.endfor + @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${MNEMODIR} @${CHMOD} -R o-rwx ${CONFDIR} @${INSTALL_DATA} ${WRKDIR}/httpd-mnemo.conf ${HORDE_INC} @@ -83,6 +79,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-mnemo/files/pkg-deinstall.in b/deskutils/horde4-mnemo/files/pkg-deinstall.in index 0a40a68d052b..01e0ca9f6e7b 100644 --- a/deskutils/horde4-mnemo/files/pkg-deinstall.in +++ b/deskutils/horde4-mnemo/files/pkg-deinstall.in @@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then for cf in `ls %%MNEMODIR%%/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-mnemo/files/pkg-install.in b/deskutils/horde4-mnemo/files/pkg-install.in new file mode 100644 index 000000000000..2b5fd65ba10e --- /dev/null +++ b/deskutils/horde4-mnemo/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 %%MNEMODIR%%/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-mnemo/pkg-plist b/deskutils/horde4-mnemo/pkg-plist index e7120e10d320..29af196f3325 100644 --- a/deskutils/horde4-mnemo/pkg-plist +++ b/deskutils/horde4-mnemo/pkg-plist @@ -9,7 +9,6 @@ %%PORTDOCS%%%%DOCSDIR%%/UPGRADING %%MNEMODIR%%/config/.htaccess %%MNEMODIR%%/config/conf.xml -%%MNEMODIR%%/config/prefs.php %%MNEMODIR%%/config/prefs.php.dist %%MNEMODIR%%/data.php %%MNEMODIR%%/index.php |