--- rpms/smeserver-egroupware/contribs8/smeserver-egroupware.spec 2013/12/12 17:03:05 1.3 +++ rpms/smeserver-egroupware/contribs8/smeserver-egroupware.spec 2013/12/13 21:38:45 1.6 @@ -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.5 2013/12/12 22:38:13 unnilennium Exp $ # Authority: cool34000 # Name: Sylvain Gomez %define name smeserver-egroupware %define version 1.8.005 -%define release 1 +%define release 4 %define rpmver 4.0.4 @@ -15,6 +15,8 @@ Release: %{release}%{?dist} License: GPL Group: Web/Application Source: %{name}-%{version}.tgz +Patch0: smeserver-egroupware-1.8.005-g2datapath.patch +Patch1: smeserver-egroupware-1.8.005-deletescript.patch URL: http://www.egroupware.org BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch @@ -39,10 +41,17 @@ https://yourdomain.com/egroupware %changelog -* Thu Dec 12 2013 JP Pialasse 1.8.005-1.sme +* Fri Dec 13 2013 JP Pialasse 1.8.005-4.sme +- fixed deletion script see [SME: 8040] comment 25 + +* Thu Dec 12 2013 JP Pialasse 1.8.005-3.sme - upgrade to eGroupware 1.8 using opensuse rpm for Centos5 - built for eGroupware-1.8.005.20131007 - see [SME: 8040] +- 2 revert back some configuration in spec +- will need to move to an event +- 3 fix tmp and sess directory +- fix default g2data path * Tue Jun 04 2013 JP Pialasse 1.4.004-2.sme - fix upload dir not defined [SME 7653] @@ -130,7 +139,9 @@ https://yourdomain.com/egroupware %setup -#%patch0 -p1 +%patch0 -p1 +%patch1 -p1 + %build # Creating templates2adjust @@ -156,7 +167,12 @@ perl createlinks rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist -/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ +|grep -v egroupware_tmp |grep -v egroupware_sess \ +> %{name}-%{version}-filelist + +echo "%dir %attr(0755,www,www) /usr/share/egroupware_tmp">> %{name}-%{version}-filelist +echo "%dir %attr(0755,www,www) /usr/share/egroupware_sess">> %{name}-%{version}-filelist %clean @@ -187,18 +203,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 +245,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