summaryrefslogtreecommitdiffstats
path: root/www/horde-base
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2005-11-13 20:30:47 +0000
committerthierry <thierry@FreeBSD.org>2005-11-13 20:30:47 +0000
commit488dd8da7a200b4117caf6ea271f85eebcb425e4 (patch)
tree59febcfd4c09d912c486de30102f184e4d327a93 /www/horde-base
parent25e978f577e5ca6857a31fee121fde344ebcbfef (diff)
downloadFreeBSD-ports-488dd8da7a200b4117caf6ea271f85eebcb425e4.zip
FreeBSD-ports-488dd8da7a200b4117caf6ea271f85eebcb425e4.tar.gz
Fix a reinstallation problem.
Note: don't bump PORTREVISION, won't take effect before the next reinstallation. PR: 88621 Submitted by: Heinrich Rebehn <rebehn (at) ant.uni-bremen.de>
Diffstat (limited to 'www/horde-base')
-rw-r--r--www/horde-base/Makefile10
-rw-r--r--www/horde-base/distinfo1
-rw-r--r--www/horde-base/files/pkg-install.in29
-rw-r--r--www/horde-base/files/pkg-message.in5
4 files changed, 34 insertions, 11 deletions
diff --git a/www/horde-base/Makefile b/www/horde-base/Makefile
index 7e0094e..b8e88f7 100644
--- a/www/horde-base/Makefile
+++ b/www/horde-base/Makefile
@@ -96,16 +96,16 @@ CONFLICTS= horde-2.*
NO_BUILD= yes
USE_PHP= ctype gettext session
USE_REINPLACE= yes
-SUB_FILES= pkg-message pkg-deinstall
+SUB_FILES= pkg-message pkg-deinstall pkg-install
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP)
RUN_DEPENDS+= ${LOCALBASE}/sbin/suphp:${PORTSDIR}/www/suphp
WANT_PHP_CGI= yes
HORDEADMUSR?= horde
-PKGINSTALL= ${WRKDIR}/pkg-install
-SUB_FILES+= pkg-install
+SUB_LIST= WITH_SUPHP=yes
.else
WANT_PHP_MOD= yes
.endif
@@ -222,7 +222,7 @@ LHORDEDIR?= www/horde
LHORDESBIN?= sbin
PLIST_SUB= HORDEDIR=${LHORDEDIR} HORDESBIN=${LHORDESBIN}
-SUB_LIST= HORDEDIR=${HORDEDIR} APACHE_CONF=${APACHE_CONF} HORDESBIN=${HORDESBIN} \
+SUB_LIST+= HORDEDIR=${HORDEDIR} APACHE_CONF=${APACHE_CONF} HORDESBIN=${HORDESBIN} \
HORDEADMUSR=${HORDEADMUSR} HORDEGRP=${WWWGRP}
HORDEDIR= ${PREFIX}/${LHORDEDIR}
@@ -356,9 +356,7 @@ do-install:
.endif
post-install:
-.if defined(WITH_SUPHP)
${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-.endif
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
diff --git a/www/horde-base/distinfo b/www/horde-base/distinfo
index 4553b0e..49224b7 100644
--- a/www/horde-base/distinfo
+++ b/www/horde-base/distinfo
@@ -1,2 +1,3 @@
MD5 (horde-3.0.6.tar.gz) = e1148c8f04125851660ff9643cf46db8
+SHA256 (horde-3.0.6.tar.gz) = f8251e22462d1f660b8c13faa5807540e2e486079ca5ec78996fc593ccd389cb
SIZE (horde-3.0.6.tar.gz) = 3725318
diff --git a/www/horde-base/files/pkg-install.in b/www/horde-base/files/pkg-install.in
index f7c747d..28db883 100644
--- a/www/horde-base/files/pkg-install.in
+++ b/www/horde-base/files/pkg-install.in
@@ -7,6 +7,8 @@
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
+WITH_SUPHP=%%WITH_SUPHP%%
+
hordedir=%%HORDEDIR%%
hordeusr=%%HORDEADMUSR%%
hordegrp=%%HORDEGRP%%
@@ -74,6 +76,10 @@ create_user() {
case $2 in
PRE-INSTALL)
+ if [ $WITH_SUPHP != "yes" ]; then
+ exit 0
+ fi
+
# Create the horde user and group if they do not already exist
if pw user show -n $hordeusr >/dev/null 2>&1 ; then
@@ -88,9 +94,24 @@ case $2 in
;;
POST-INSTALL)
- # Change ownership of the Horde directory
-
- echo "===> Adjusting file ownership in $hordedir"
- chown -R $hordeusr:$hordegrp $hordedir || exit 1
+ if [ $WITH_SUPHP = "yes" ]; then
+ # Change ownership of the Horde directory
+
+ echo "===> Adjusting file ownership in $hordedir"
+ chown -R $hordeusr:$hordegrp $hordedir || exit 1
+ fi
+
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ # Don't reset the config to default (PR ports/88621)
+
+ for cf in `ls %%HORDEDIR%%/config/*php`; do
+ if [ -f $cf.previous ]; then
+ mv $cf $cf.new
+ echo "---> $cf not installed ***"
+ echo "---> please copy from $cf.previous ***"
+ echo "---> or from $cf.new ***"
+ fi
+ done
+ fi
;;
esac
diff --git a/www/horde-base/files/pkg-message.in b/www/horde-base/files/pkg-message.in
index b910ccb..20dc02d 100644
--- a/www/horde-base/files/pkg-message.in
+++ b/www/horde-base/files/pkg-message.in
@@ -1,6 +1,9 @@
************************************************************************
Horde has been installed in %%HORDEDIR%% with your blank
-configuration files.
+configuration files. After a reinstallation, you have to explicitely
+merge your files %%HORDEDIR%%/config/conf.php.new
+and %%HORDEDIR%%/config/conf.php.previous
+into %%HORDEDIR%%/config/conf.php .
If you want Horde to access a database, you have to run the
appropriate scripts located in %%HORDEDIR%%/scripts/sql.
OpenPOWER on IntegriCloud