diff options
author | thierry <thierry@FreeBSD.org> | 2006-01-06 08:38:13 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2006-01-06 08:38:13 +0800 |
commit | 922106489a63564790d516923e03c8fa28346fa9 (patch) | |
tree | 20dad146d367f92c711d016c12e8e3340824db6b /www/horde-passwd | |
parent | 65a0f264588bfc3e5c26e6b14ba972c45fca49a3 (diff) | |
download | freebsd-ports-gnome-922106489a63564790d516923e03c8fa28346fa9.tar.gz freebsd-ports-gnome-922106489a63564790d516923e03c8fa28346fa9.tar.zst freebsd-ports-gnome-922106489a63564790d516923e03c8fa28346fa9.zip |
- 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 <john (at) jnielsen.net>:
respect LHORDEDIR.
- Fix horde-passwd installation / deinstallation.
- Don't bump PORTREVISION, because running installations are not
concerned.
Diffstat (limited to 'www/horde-passwd')
-rw-r--r-- | www/horde-passwd/Makefile | 19 | ||||
-rw-r--r-- | www/horde-passwd/files/pkg-deinstall.in | 27 | ||||
-rw-r--r-- | www/horde-passwd/pkg-plist | 2 |
3 files changed, 42 insertions, 6 deletions
diff --git a/www/horde-passwd/Makefile b/www/horde-passwd/Makefile index 874f9c154bc7..610720ca8fef 100644 --- a/www/horde-passwd/Makefile +++ b/www/horde-passwd/Makefile @@ -26,10 +26,13 @@ COMMENT= A password changing module for Horde RUN_DEPENDS= ${LOCALBASE}/${LHORDEDIR}/rpc.php:${PORTSDIR}/www/horde NO_BUILD= yes +USE_APACHE= 1.3+ # needed to test APACHE_VERSION -PLIST_SUB= LPWDDIR=${LPWDDIR} PWDDIR=${PWDDIR} +PLIST_SUB= LPWDDIR=${LPWDDIR} PWDDIR=${PWDDIR} \ + HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||} PKGMESSAGE= ${WRKDIR}/pkg-message -SUB_FILES= pkg-message +PKGDEINSTALL= ${WRKDIR}/pkg-deinstall +SUB_FILES= pkg-message pkg-deinstall SUB_LIST= PWDDIR=${PWDDIR} CONFDIR=${CONFDIR} HORDEDIR=${HORDEDIR} DOCS= LICENSE README docs/CHANGES docs/CREDITS docs/INSTALL \ @@ -44,11 +47,17 @@ HORDEDIR= ${PREFIX}/${LHORDEDIR} PWDDIR= ${PREFIX}/${LPWDDIR} CONFDIR= ${PWDDIR}/config +.include <bsd.port.pre.mk> + +.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/passwd:${PWDDIR}:g" \ - ${FILESDIR}/httpd.conf.pwd > ${WRKDIR}/httpd.conf.pwd + ${FILESDIR}/httpd.conf.pwd > ${WRKDIR}/httpd-pwd.conf do-install: @${MKDIR} ${PWDDIR} @@ -63,7 +72,7 @@ do-install: .endfor @${CHOWN} -R www:www ${PWDDIR} @${CHMOD} -R o-rwx ${CONFDIR} - @${CP} -p ${FILESDIR}/httpd.conf.pwd ${HORDE_INC}/httpd.conf.pwd + @${INSTALL_DATA} ${WRKDIR}/httpd-pwd.conf ${HORDE_INC} .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for FILE in ${DOCS} @@ -77,4 +86,4 @@ post-install: @${CAT} ${PKGMESSAGE} @${ECHO_MSG} -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/www/horde-passwd/files/pkg-deinstall.in b/www/horde-passwd/files/pkg-deinstall.in new file mode 100644 index 000000000000..7f79726e85c1 --- /dev/null +++ b/www/horde-passwd/files/pkg-deinstall.in @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Backup horde-passwd config files, if needed. + +if [ x$2 != xDEINSTALL ]; then + exit +fi + +if [ -z "${PACKAGE_BUILDING}" ]; then + for cf in `ls %%PWDDIR%%/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/www/horde-passwd/pkg-plist b/www/horde-passwd/pkg-plist index cfc3e65733b2..f774ee530482 100644 --- a/www/horde-passwd/pkg-plist +++ b/www/horde-passwd/pkg-plist @@ -102,7 +102,7 @@ %%LPWDDIR%%/test.php %%LPWDDIR%%/themes/graphics/favicon.ico %%LPWDDIR%%/themes/graphics/passwd.png -etc/horde/httpd.conf.pwd +%%HORDE_INC%%/httpd-pwd.conf %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm %%LPWDDIR%%/themes/graphics @dirrm %%LPWDDIR%%/themes |