From 922106489a63564790d516923e03c8fa28346fa9 Mon Sep 17 00:00:00 2001 From: thierry Date: Fri, 6 Jan 2006 00:38:13 +0000 Subject: - Replace WITH_APACHE2 by USE_APACHE, rename httpd.conf.xxx to httpd-xxx.conf and fix configuration if APACHE_VERSION > 20. - Don't use the MCAL back-end by default for Kronolith, it is deprecated. - Deinstall bug reported by John Nielsen : respect LHORDEDIR. - Fix horde-passwd installation / deinstallation. - Don't bump PORTREVISION, because running installations are not concerned. --- deskutils/horde-mnemo/Makefile | 21 ++++++++++++++------- deskutils/horde-mnemo/files/pkg-deinstall.in | 27 +++++++++++++++++++++++++++ deskutils/horde-mnemo/pkg-deinstall | 27 --------------------------- deskutils/horde-mnemo/pkg-plist | 2 +- 4 files changed, 42 insertions(+), 35 deletions(-) create mode 100644 deskutils/horde-mnemo/files/pkg-deinstall.in delete mode 100644 deskutils/horde-mnemo/pkg-deinstall (limited to 'deskutils/horde-mnemo') diff --git a/deskutils/horde-mnemo/Makefile b/deskutils/horde-mnemo/Makefile index 61dc04ee2164..e5e46cdc2342 100644 --- a/deskutils/horde-mnemo/Makefile +++ b/deskutils/horde-mnemo/Makefile @@ -24,10 +24,13 @@ COMMENT= Mnemo is the Horde notes and memos application RUN_DEPENDS= ${LOCALBASE}/${LHORDEDIR}/rpc.php:${PORTSDIR}/www/horde NO_BUILD= yes -USE_REINPLACE= yes +USE_APACHE= 1.3+ # needed to test APACHE_VERSION -PLIST_SUB= MNEMODIR=${LMNEMODIR} +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_LIST= MNEMODIR=${MNEMODIR} DOCS= LICENSE README docs/CHANGES docs/CREDITS docs/INSTALL \ docs/RELEASE_NOTES docs/TODO docs/UPGRADING @@ -40,11 +43,17 @@ LMNEMODIR?= ${LHORDEDIR}/mnemo MNEMODIR= ${PREFIX}/${LMNEMODIR} CONFDIR= ${MNEMODIR}/config +.include + +.if ${APACHE_VERSION} >= 20 +HORDE_INC= ${LOCALBASE}/etc/apache${APACHE_VERSION:S/20/2/}/Includes +.else HORDE_INC= ${LOCALBASE}/etc/horde +.endif pre-configure: @${SED} -e "s:/home/httpd/html/horde/mnemo:${MNEMODIR}:g" \ - ${FILESDIR}/httpd.conf.mnemo > ${WRKDIR}/httpd.conf.mnemo + ${FILESDIR}/httpd.conf.mnemo > ${WRKDIR}/httpd-mnemo.conf do-install: @${MKDIR} ${MNEMODIR} @@ -59,7 +68,7 @@ do-install: .endfor @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${MNEMODIR} @${CHMOD} -R o-rwx ${CONFDIR} - @${INSTALL_DATA} ${WRKDIR}/httpd.conf.mnemo ${HORDE_INC} + @${INSTALL_DATA} ${WRKDIR}/httpd-mnemo.conf ${HORDE_INC} .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for FILE in ${DOCS} @@ -69,10 +78,8 @@ do-install: .endif post-install: - @${SED} -e "s:%%MNEMODIR%%:${MNEMODIR}:g;s:%%DOCSDIR%%:${DOCSDIR}:g" \ - < ${FILESDIR}/pkg-message.in > ${PKGMESSAGE} @${ECHO_MSG} @${CAT} ${PKGMESSAGE} @${ECHO_MSG} -.include +.include diff --git a/deskutils/horde-mnemo/files/pkg-deinstall.in b/deskutils/horde-mnemo/files/pkg-deinstall.in new file mode 100644 index 000000000000..0a40a68d052b --- /dev/null +++ b/deskutils/horde-mnemo/files/pkg-deinstall.in @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Backup Mnemo config files, if needed. + +if [ x$2 != xDEINSTALL ]; then + exit +fi + +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 + ;; + 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 ***" + ;; + *) # not found? + ;; + esac + done +fi diff --git a/deskutils/horde-mnemo/pkg-deinstall b/deskutils/horde-mnemo/pkg-deinstall deleted file mode 100644 index b329889878d6..000000000000 --- a/deskutils/horde-mnemo/pkg-deinstall +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# Backup Mnemo config files, if needed. - -if [ x$2 != xDEINSTALL ]; then - exit -fi - -if [ -z "${PACKAGE_BUILDING}" ]; then - for cf in `ls ${PKG_PREFIX}/www/horde/mnemo/config/*php`; do - diff -bBqw $cf $cf.dist >/dev/null 2>&1 - case $? in - 0) # original config file, will be deleted by pkg-plist - ;; - 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 ***" - ;; - *) # not found? - ;; - esac - done -fi diff --git a/deskutils/horde-mnemo/pkg-plist b/deskutils/horde-mnemo/pkg-plist index cc60dcbc30d1..816549d83396 100644 --- a/deskutils/horde-mnemo/pkg-plist +++ b/deskutils/horde-mnemo/pkg-plist @@ -1,4 +1,4 @@ -etc/horde/httpd.conf.mnemo +%%HORDE_INC%%/httpd-mnemo.conf %%PORTDOCS%%%%DOCSDIR%%/LICENSE %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES -- cgit