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

Annotation of /rpms/smeserver-groupoffice/contribs8/smeserver-groupoffice.spec

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


Revision 1.1 - (hide annotations) (download)
Sun Mar 3 04:50:38 2013 UTC (11 years, 8 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-groupoffice-2_18_1-7_el5_sme, HEAD
Initial import

1 unnilennium 1.1 # $Id: smeserver-groupoffice.spec,v 1.4 2008/11/25 16:20:23 slords Exp $
2     # Authority: nocvs
3     # Name: Dietmar Berteld
4    
5     %define name smeserver-groupoffice
6     %define version 2.18.1
7     %define release 7
8     %define rpmver 4.0.4
9    
10     Summary: GroupOffice Collaboration-Suite Web Application for SME Server 7.x based on GroupOffice 2.18-stable-1
11     Name: %{name}
12     Version: %{version}
13     Release: %{release}%{?dist}
14     License: GPL
15     Group: /Web/Applications
16     Source: %{name}-%{version}.tar.gz
17     URL: http://group-office.com/
18     BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
19     BuildArchitectures: noarch
20     Requires: e-smith-base, e-smith-release >= 7
21     BuildRequires: e-smith-devtools
22    
23     %description
24     This RPM is an unofficial addon for the SME Server 7.x.
25     The target audience is the Linux/E-smith administrator
26     who wants to add Collaboration package .
27     Group-Office is a Groupware suite containing a base system and different modules.
28     The modules are designed in a way that groups of people can collaborate online.
29     Shared calendars, addressbooks, projects, files and e-mail are the key features of the project.
30     Users use their favorite browser to access their groupware from all over the world.
31     Combined with the powerful Linux operating system it is a complete enterprise solution for the small to medium enterprise.
32     After installation open your webbrowser your local site
33     https://your_e-smith-server_adress/groupoffice
34    
35    
36    
37     %changelog
38     * Mon Nov 05 2007 Dietmar Berteld <dietmar@berteld.com>
39     - [2.18.1-7] Upgrade to new GroupOffice version 2.18-stable-1
40     Change to e-mail-auth with automatic user creation
41    
42     * Thu Oct 04 2007 Dietmar Berteld <dietmar@berteld.com>
43     - [2.17.13-6] Upgrade to new GroupOffice version 2.17-stable-13
44    
45     * Fri May 25 2007 Dietmar Berteld <dietmar@berteld.com>
46     - [2.17.2-5] Upgrade to new GroupOffice version 2.17-stable-2
47    
48     * Sun May 13 2007 Dietmar Berteld <dietmar@berteld.com>
49     - [2.16.10-4] Add auto-configuration for languages and domain-settings, delete install-folder
50    
51     * Wed Apr 25 2007 Dietmar Berteld <dietmar@berteld.com>
52     - [2.16.10-3] Change rights to root:root, MySQL-userrights
53    
54     * Thu Feb 20 2007 Dietmar Berteld <dietmar@berteld.com>
55     - [2.16.10-2] New location: /opt/groupoffice
56    
57     * Thu Feb 06 2007 Dietmar Berteld <dietmar@berteld.com>
58     - [2.16.10-1] Initial version
59    
60     %prep
61     rm -rf $RPM_BUILD_ROOT
62    
63     %setup
64    
65     %build
66    
67     %install
68     rm -rf $RPM_BUILD_ROOT
69     (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
70     rm -f %{name}-%{version}-filelist
71     /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
72    
73     %clean
74     rm -rf $RPM_BUILD_ROOT
75    
76     %pre
77     UPDATE=$(ls /opt | grep -c groupoffice)
78     HTMLDIR=/opt/groupoffice
79     case $UPDATE in
80     0)
81     echo "Installing GroupOffice... Please wait!"
82     ;;
83     *)
84     echo "Updating GroupOffice... Please wait!"
85     mkdir -p /opt/GO_RPM_BACKUP
86     cd /opt
87     echo "Backing up installation files..."
88     tar -czf /opt/GO_RPM_BACKUP/groupoffice.tar.gz groupoffice
89     echo "Backing up MySQL database..."
90     mysqldump groupoffice > /opt/GO_RPM_BACKUP/groupoffice.sql
91     /sbin/e-smith/db configuration show groupoffice > /opt/GO_RPM_BACKUP/config.txt
92     ;;
93     esac
94    
95     %post
96     /etc/e-smith/events/actions/initialize-default-databases
97     # General Information
98     APP=GroupOffice
99     URL=groupoffice
100     WORKDIR=/root
101     INSTALLDIR=/usr/share/doc/groupoffice-com-2.18-stable-1/Sources
102     HTMLDIR=/opt/groupoffice
103     MYSQLDB=groupoffice
104     MYSQLUSER=gofficeuser
105     MYSQLPASS=$(/sbin/e-smith/db configuration getprop groupoffice DbPassword)
106     DOMAIN=$(/sbin/e-smith/db configuration get DomainName)
107     SRVNAME=$(/sbin/e-smith/db configuration get SystemName)
108     UPDATE=$(ls /opt | grep -c groupoffice)
109     grep "LANG=" /etc/sysconfig/i18n > lang1
110     sed -e 's/LANG="//g' lang1 > lang2
111     sed -e 's/"//g' lang2 > lang
112     LANG=$(cat lang)
113     rm -rf lang*
114     #Untar application
115     echo "Decompressing files..."
116     mkdir -p $HTMLDIR/{files,home,tmp}
117     chmod 0775 $HTMLDIR/{files,home,tmp}
118     tar xzf $INSTALLDIR/gocom218s1.tar.gz -C $HTMLDIR
119     case $UPDATE in
120     0) mv -f $HTMLDIR/groupoffice-com-2.18-stable-1 $HTMLDIR/html ;;
121     *) cp -ufR $HTMLDIR/groupoffice-com-2.18-stable-1/* $HTMLDIR/html --reply=yes ;;
122     esac
123     rm -rf $HTMLDIR/groupoffice-com-2.18-stable-1
124     mkdir -p $HTMLDIR/html/local
125     chmod 0775 $HTMLDIR/html/local
126     #Prepare config settings
127     if [ "$UPDATE" = "0" ]; then
128     sed 's.gofficepassword.'$MYSQLPASS'.g' $INSTALLDIR/config.php > $HTMLDIR/html/config1.php
129     sed "s/mydomain/$DOMAIN/g" $HTMLDIR/html/config1.php > $HTMLDIR/html/config2.php
130     sed "s/mysmtpserver/$SRVNAME.$DOMAIN/g" $HTMLDIR/html/config2.php > $HTMLDIR/html/config.php
131     sed "s/mydomain/$DOMAIN/g" $INSTALLDIR/auth_sources.inc > $HTMLDIR/html/auth_sources.inc
132     rm $HTMLDIR/html/config1.php
133     rm $HTMLDIR/html/config2.php
134     case "$LANG" in
135     de_DE) sed -e "s/'en-us'/'de'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
136     es_ES) sed -e "s/'en-us'/'es'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
137     fr_FR) sed -e "s/'en-us'/'fr'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
138     it_IT) sed -e "s/'en-us'/'it'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
139     sv_FI) sed -e "s/'en-us'/'sv'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
140     esac
141     case "$LANG" in
142     de_DE) sed -e "s/'223'/'81'/" $HTMLDIR/html/config.php.new >$HTMLDIR/html/config.php ;;
143     es_ES) sed -e "s/'223'/'195'/" $HTMLDIR/html/config.php.new >$HTMLDIR/html/config.php ;;
144     fr_FR) sed -e "s/'223'/'73'/" $HTMLDIR/html/config.php.new >$HTMLDIR/html/config.php ;;
145     it_IT) sed -e "s/'223'/'105'/" $HTMLDIR/html/config.php.new >$HTMLDIR/html/config.php ;;
146     sv_FI) sed -e "s/'223'/'203'/" $HTMLDIR/html/config.php.new >$HTMLDIR/html/config.php ;;
147     esac
148     case "$LANG" in
149     de_DE) sed -e "s/'-5'/'+1'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
150     es_ES) sed -e "s/'-5'/'+1'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
151     fr_FR) sed -e "s/'-5'/'+1'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
152     it_IT) sed -e "s/'-5'/'+1'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
153     sv_FI) sed -e "s/'-5'/'+1'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
154     esac
155     case "$LANG" in
156     de_DE) sed -e "s/'-'/'.'/" $HTMLDIR/html/config.php.new >$HTMLDIR/html/config.php ;;
157     es_ES) sed -e "s/'-'/'.'/" $HTMLDIR/html/config.php.new >$HTMLDIR/html/config.php ;;
158     fr_FR) sed -e "s/'-'/'.'/" $HTMLDIR/html/config.php.new >$HTMLDIR/html/config.php ;;
159     it_IT) sed -e "s/'-'/'.'/" $HTMLDIR/html/config.php.new >$HTMLDIR/html/config.php ;;
160     sv_FI) sed -e "s/'-'/'.'/" $HTMLDIR/html/config.php.new >$HTMLDIR/html/config.php ;;
161     esac
162     case "$LANG" in
163     de_DE) sed -e "s/'US$'/'EUR'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
164     es_ES) sed -e "s/'US$'/'EUR'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
165     fr_FR) sed -e "s/'US$'/'EUR'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
166     it_IT) sed -e "s/'US$'/'EUR'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
167     sv_FI) sed -e "s/'US$'/'EUR'/" $HTMLDIR/html/config.php >$HTMLDIR/html/config.php.new ;;
168     esac
169     case "$LANG" in
170     de_DE) mv $HTMLDIR/html/config.php.new $HTMLDIR/html/config.php ;;
171     es_ES) mv $HTMLDIR/html/config.php.new $HTMLDIR/html/config.php ;;
172     fr_FR) mv $HTMLDIR/html/config.php.new $HTMLDIR/html/config.php ;;
173     it_IT) mv $HTMLDIR/html/config.php.new $HTMLDIR/html/config.php ;;
174     sv_FI) mv $HTMLDIR/html/config.php.new $HTMLDIR/html/config.php ;;
175     esac
176     chmod 644 $HTMLDIR/html/config.php
177     chmod 644 $HTMLDIR/html/auth_sources.inc
178     rm -rf $HTMLDIR/html/install
179     fi
180     chown -R root.www $HTMLDIR/*
181     chown -R www.www $HTMLDIR/home/
182     #Creating DataBase
183     echo "MySQL installation:"
184     case $UPDATE in
185     0)
186     echo "Creating MySQL User and DataBase..."
187     sed -e "s/'youraddress@yourdomain.com'/'admin@$DOMAIN'/" $INSTALLDIR/$MYSQLDB.sql > $WORKDIR/$MYSQLDB.sql
188     sed -e "s/'yourdomain.com'/'$DOMAINE'/" $WORKDIR/$MYSQLDB.sql > $WORKDIR/$MYSQLDB.sql.new
189     mysqladmin -u root create $MYSQLDB
190     mysql $MYSQLDB < $WORKDIR/$MYSQLDB.sql.new
191     mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) "
192     mysqladmin flush-privileges
193     rm -f $WORKDIR/$MYSQLDB.sql.new
194     ;;
195     *)
196     echo "Fixing MySQL rights..."
197     mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) "
198     mysqladmin flush-privileges
199     ;;
200     esac
201     echo "Applying modifications to services..."
202     /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
203     /usr/local/bin/svc -h /service/httpd-e-smith
204     echo "-------------------------------------------------------------------------------"
205     case $UPDATE in
206     0)
207     echo "GroupOffice Installation completed."
208     echo "Reminder:"
209     echo "- Website open globally"
210     echo "- https mode enabled with automatic redirection"
211     echo "- go to https://$DOMAIN/$URL"
212     echo "- SME users can login with their 'user@$DOMAIN' and password"
213     echo "- GO Admin = 'administrator@Group-Office database' + pw = 'admin'"
214     echo "- Please change GO Admin password"
215     ;;
216     *)
217     echo "GroupOffice update completed."
218     echo "Reminder:"
219     echo "- The old install was backed up and can be found in /opt/GO_RPM_BACKUP"
220     echo " PLEASE MOVE THIS DIRECTORY TO A SAFE PLACE!!!"
221     echo "- Website open globally"
222     echo "- https mode enabled with automatic redirection"
223     echo "- go to https://$DOMAIN/$URL"
224     echo "- SME users can login with their 'user@$DOMAIN' and password"
225     echo "- GO Admin = 'administrator@Group-Office database' + pw = 'admin'"
226     echo "- Please change GO Admin password"
227     ;;
228     esac
229     echo "-------------------------------------------------------------------------------"
230     echo "Following DB parameters are allowed:"
231     echo " # config setprop groupoffice HTTPS on/off"
232     echo " # config setprop groupoffice PublicAccess local/global"
233     echo " "
234     echo "Don't forget to apply modifications with following commands:"
235     echo " # expand-template /etc/httpd/conf/httpd.conf"
236     echo " # svc -h /service/httpd-e-smith"
237     echo " "
238     echo "For more details, see http://wiki.contribs.org/GroupOffice"
239     echo "-------------------------------------------------------------------------------"
240    
241     %preun
242     INSTALLDIR=/usr/share/doc/groupoffice-com-2.18-stable-1/Sources
243     if [ $1 = 0 ] ; then
244     mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/GO-Full-Uninstall.sh /root/
245     fi
246    
247     %postun
248     if [ $1 = 0 ] ; then
249     echo "Restarting services..."
250     /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
251     /usr/local/bin/svc -h /service/httpd-e-smith
252     echo " "
253     echo "Uninstallation finished!"
254     echo "If you want to completly remove it (installation files and MySQL user+database)"
255     echo "please issue the following command at the prompt:"
256     echo "# sh /root/GO-Full-Uninstall.sh"
257     fi
258    
259     %files -f %{name}-%{version}-filelist
260    
261     %defattr(-,root,root)

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