--- rpms/smeserver-egroupware/contribs8/smeserver-egroupware.spec 2013/12/12 17:03:05 1.3 +++ rpms/smeserver-egroupware/contribs8/smeserver-egroupware.spec 2013/12/12 21:42:30 1.4 @@ -1,10 +1,10 @@ -# $Id: smeserver-egroupware.spec,v 1.2 2013/06/04 21:03:24 unnilennium Exp $ +# $Id: smeserver-egroupware.spec,v 1.3 2013/12/12 17:03:05 unnilennium Exp $ # Authority: cool34000 # Name: Sylvain Gomez %define name smeserver-egroupware %define version 1.8.005 -%define release 1 +%define release 2 %define rpmver 4.0.4 @@ -39,10 +39,12 @@ https://yourdomain.com/egroupware %changelog -* Thu Dec 12 2013 JP Pialasse 1.8.005-1.sme +* Thu Dec 12 2013 JP Pialasse 1.8.005-2.sme - upgrade to eGroupware 1.8 using opensuse rpm for Centos5 - built for eGroupware-1.8.005.20131007 - see [SME: 8040] +- revert back some configuration in spec +- will need to move to an event * Tue Jun 04 2013 JP Pialasse 1.4.004-2.sme - fix upload dir not defined [SME 7653] @@ -187,18 +189,21 @@ esac %post # Initializing SME DB -/etc/e-smith/events/actions/initialize-default-databases +echo "Initializing SME DB" +/etc/e-smith/events/actions/initialize-default-databases 2>/dev/null +echo " " # Variables DOMAIN=$(/sbin/e-smith/db configuration get DomainName) EGPASS=$(/sbin/e-smith/db configuration getprop egroupware DbPassword) -UPDATE=$(ls /opt | grep -c egroupware) +UPDATE=$(ls /usr/share/ | grep -c egroupware) #echo "Decompressing files..." #mkdir -p /opt/egroupware/{files/g2data,backup,tmp} #tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-1.4.004.tar.gz -C /opt/egroupware #tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-egw-pear-1.4.004.tar.gz -C /opt/egroupware #tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-gallery-1.4.004.tar.gz -C /opt/egroupware +echo "Preparing phpSysInfo..." cp -f /usr/share/doc/eGroupWare-1.8.005/Sources/phpSysInfo/config.php /usr/share/egroupware/phpsysinfo/ cp -f /usr/share/doc/eGroupWare-1.8.005/Sources/phpSysInfo/Redhat.png /usr/share/egroupware/phpsysinfo/images/ @@ -226,50 +231,55 @@ cp -f /usr/share/doc/eGroupWare-1.8.005/ #chown www:www /opt/egroupware/tmp # fixed this one adding .php, not sure if still necessary -if [ "$UPDATE" = "0" ] ; then - echo "Preparing Site-Mgr..." - cd /usr/share/egroupware - ln -s sitemgr/sitemgr-link.php -fi +#if [ "$UPDATE" = "0" ] ; then +# echo "Preparing Site-Mgr..." +# cd /usr/share/egroupware +# ln -s sitemgr/sitemgr-link.php +#fi echo "Preparing header.inc.php..." -case $UPDATE in - 0) sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/header.inc.php > /usr/share/egroupware/header.inc.php ;; +# if first install +if [ "$1" = "1" ] ; then +# 0) +sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/header.inc.php > /usr/share/egroupware/header.inc.php +echo " done!" +fi # *) mv -f /opt/egroupware/html/header.inc.php /opt/egroupware/ 2>/dev/null ;; -esac +#esacc #chown www:www /opt/egroupware/header.inc.php #chmod 640 /opt/egroupware/header.inc.php #cd /opt/egroupware/html #ln -s ../header.inc.php 2>/dev/null - +echo " " # the integration is complete Ithink now..... -#echo "Preparing Gallery2..." -#if [ -f /usr/share/egroupware/gallery/gallery2_config.php ] ; then -# touch /usr/share/egroupware/gallery/gallery2_config.php -#else -# sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/Gallery2/config.php > /usr/share/egroupware/gallery/gallery2_config.php -#fi +echo "Preparing Gallery2..." +if [ -f /usr/share/egroupware/gallery/gallery2/config.php ] ; then + touch /usr/share/egroupware/gallery/gallery2/config.php +else + sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/Gallery2/config.php > /usr/share/egroupware/gallery/gallery2/config.php +fi -#chmod 640 /opt/egroupware/html/gallery/gallery2/config.php -#chown www:www /opt/egroupware/html/gallery/gallery2/config.php -#echo " " +chmod 640 /usr/share/egroupware/gallery/gallery2/config.php +chown www:www /usr/share/egroupware/gallery/gallery2/config.php +echo " " ### this one will be done by event -#echo "MySQL installation:" +echo "MySQL installation:" #if [ "$UPDATE" = "0" ] ; then # cp /usr/share/doc/eGroupWare-1.4.004/Sources/81egw_database.sql /etc/e-smith/sql/init/ #fi -#/sbin/e-smith/expand-template /etc/e-smith/sql/init/80egw_mysql.sql -#/sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_domain.sql -#/etc/rc.d/init.d/mysql.init start -#echo " " - -#echo "Applying modifications to services..." -#/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf -#/etc/rc7.d/S86httpd-e-smith sigusr1 -#/etc/rc.d/init.d/crond restart -#echo " " +/sbin/e-smith/expand-template /etc/e-smith/sql/init/80egw_mysql.sql +/sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_default +/sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_domain.sql +/etc/rc.d/init.d/mysql.init start +echo " " + +echo "Applying modifications to services..." +/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf +/etc/rc7.d/S86httpd-e-smith sigusr1 +/etc/rc.d/init.d/crond restart +echo " " echo "-------------------------------------------------------------------------------" case $UPDATE in