/[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.5 by unnilennium, Thu Dec 12 22:38:13 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.4 2013/12/12 21:42:30 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 3
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    Patch0:             smeserver-egroupware-1.8.005-g2datapath.patch
19  URL:                http://www.egroupware.org  URL:                http://www.egroupware.org
20  BuildRoot:          /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot:          /var/tmp/%{name}-%{version}-%{release}-buildroot
21  BuildArchitectures: noarch  BuildArchitectures: noarch
22  BuildRequires:      e-smith-devtools  BuildRequires:      e-smith-devtools
23  Requires:           e-smith-base, e-smith-release >= 8  Requires:           e-smith-base, e-smith-release >= 8
24  Patch0: smeserver-egroupware-1.4.004-tmp_dir.patch  Requires:           eGroupware >= 1.8
25    Requires:           eGroupware-gallery >= 1.8
26    
27  %description  %description
28  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.
29  eGroupWare is a free enterprise ready groupware software for your network.  eGroupWare is a free enterprise ready groupware software for your network.
30  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.
31  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 40  https://yourdomain.com/egroupware
40    
41    
42  %changelog  %changelog
43    * Thu Dec 12 2013 JP Pialasse <tests@pialasse.com> 1.8.005-3.sme
44    - upgrade to eGroupware 1.8 using opensuse rpm for Centos5
45    - built for eGroupware-1.8.005.20131007
46    - see [SME: 8040]
47    - 2 revert back some configuration in spec
48    - will need to move to an event
49    - 3 fix tmp and sess directory
50    - fix default g2data path
51    
52  * 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
53  - fix upload dir not defined [SME 7653]  - fix upload dir not defined [SME 7653]
54  - updated e-smith-release >8  - updated e-smith-release >8
# Line 131  https://yourdomain.com/egroupware Line 141  https://yourdomain.com/egroupware
141  # Creating templates2adjust  # Creating templates2adjust
142  perl createlinks  perl createlinks
143    
144    
145    ### now in archive
146  # Default DB parameters  # Default DB parameters
147  DEFAULTS1=root/etc/e-smith/db/configuration/defaults/egroupware  #DEFAULTS1=root/etc/e-smith/db/configuration/defaults/egroupware
148  DEFAULTS2=root/etc/e-smith/db/accounts/defaults/egroupware  #DEFAULTS2=root/etc/e-smith/db/accounts/defaults/egroupware
149  mkdir -p $DEFAULTS1  #mkdir -p $DEFAULTS1
150  mkdir -p $DEFAULTS2  #mkdir -p $DEFAULTS2
151  echo "egroupware" > $DEFAULTS1/DbName  #echo "egroupware" > $DEFAULTS1/DbName
152  echo "egwuser"    > $DEFAULTS1/DbUser  #echo "egwuser"    > $DEFAULTS1/DbUser
153  echo "on"         > $DEFAULTS1/HTTPS  #echo "on"         > $DEFAULTS1/HTTPS
154  echo "eGroupWare" > $DEFAULTS1/Name  #echo "eGroupWare" > $DEFAULTS1/Name
155  echo "global"     > $DEFAULTS1/PublicAccess  #echo "global"     > $DEFAULTS1/PublicAccess
156  echo "url"        > $DEFAULTS1/type  #echo "url"        > $DEFAULTS1/type
157  echo "reserved"   > $DEFAULTS2/type  #echo "reserved"   > $DEFAULTS2/type
158    
159    
160  %install  %install
161  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
162  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
163  rm -f %{name}-%{version}-filelist  rm -f %{name}-%{version}-filelist
164  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
165    |grep -v egroupware_tmp |grep -v egroupware_sess \
166    > %{name}-%{version}-filelist
167    
168    echo "%dir %attr(0755,www,www) /usr/share/egroupware_tmp">> %{name}-%{version}-filelist
169    echo "%dir %attr(0755,www,www) /usr/share/egroupware_sess">> %{name}-%{version}-filelist
170    
171    
172  %clean  %clean
# Line 166  case $UPDATE in Line 183  case $UPDATE in
183      ;;      ;;
184    *)    *)
185      echo "Updating eGroupware... Please wait!"      echo "Updating eGroupware... Please wait!"
186      echo "Backup folder: /opt/eGW_RPM_BACKUP"  #    echo "Backup folder: /opt/eGW_RPM_BACKUP"
187      mkdir -p /opt/eGW_RPM_BACKUP      mkdir -p /opt/eGW_RPM_BACKUP
188      cd /opt  #    cd /opt
189      echo "Backing up installation files..."  #    echo "Backing up installation files..."
190      tar -czf /opt/eGW_RPM_BACKUP/egroupware.tar.gz egroupware  #    tar -czf /opt/eGW_RPM_BACKUP/egroupware.tar.gz egroupware
191      echo "Backing up MySQL database..."      echo "Backing up MySQL database..."
192      mysqldump egroupware > /opt/eGW_RPM_BACKUP/egroupware.sql      mysqldump egroupware > /opt/eGW_RPM_BACKUP/egroupware$(date +%Y-%m-%d).sql
193      /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
194      ;;      ;;
195  esac  esac
# Line 180  esac Line 197  esac
197    
198  %post  %post
199  # Initializing SME DB  # Initializing SME DB
200  /etc/e-smith/events/actions/initialize-default-databases  echo "Initializing SME DB"
201    /etc/e-smith/events/actions/initialize-default-databases 2>/dev/null
202    echo " "
203    
204  # Variables  # Variables
205  DOMAIN=$(/sbin/e-smith/db configuration get DomainName)  DOMAIN=$(/sbin/e-smith/db configuration get DomainName)
206  EGPASS=$(/sbin/e-smith/db configuration getprop egroupware DbPassword)  EGPASS=$(/sbin/e-smith/db configuration getprop egroupware DbPassword)
207  UPDATE=$(ls /opt | grep -c egroupware)  UPDATE=$(ls /usr/share/ | grep -c egroupware)
208    
209  echo "Decompressing files..."  #echo "Decompressing files..."
210  mkdir -p /opt/egroupware/{files/g2data,backup,tmp}  #mkdir -p /opt/egroupware/{files/g2data,backup,tmp}
211  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
212  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
213  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
214  cp -f /usr/share/doc/eGroupWare-1.4.004/Sources/phpSysInfo/config.php /opt/egroupware/html/phpsysinfo/  echo "Preparing phpSysInfo..."
215  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/config.php /usr/share/egroupware/phpsysinfo/
216    cp -f /usr/share/doc/eGroupWare-1.8.005/Sources/phpSysInfo/Redhat.png /usr/share/egroupware/phpsysinfo/images/
217  echo "Cleaning Install..."  
218  rm -rf /opt/egroupware/egroupware  #echo "Cleaning Install..."
219  rm -rf /opt/egroupware/html/debian  #rm -rf /opt/egroupware/egroupware
220  rm -f  /opt/egroupware/html/.htaccess  #rm -rf /opt/egroupware/html/debian
221    #rm -f  /opt/egroupware/html/.htaccess
222  echo "Setting file access rules:"  
223  cd /opt/egroupware  #echo "Setting file access rules:"
224  echo "   - Changing owner recursivly..."  #cd /opt/egroupware
225  chown -R root:root /opt/egroupware/html  #echo "   - Changing owner recursivly..."
226  echo "   - Recursive CHMOD 755 on folders..."  #chown -R root:root /opt/egroupware/html
227  find html -type d -exec chmod 755 {} \;  #echo "   - Recursive CHMOD 755 on folders..."
228  echo "   - Recursive CHMOD 644 on files..."  #find html -type d -exec chmod 755 {} \;
229  find html -type f -exec chmod 644 {} \;  #echo "   - Recursive CHMOD 644 on files..."
230  echo "   - Customization of CHMOD for a few folders..."  #find html -type f -exec chmod 644 {} \;
231  chmod 770     /opt/egroupware/backup  #echo "   - Customization of CHMOD for a few folders..."
232  chmod 770     /opt/egroupware/files  #chmod 770     /opt/egroupware/backup
233  chmod 770     /opt/egroupware/files/g2data  #chmod 770     /opt/egroupware/files
234  chmod 770     /opt/egroupware/tmp  #chmod 770     /opt/egroupware/files/g2data
235  chown www:www /opt/egroupware/backup  #chmod 770     /opt/egroupware/tmp
236  chown www:www /opt/egroupware/files  #chown www:www /opt/egroupware/backup
237  chown www:www /opt/egroupware/files/g2data  #chown www:www /opt/egroupware/files
238  chown www:www /opt/egroupware/tmp  #chown www:www /opt/egroupware/files/g2data
239    #chown www:www /opt/egroupware/tmp
240  if [ "$UPDATE" = "0" ] ; then  
241    echo "Preparing Site-Mgr..."  # fixed this one adding .php, not sure if still necessary
242    cd /opt/egroupware/html  #if [ "$UPDATE" = "0" ] ; then
243    ln -s sitemgr/sitemgr-link  #  echo "Preparing Site-Mgr..."
244  fi  #  cd /usr/share/egroupware
245    #  ln -s sitemgr/sitemgr-link.php
246    #fi
247    
248  echo "Preparing header.inc.php..."  echo "Preparing header.inc.php..."
249  case $UPDATE in  # if first install
250    0) sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.4.004/Sources/header.inc.php > /opt/egroupware/header.inc.php ;;  if [ "$1" = "1" ] ; then
251    *) mv -f /opt/egroupware/html/header.inc.php /opt/egroupware/ 2>/dev/null ;;  #  0)
252  esac  sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/header.inc.php > /usr/share/egroupware/header.inc.php
253  chown www:www /opt/egroupware/header.inc.php  echo " done!"
254  chmod 640     /opt/egroupware/header.inc.php  fi
255  cd /opt/egroupware/html  #  *) mv -f /opt/egroupware/html/header.inc.php /opt/egroupware/ 2>/dev/null ;;
256  ln -s ../header.inc.php 2>/dev/null  #esacc
257    #chown www:www /opt/egroupware/header.inc.php
258    #chmod 640     /opt/egroupware/header.inc.php
259    #cd /opt/egroupware/html
260    #ln -s ../header.inc.php 2>/dev/null
261    echo " "
262    
263    # the integration is complete Ithink now.....
264  echo "Preparing Gallery2..."  echo "Preparing Gallery2..."
265  if [ -f /opt/egroupware/html/gallery/gallery2/config.php ] ; then  if [ -f /usr/share/egroupware/gallery/gallery2/config.php ] ; then
266    touch /opt/egroupware/html/gallery/gallery2/config.php    touch /usr/share/egroupware/gallery/gallery2/config.php
267  else  else
268    sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.4.004/Sources/Gallery2/config.php > /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
269  fi  fi
270  chmod 640     /opt/egroupware/html/gallery/gallery2/config.php  
271  chown www:www /opt/egroupware/html/gallery/gallery2/config.php  chmod 640     /usr/share/egroupware/gallery/gallery2/config.php
272    chown www:www /usr/share/egroupware/gallery/gallery2/config.php
273  echo " "  echo " "
274    
275    ### this one will be done by event
276  echo "MySQL installation:"  echo "MySQL installation:"
277  if [ "$UPDATE" = "0" ] ; then  #if [ "$UPDATE" = "0" ] ; then
278    cp /usr/share/doc/eGroupWare-1.4.004/Sources/81egw_database.sql /etc/e-smith/sql/init/  #  cp /usr/share/doc/eGroupWare-1.4.004/Sources/81egw_database.sql /etc/e-smith/sql/init/
279  fi  #fi
280  /sbin/e-smith/expand-template /etc/e-smith/sql/init/80egw_mysql.sql  /sbin/e-smith/expand-template /etc/e-smith/sql/init/80egw_mysql.sql
281    /sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_default
282  /sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_domain.sql  /sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_domain.sql
283  /etc/rc.d/init.d/mysql.init start  /etc/rc.d/init.d/mysql.init start
284  echo " "  echo " "
# Line 313  echo "---------------------------------- Line 343  echo "----------------------------------
343    
344  %preun  %preun
345  if [ $1 = 0 ] ; then  if [ $1 = 0 ] ; then
346    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/
347  fi  fi
348    
349    


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