--- rpms/smeserver-egroupware/contribs8/smeserver-egroupware.spec 2013/06/04 21:03:24 1.2 +++ rpms/smeserver-egroupware/contribs8/smeserver-egroupware.spec 2013/12/12 17:03:05 1.3 @@ -1,30 +1,30 @@ -# $Id: smeserver-egroupware.spec,v 1.1 2013/06/01 12:41:24 unnilennium Exp $ +# $Id: smeserver-egroupware.spec,v 1.2 2013/06/04 21:03:24 unnilennium Exp $ # Authority: cool34000 # Name: Sylvain Gomez %define name smeserver-egroupware -%define version 1.4.004 -%define release 2 +%define version 1.8.005 +%define release 1 %define rpmver 4.0.4 -Summary: eGroupware web application for SME >7 +Summary: eGroupware web application for SME >=8 Name: %{name} Version: %{version} Release: %{release}%{?dist} License: GPL Group: Web/Application -Source: %{name}-%{version}.tar.gz +Source: %{name}-%{version}.tgz URL: http://www.egroupware.org BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch BuildRequires: e-smith-devtools Requires: e-smith-base, e-smith-release >= 8 -Patch0: smeserver-egroupware-1.4.004-tmp_dir.patch - +Requires: eGroupware >= 1.8 +Requires: eGroupware-gallery >= 1.8 %description -This RPM is an unofficial addon for the SME Server 7.x and above. +This RPM is an unofficial addon for the SME Server 8.x and above. eGroupWare is a free enterprise ready groupware software for your network. It enables you to manage contacts, appointments, todos and many more for your whole business. eGroupWare is a groupware server. It comes with a native web-interface which allowes to access @@ -39,6 +39,11 @@ https://yourdomain.com/egroupware %changelog +* Thu Dec 12 2013 JP Pialasse 1.8.005-1.sme +- upgrade to eGroupware 1.8 using opensuse rpm for Centos5 +- built for eGroupware-1.8.005.20131007 +- see [SME: 8040] + * Tue Jun 04 2013 JP Pialasse 1.4.004-2.sme - fix upload dir not defined [SME 7653] - updated e-smith-release >8 @@ -125,24 +130,26 @@ https://yourdomain.com/egroupware %setup -%patch0 -p1 +#%patch0 -p1 %build # Creating templates2adjust perl createlinks + +### now in archive # Default DB parameters -DEFAULTS1=root/etc/e-smith/db/configuration/defaults/egroupware -DEFAULTS2=root/etc/e-smith/db/accounts/defaults/egroupware -mkdir -p $DEFAULTS1 -mkdir -p $DEFAULTS2 -echo "egroupware" > $DEFAULTS1/DbName -echo "egwuser" > $DEFAULTS1/DbUser -echo "on" > $DEFAULTS1/HTTPS -echo "eGroupWare" > $DEFAULTS1/Name -echo "global" > $DEFAULTS1/PublicAccess -echo "url" > $DEFAULTS1/type -echo "reserved" > $DEFAULTS2/type +#DEFAULTS1=root/etc/e-smith/db/configuration/defaults/egroupware +#DEFAULTS2=root/etc/e-smith/db/accounts/defaults/egroupware +#mkdir -p $DEFAULTS1 +#mkdir -p $DEFAULTS2 +#echo "egroupware" > $DEFAULTS1/DbName +#echo "egwuser" > $DEFAULTS1/DbUser +#echo "on" > $DEFAULTS1/HTTPS +#echo "eGroupWare" > $DEFAULTS1/Name +#echo "global" > $DEFAULTS1/PublicAccess +#echo "url" > $DEFAULTS1/type +#echo "reserved" > $DEFAULTS2/type %install @@ -166,13 +173,13 @@ case $UPDATE in ;; *) echo "Updating eGroupware... Please wait!" - echo "Backup folder: /opt/eGW_RPM_BACKUP" +# echo "Backup folder: /opt/eGW_RPM_BACKUP" mkdir -p /opt/eGW_RPM_BACKUP - cd /opt - echo "Backing up installation files..." - tar -czf /opt/eGW_RPM_BACKUP/egroupware.tar.gz egroupware +# cd /opt +# echo "Backing up installation files..." +# tar -czf /opt/eGW_RPM_BACKUP/egroupware.tar.gz egroupware echo "Backing up MySQL database..." - mysqldump egroupware > /opt/eGW_RPM_BACKUP/egroupware.sql + mysqldump egroupware > /opt/eGW_RPM_BACKUP/egroupware$(date +%Y-%m-%d).sql /sbin/e-smith/db configuration show egroupware > /opt/eGW_RPM_BACKUP/config.txt ;; esac @@ -187,77 +194,82 @@ DOMAIN=$(/sbin/e-smith/db configuration EGPASS=$(/sbin/e-smith/db configuration getprop egroupware DbPassword) UPDATE=$(ls /opt | 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 -cp -f /usr/share/doc/eGroupWare-1.4.004/Sources/phpSysInfo/config.php /opt/egroupware/html/phpsysinfo/ -cp -f /usr/share/doc/eGroupWare-1.4.004/Sources/phpSysInfo/Redhat.png /opt/egroupware/html/phpsysinfo/images/ - -echo "Cleaning Install..." -rm -rf /opt/egroupware/egroupware -rm -rf /opt/egroupware/html/debian -rm -f /opt/egroupware/html/.htaccess - -echo "Setting file access rules:" -cd /opt/egroupware -echo " - Changing owner recursivly..." -chown -R root:root /opt/egroupware/html -echo " - Recursive CHMOD 755 on folders..." -find html -type d -exec chmod 755 {} \; -echo " - Recursive CHMOD 644 on files..." -find html -type f -exec chmod 644 {} \; -echo " - Customization of CHMOD for a few folders..." -chmod 770 /opt/egroupware/backup -chmod 770 /opt/egroupware/files -chmod 770 /opt/egroupware/files/g2data -chmod 770 /opt/egroupware/tmp -chown www:www /opt/egroupware/backup -chown www:www /opt/egroupware/files -chown www:www /opt/egroupware/files/g2data -chown www:www /opt/egroupware/tmp +#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 +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/ + +#echo "Cleaning Install..." +#rm -rf /opt/egroupware/egroupware +#rm -rf /opt/egroupware/html/debian +#rm -f /opt/egroupware/html/.htaccess + +#echo "Setting file access rules:" +#cd /opt/egroupware +#echo " - Changing owner recursivly..." +#chown -R root:root /opt/egroupware/html +#echo " - Recursive CHMOD 755 on folders..." +#find html -type d -exec chmod 755 {} \; +#echo " - Recursive CHMOD 644 on files..." +#find html -type f -exec chmod 644 {} \; +#echo " - Customization of CHMOD for a few folders..." +#chmod 770 /opt/egroupware/backup +#chmod 770 /opt/egroupware/files +#chmod 770 /opt/egroupware/files/g2data +#chmod 770 /opt/egroupware/tmp +#chown www:www /opt/egroupware/backup +#chown www:www /opt/egroupware/files +#chown www:www /opt/egroupware/files/g2data +#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 /opt/egroupware/html - ln -s sitemgr/sitemgr-link + 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.4.004/Sources/header.inc.php > /opt/egroupware/header.inc.php ;; - *) mv -f /opt/egroupware/html/header.inc.php /opt/egroupware/ 2>/dev/null ;; + 0) sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/header.inc.php > /usr/share/egroupware/header.inc.php ;; +# *) mv -f /opt/egroupware/html/header.inc.php /opt/egroupware/ 2>/dev/null ;; esac -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 "Preparing Gallery2..." -if [ -f /opt/egroupware/html/gallery/gallery2/config.php ] ; then - touch /opt/egroupware/html/gallery/gallery2/config.php -else - sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.4.004/Sources/Gallery2/config.php > /opt/egroupware/html/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 " " - -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 " " +#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 + + +# 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 + +#chmod 640 /opt/egroupware/html/gallery/gallery2/config.php +#chown www:www /opt/egroupware/html/gallery/gallery2/config.php +#echo " " + +### this one will be done by event +#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 " " echo "-------------------------------------------------------------------------------" case $UPDATE in @@ -313,7 +325,7 @@ echo "---------------------------------- %preun if [ $1 = 0 ] ; then - mv /usr/share/doc/eGroupWare-1.4.004/Sources/DO_NOT_USE_OR_DELETE/eGW-Full-Uninstall.sh /root/ + mv /usr/share/doc/eGroupWare-1.8.005/Sources/DO_NOT_USE_OR_DELETE/eGW-Full-Uninstall.sh /root/ fi