/[smecontribs]/rpms/smeserver-egroupware/contribs8/smeserver-egroupware.spec
ViewVC logotype

Diff of /rpms/smeserver-egroupware/contribs8/smeserver-egroupware.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by unnilennium, Tue Jun 4 21:03:24 2013 UTC Revision 1.3 by unnilennium, Thu Dec 12 17:03:05 2013 UTC
# Line 1  Line 1 
1  # $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 $
2  # Authority: cool34000  # Authority: cool34000
3  # Name: Sylvain Gomez  # Name: Sylvain Gomez
4    
5  %define name smeserver-egroupware  %define name smeserver-egroupware
6  %define version 1.4.004  %define version 1.8.005
7  %define release 2  %define release 1
8  %define rpmver   4.0.4  %define rpmver   4.0.4
9    
10    
11  Summary:            eGroupware web application for SME >7  Summary:            eGroupware web application for SME >=8
12  Name:               %{name}  Name:               %{name}
13  Version:            %{version}  Version:            %{version}
14  Release:            %{release}%{?dist}  Release:            %{release}%{?dist}
15  License:            GPL  License:            GPL
16  Group:              Web/Application  Group:              Web/Application
17  Source:             %{name}-%{version}.tar.gz  Source:             %{name}-%{version}.tgz
18  URL:                http://www.egroupware.org  URL:                http://www.egroupware.org
19  BuildRoot:          /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot:          /var/tmp/%{name}-%{version}-%{release}-buildroot
20  BuildArchitectures: noarch  BuildArchitectures: noarch
21  BuildRequires:      e-smith-devtools  BuildRequires:      e-smith-devtools
22  Requires:           e-smith-base, e-smith-release >= 8  Requires:           e-smith-base, e-smith-release >= 8
23  Patch0: smeserver-egroupware-1.4.004-tmp_dir.patch  Requires:           eGroupware >= 1.8
24    Requires:           eGroupware-gallery >= 1.8
25    
26  %description  %description
27  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.
28  eGroupWare is a free enterprise ready groupware software for your network.  eGroupWare is a free enterprise ready groupware software for your network.
29  It enables you to manage contacts, appointments, todos and many more for your whole business.  It enables you to manage contacts, appointments, todos and many more for your whole business.
30  eGroupWare is a groupware server. It comes with a native web-interface which allowes to access  eGroupWare is a groupware server. It comes with a native web-interface which allowes to access
# Line 39  https://yourdomain.com/egroupware Line 39  https://yourdomain.com/egroupware
39    
40    
41  %changelog  %changelog
42    * Thu Dec 12 2013 JP Pialasse <tests@pialasse.com> 1.8.005-1.sme
43    - upgrade to eGroupware 1.8 using opensuse rpm for Centos5
44    - built for eGroupware-1.8.005.20131007
45    - see [SME: 8040]
46    
47  * Tue Jun 04 2013 JP Pialasse <tests@pialasse.com> 1.4.004-2.sme  * Tue Jun 04 2013 JP Pialasse <tests@pialasse.com> 1.4.004-2.sme
48  - fix upload dir not defined [SME 7653]  - fix upload dir not defined [SME 7653]
49  - updated e-smith-release >8  - updated e-smith-release >8
# Line 125  https://yourdomain.com/egroupware Line 130  https://yourdomain.com/egroupware
130    
131    
132  %setup  %setup
133  %patch0 -p1  #%patch0 -p1
134    
135  %build  %build
136  # Creating templates2adjust  # Creating templates2adjust
137  perl createlinks  perl createlinks
138    
139    
140    ### now in archive
141  # Default DB parameters  # Default DB parameters
142  DEFAULTS1=root/etc/e-smith/db/configuration/defaults/egroupware  #DEFAULTS1=root/etc/e-smith/db/configuration/defaults/egroupware
143  DEFAULTS2=root/etc/e-smith/db/accounts/defaults/egroupware  #DEFAULTS2=root/etc/e-smith/db/accounts/defaults/egroupware
144  mkdir -p $DEFAULTS1  #mkdir -p $DEFAULTS1
145  mkdir -p $DEFAULTS2  #mkdir -p $DEFAULTS2
146  echo "egroupware" > $DEFAULTS1/DbName  #echo "egroupware" > $DEFAULTS1/DbName
147  echo "egwuser"    > $DEFAULTS1/DbUser  #echo "egwuser"    > $DEFAULTS1/DbUser
148  echo "on"         > $DEFAULTS1/HTTPS  #echo "on"         > $DEFAULTS1/HTTPS
149  echo "eGroupWare" > $DEFAULTS1/Name  #echo "eGroupWare" > $DEFAULTS1/Name
150  echo "global"     > $DEFAULTS1/PublicAccess  #echo "global"     > $DEFAULTS1/PublicAccess
151  echo "url"        > $DEFAULTS1/type  #echo "url"        > $DEFAULTS1/type
152  echo "reserved"   > $DEFAULTS2/type  #echo "reserved"   > $DEFAULTS2/type
153    
154    
155  %install  %install
# Line 166  case $UPDATE in Line 173  case $UPDATE in
173      ;;      ;;
174    *)    *)
175      echo "Updating eGroupware... Please wait!"      echo "Updating eGroupware... Please wait!"
176      echo "Backup folder: /opt/eGW_RPM_BACKUP"  #    echo "Backup folder: /opt/eGW_RPM_BACKUP"
177      mkdir -p /opt/eGW_RPM_BACKUP      mkdir -p /opt/eGW_RPM_BACKUP
178      cd /opt  #    cd /opt
179      echo "Backing up installation files..."  #    echo "Backing up installation files..."
180      tar -czf /opt/eGW_RPM_BACKUP/egroupware.tar.gz egroupware  #    tar -czf /opt/eGW_RPM_BACKUP/egroupware.tar.gz egroupware
181      echo "Backing up MySQL database..."      echo "Backing up MySQL database..."
182      mysqldump egroupware > /opt/eGW_RPM_BACKUP/egroupware.sql      mysqldump egroupware > /opt/eGW_RPM_BACKUP/egroupware$(date +%Y-%m-%d).sql
183      /sbin/e-smith/db configuration show egroupware > /opt/eGW_RPM_BACKUP/config.txt      /sbin/e-smith/db configuration show egroupware > /opt/eGW_RPM_BACKUP/config.txt
184      ;;      ;;
185  esac  esac
# Line 187  DOMAIN=$(/sbin/e-smith/db configuration Line 194  DOMAIN=$(/sbin/e-smith/db configuration
194  EGPASS=$(/sbin/e-smith/db configuration getprop egroupware DbPassword)  EGPASS=$(/sbin/e-smith/db configuration getprop egroupware DbPassword)
195  UPDATE=$(ls /opt | grep -c egroupware)  UPDATE=$(ls /opt | grep -c egroupware)
196    
197  echo "Decompressing files..."  #echo "Decompressing files..."
198  mkdir -p /opt/egroupware/{files/g2data,backup,tmp}  #mkdir -p /opt/egroupware/{files/g2data,backup,tmp}
199  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-1.4.004.tar.gz -C /opt/egroupware
200  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-egw-pear-1.4.004.tar.gz -C /opt/egroupware
201  tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-gallery-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
202  cp -f /usr/share/doc/eGroupWare-1.4.004/Sources/phpSysInfo/config.php /opt/egroupware/html/phpsysinfo/  cp -f /usr/share/doc/eGroupWare-1.8.005/Sources/phpSysInfo/config.php /usr/share/egroupware/phpsysinfo/
203  cp -f /usr/share/doc/eGroupWare-1.4.004/Sources/phpSysInfo/Redhat.png /opt/egroupware/html/phpsysinfo/images/  cp -f /usr/share/doc/eGroupWare-1.8.005/Sources/phpSysInfo/Redhat.png /usr/share/egroupware/phpsysinfo/images/
204    
205  echo "Cleaning Install..."  #echo "Cleaning Install..."
206  rm -rf /opt/egroupware/egroupware  #rm -rf /opt/egroupware/egroupware
207  rm -rf /opt/egroupware/html/debian  #rm -rf /opt/egroupware/html/debian
208  rm -f  /opt/egroupware/html/.htaccess  #rm -f  /opt/egroupware/html/.htaccess
209    
210  echo "Setting file access rules:"  #echo "Setting file access rules:"
211  cd /opt/egroupware  #cd /opt/egroupware
212  echo "   - Changing owner recursivly..."  #echo "   - Changing owner recursivly..."
213  chown -R root:root /opt/egroupware/html  #chown -R root:root /opt/egroupware/html
214  echo "   - Recursive CHMOD 755 on folders..."  #echo "   - Recursive CHMOD 755 on folders..."
215  find html -type d -exec chmod 755 {} \;  #find html -type d -exec chmod 755 {} \;
216  echo "   - Recursive CHMOD 644 on files..."  #echo "   - Recursive CHMOD 644 on files..."
217  find html -type f -exec chmod 644 {} \;  #find html -type f -exec chmod 644 {} \;
218  echo "   - Customization of CHMOD for a few folders..."  #echo "   - Customization of CHMOD for a few folders..."
219  chmod 770     /opt/egroupware/backup  #chmod 770     /opt/egroupware/backup
220  chmod 770     /opt/egroupware/files  #chmod 770     /opt/egroupware/files
221  chmod 770     /opt/egroupware/files/g2data  #chmod 770     /opt/egroupware/files/g2data
222  chmod 770     /opt/egroupware/tmp  #chmod 770     /opt/egroupware/tmp
223  chown www:www /opt/egroupware/backup  #chown www:www /opt/egroupware/backup
224  chown www:www /opt/egroupware/files  #chown www:www /opt/egroupware/files
225  chown www:www /opt/egroupware/files/g2data  #chown www:www /opt/egroupware/files/g2data
226  chown www:www /opt/egroupware/tmp  #chown www:www /opt/egroupware/tmp
227    
228    # fixed this one adding .php, not sure if still necessary
229  if [ "$UPDATE" = "0" ] ; then  if [ "$UPDATE" = "0" ] ; then
230    echo "Preparing Site-Mgr..."    echo "Preparing Site-Mgr..."
231    cd /opt/egroupware/html    cd /usr/share/egroupware
232    ln -s sitemgr/sitemgr-link    ln -s sitemgr/sitemgr-link.php
233  fi  fi
234    
235  echo "Preparing header.inc.php..."  echo "Preparing header.inc.php..."
236  case $UPDATE in  case $UPDATE in
237    0) sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.4.004/Sources/header.inc.php > /opt/egroupware/header.inc.php ;;    0) sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/header.inc.php > /usr/share/egroupware/header.inc.php ;;
238    *) mv -f /opt/egroupware/html/header.inc.php /opt/egroupware/ 2>/dev/null ;;  #  *) mv -f /opt/egroupware/html/header.inc.php /opt/egroupware/ 2>/dev/null ;;
239  esac  esac
240  chown www:www /opt/egroupware/header.inc.php  #chown www:www /opt/egroupware/header.inc.php
241  chmod 640     /opt/egroupware/header.inc.php  #chmod 640     /opt/egroupware/header.inc.php
242  cd /opt/egroupware/html  #cd /opt/egroupware/html
243  ln -s ../header.inc.php 2>/dev/null  #ln -s ../header.inc.php 2>/dev/null
244    
245  echo "Preparing Gallery2..."  
246  if [ -f /opt/egroupware/html/gallery/gallery2/config.php ] ; then  # the integration is complete Ithink now.....
247    touch /opt/egroupware/html/gallery/gallery2/config.php  #echo "Preparing Gallery2..."
248  else  #if [ -f /usr/share/egroupware/gallery/gallery2_config.php ] ; then
249    sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.4.004/Sources/Gallery2/config.php > /opt/egroupware/html/gallery/gallery2/config.php  #  touch /usr/share/egroupware/gallery/gallery2_config.php
250  fi  #else
251  chmod 640     /opt/egroupware/html/gallery/gallery2/config.php  #  sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/Gallery2/config.php > /usr/share/egroupware/gallery/gallery2_config.php
252  chown www:www /opt/egroupware/html/gallery/gallery2/config.php  #fi
253  echo " "  
254    #chmod 640     /opt/egroupware/html/gallery/gallery2/config.php
255  echo "MySQL installation:"  #chown www:www /opt/egroupware/html/gallery/gallery2/config.php
256  if [ "$UPDATE" = "0" ] ; then  #echo " "
257    cp /usr/share/doc/eGroupWare-1.4.004/Sources/81egw_database.sql /etc/e-smith/sql/init/  
258  fi  ### this one will be done by event
259  /sbin/e-smith/expand-template /etc/e-smith/sql/init/80egw_mysql.sql  #echo "MySQL installation:"
260  /sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_domain.sql  #if [ "$UPDATE" = "0" ] ; then
261  /etc/rc.d/init.d/mysql.init start  #  cp /usr/share/doc/eGroupWare-1.4.004/Sources/81egw_database.sql /etc/e-smith/sql/init/
262  echo " "  #fi
263    #/sbin/e-smith/expand-template /etc/e-smith/sql/init/80egw_mysql.sql
264  echo "Applying modifications to services..."  #/sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_domain.sql
265  /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf  #/etc/rc.d/init.d/mysql.init start
266  /etc/rc7.d/S86httpd-e-smith sigusr1  #echo " "
267  /etc/rc.d/init.d/crond restart  
268  echo " "  #echo "Applying modifications to services..."
269    #/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
270    #/etc/rc7.d/S86httpd-e-smith sigusr1
271    #/etc/rc.d/init.d/crond restart
272    #echo " "
273    
274  echo "-------------------------------------------------------------------------------"  echo "-------------------------------------------------------------------------------"
275  case $UPDATE in  case $UPDATE in
# Line 313  echo "---------------------------------- Line 325  echo "----------------------------------
325    
326  %preun  %preun
327  if [ $1 = 0 ] ; then  if [ $1 = 0 ] ; then
328    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/
329  fi  fi
330    
331    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed