/[smecontribs]/rpms/smeserver-groupoffice/contribs7/smeserver-groupoffice-2.18.1-7.spec
ViewVC logotype

Contents of /rpms/smeserver-groupoffice/contribs7/smeserver-groupoffice-2.18.1-7.spec

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


Revision 1.3 - (show annotations) (download)
Tue Feb 26 01:05:32 2008 UTC (16 years, 3 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
FILE REMOVED
Remove version from spec

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

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