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

Contents of /rpms/smeserver-egroupware/contribs7/smeserver-egroupware.spec

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


Revision 1.6 - (show annotations) (download)
Tue Nov 25 16:20:21 2008 UTC (15 years, 5 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +0 -0 lines
Restore

1 # $Id: smeserver-egroupware.spec,v 1.4 2008/05/14 13:50:54 slords Exp $
2 # Authority: cool34000
3 # Name: Sylvain Gomez
4
5 %define name smeserver-egroupware
6 %define version 1.4.004
7 %define release 1
8 %define rpmver 4.0.4
9
10
11 Summary: eGroupware web application for SME >7
12 Name: %{name}
13 Version: %{version}
14 Release: %{release}%{?dist}
15 License: GPL
16 Group: Web/Application
17 Source: %{name}-%{version}.tar.gz
18 URL: http://www.egroupware.org
19 BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
20 BuildArchitectures: noarch
21 BuildRequires: e-smith-devtools
22 Requires: e-smith-base, e-smith-release >= 7
23
24
25 %description
26 This RPM is an unofficial addon for the SME Server 7.x and above.
27 eGroupWare is a free enterprise ready groupware software for your network.
28 It enables you to manage contacts, appointments, todos and many more for your whole business.
29 eGroupWare is a groupware server. It comes with a native web-interface which allowes to access
30 your data from any platform all over the planet. Moreover you also have the choice to access the
31 eGroupWare server with your favorite groupware client (Kontact, Evolution, Outlook) and also with
32 your mobile or PDA via SyncML.
33 eGroupWare is international. At the time, it supports more than 25 languages including rtl support.
34 eGroupWare is platform independent. The server runs on Linux, Mac, Windows and many more other
35 operating systems. On the client side, all you need is a internetbrowser such as Firefox,
36 Konqueror, Internet Explorer and many more.
37 https://yourdomain.com/egroupware
38
39
40 %changelog
41
42 * Mon May 12 2008 Sylvain Gomez <sylvaingomez@free.fr>
43 - [1.4.004-1] Update to new version 1.4.004
44 Update eGroupWare and Gallery to latest available versions
45 - Apache template modified for FCKeditor (thanks to 'atariblau')
46 - Default database updated
47
48 * Fri Oct 26 2007 Sylvain Gomez <sylvaingomez@free.fr>
49 - [1.4.002-3] Improving SME integration
50 MySQL init templates added
51 - Events added for DomainName changes
52 - MySQL importation method changed
53 - Security is now improved on header.inc.php after an update
54 - Gallery2 added (but not installed by default)
55 - Type changed from service to url
56 - Fudforum obsolete lines commented in Apache template
57
58 * Sun Oct 21 2007 Sylvain Gomez <sylvaingomez@free.fr>
59 - [1.4.002-2] Improving upgradability&MySQL DataBase
60 MySQL DataBase rebuilt in utf-8 (new installations only!)
61 - Fixed Spanish lang in login page (new installations only!)
62 - Fixed MySQL rights after when updating from older version
63 - Fixed files not upgrading from v1.4.001 to v1.4.002
64 - Security is now reset when updating
65 - phpSysInfo security improved in Apache template
66 - Generating shorter passwords (new installations only!)
67 - Description text updated
68 - More comments at the install stage
69
70 * Sat Oct 20 2007 Sylvain Gomez <sylvaingomez@free.fr>
71 - [1.4.002-1] Improving upgradability&RPM structure
72 BETA VERSION
73 - RPM renamed to smeserver-egroupware-1.4.002
74 - Fixed RPM structure
75 - Fixed iCal bug installing old version 1.4.001
76 - Improved Sitemgr (create link instead of moving the folder - new installations only!)
77 - MySQL database rebuilt from scratch
78 - Updating the RPM is now possible
79 - Security improved on header.inc.php (new installations only!)
80 - Some useless items are now deleted
81 - phpSysInfo default configuration review (config.php+SME styled icon)
82
83 * Wed Oct 17 2007 Dietmar Berteld <dietmar@berteld.com>
84 - [1.4-10] Fixing little bugs and better languages support
85 - Fixed Apache not restarting correctly when uninstalling
86 - Fixed security on Header.inc.php
87
88 * Mon Oct 15 2007 Dietmar Berteld <dietmar@berteld.com>
89 - [1.4-9] Changing to new version 1.4.002
90 Fixed HTTPS redirection (Thanks to Sylvain Gomez)
91 - Improved Apache template for better security
92 - Improved integration in SME (https option; PublicAccess local/global - global&https is default)
93 - Cron job added
94
95 * Tue Jul 10 2007 Dietmar Berteld <dietmar@berteld.com>
96 - [1.4-8] Preparing xmlrpc for synctools; integrate php5 as cgi-bin moduls
97
98 * Fri Jun 29 2007 Dietmar Berteld <dietmar@berteld.com>
99 - [1.4-7] Changing to utf-8
100
101 * Thu Jun 19 2007 Dietmar Berteld <dietmar@berteld.com>
102 - [1.4-6] Fixing MySQL errors
103
104 * Thu Jun 17 2007 Dietmar Berteld <dietmar@berteld.com>
105 - [1.4-5] Fixing max_allowed_packet issue
106
107 * Thu Jun 14 2007 Dietmar Berteld <dietmar@berteld.com>
108 - [1.4-4] New basis eGW 1.4, delete php5-based sync-tool
109
110 * Wed May 30 2007 Dietmar Berteld <dietmar@berteld.com>
111 - [1.2.106-3] Automatic domain configuration and integrate php5-based sync-tool
112
113 * Tue May 29 2007 Dietmar Berteld <dietmar@berteld.com>
114 - [1.2.106-2] Change MySQL-creating method to SME and fixing bugs
115
116 * Thu Jan 23 2007 Dietmar Berteld <dietmar@berteld.com>
117 - [1.2.106-1] Initial version
118
119
120 %prep
121
122
123 %setup
124
125
126 %build
127 # Creating templates2adjust
128 perl createlinks
129
130 # Default DB parameters
131 DEFAULTS1=root/etc/e-smith/db/configuration/defaults/egroupware
132 DEFAULTS2=root/etc/e-smith/db/accounts/defaults/egroupware
133 mkdir -p $DEFAULTS1
134 mkdir -p $DEFAULTS2
135 echo "egroupware" > $DEFAULTS1/DbName
136 echo "egwuser" > $DEFAULTS1/DbUser
137 echo "on" > $DEFAULTS1/HTTPS
138 echo "eGroupWare" > $DEFAULTS1/Name
139 echo "global" > $DEFAULTS1/PublicAccess
140 echo "url" > $DEFAULTS1/type
141 echo "reserved" > $DEFAULTS2/type
142
143
144 %install
145 rm -rf $RPM_BUILD_ROOT
146 (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
147 rm -f %{name}-%{version}-filelist
148 /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
149
150
151 %clean
152 rm -rf $RPM_BUILD_ROOT
153
154
155 %pre
156 # Checking if eGW files are present before updating
157 # If present, installation files + MySQL DB are saved
158 UPDATE=$(ls /opt | grep -c egroupware)
159 case $UPDATE in
160 0)
161 echo "Installing eGroupware... Please wait!"
162 ;;
163 *)
164 echo "Updating eGroupware... Please wait!"
165 echo "Backup folder: /opt/eGW_RPM_BACKUP"
166 mkdir -p /opt/eGW_RPM_BACKUP
167 cd /opt
168 echo "Backing up installation files..."
169 tar -czf /opt/eGW_RPM_BACKUP/egroupware.tar.gz egroupware
170 echo "Backing up MySQL database..."
171 mysqldump egroupware > /opt/eGW_RPM_BACKUP/egroupware.sql
172 /sbin/e-smith/db configuration show egroupware > /opt/eGW_RPM_BACKUP/config.txt
173 ;;
174 esac
175
176
177 %post
178 # Initializing SME DB
179 /etc/e-smith/events/actions/initialize-default-databases
180
181 # Variables
182 DOMAIN=$(/sbin/e-smith/db configuration get DomainName)
183 EGPASS=$(/sbin/e-smith/db configuration getprop egroupware DbPassword)
184 UPDATE=$(ls /opt | grep -c egroupware)
185
186 echo "Decompressing files..."
187 mkdir -p /opt/egroupware/{files/g2data,backup,tmp}
188 tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-1.4.004.tar.gz -C /opt/egroupware
189 tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-egw-pear-1.4.004.tar.gz -C /opt/egroupware
190 tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-gallery-1.4.004.tar.gz -C /opt/egroupware
191 cp -f /usr/share/doc/eGroupWare-1.4.004/Sources/phpSysInfo/config.php /opt/egroupware/html/phpsysinfo/
192 cp -f /usr/share/doc/eGroupWare-1.4.004/Sources/phpSysInfo/Redhat.png /opt/egroupware/html/phpsysinfo/images/
193
194 echo "Cleaning Install..."
195 rm -rf /opt/egroupware/egroupware
196 rm -rf /opt/egroupware/html/debian
197 rm -f /opt/egroupware/html/.htaccess
198
199 echo "Setting file access rules:"
200 cd /opt/egroupware
201 echo " - Changing owner recursivly..."
202 chown -R root:root /opt/egroupware/html
203 echo " - Recursive CHMOD 755 on folders..."
204 find html -type d -exec chmod 755 {} \;
205 echo " - Recursive CHMOD 644 on files..."
206 find html -type f -exec chmod 644 {} \;
207 echo " - Customization of CHMOD for a few folders..."
208 chmod 770 /opt/egroupware/backup
209 chmod 770 /opt/egroupware/files
210 chmod 770 /opt/egroupware/files/g2data
211 chmod 770 /opt/egroupware/tmp
212 chown www:www /opt/egroupware/backup
213 chown www:www /opt/egroupware/files
214 chown www:www /opt/egroupware/files/g2data
215 chown www:www /opt/egroupware/tmp
216
217 if [ "$UPDATE" = "0" ] ; then
218 echo "Preparing Site-Mgr..."
219 cd /opt/egroupware/html
220 ln -s sitemgr/sitemgr-link
221 fi
222
223 echo "Preparing header.inc.php..."
224 case $UPDATE in
225 0) sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.4.004/Sources/header.inc.php > /opt/egroupware/header.inc.php ;;
226 *) mv -f /opt/egroupware/html/header.inc.php /opt/egroupware/ 2>/dev/null ;;
227 esac
228 chown www:www /opt/egroupware/header.inc.php
229 chmod 640 /opt/egroupware/header.inc.php
230 cd /opt/egroupware/html
231 ln -s ../header.inc.php 2>/dev/null
232
233 echo "Preparing Gallery2..."
234 if [ -f /opt/egroupware/html/gallery/gallery2/config.php ] ; then
235 touch /opt/egroupware/html/gallery/gallery2/config.php
236 else
237 sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.4.004/Sources/Gallery2/config.php > /opt/egroupware/html/gallery/gallery2/config.php
238 fi
239 chmod 640 /opt/egroupware/html/gallery/gallery2/config.php
240 chown www:www /opt/egroupware/html/gallery/gallery2/config.php
241 echo " "
242
243 echo "MySQL installation:"
244 if [ "$UPDATE" = "0" ] ; then
245 cp /usr/share/doc/eGroupWare-1.4.004/Sources/81egw_database.sql /etc/e-smith/sql/init/
246 fi
247 /sbin/e-smith/expand-template /etc/e-smith/sql/init/80egw_mysql.sql
248 /sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_domain.sql
249 /etc/rc.d/init.d/mysql.init start
250 echo " "
251
252 echo "Applying modifications to services..."
253 /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
254 /etc/rc7.d/S86httpd-e-smith sigusr1
255 /etc/rc.d/init.d/crond restart
256 echo " "
257
258 echo "-------------------------------------------------------------------------------"
259 case $UPDATE in
260 0) echo "eGroupWare Installation completed, you must finish the installation!" ;;
261 *) echo "eGroupWare update completed, you must finish the update!" ;;
262 esac
263 echo "Please go to https://$DOMAIN/egroupware/setup"
264 echo "-------------------------------------------------------------------------------"
265 echo "For more details, see http://wiki.contribs.org/Egroupware"
266 echo " "
267 case $UPDATE in
268 0)
269 echo "Reminder:"
270 echo " - Website open globally"
271 echo " - https mode enabled with automatic redirection"
272 echo " - Header-Admin-Login = header-admin, pw = 'admin'"
273 echo " - Config-Admin-Login = config-admin, pw = 'admin'"
274 echo " - SME users can login with their user and password (mail auth. method)"
275 echo " "
276 echo "Start https://$DOMAIN/egroupware/setup"
277 echo "Login with the Config-Admin (user=config-admin, pw=admin)"
278 echo "ToDo's:"
279 echo " - Create eGroupWare's admin account with an existing SME account/password"
280 echo " - Configure Gallery2 if needed"
281 ;;
282 *)
283 echo "Reminder:"
284 echo " - The old install was backed up and can be found in /opt/eGW_RPM_BACKUP"
285 echo " PLEASE MOVE THIS DIRECTORY TO A SAFE PLACE!!!"
286 echo " - Start https://$DOMAIN/egroupware/setup"
287 echo " - Login with your existing 'Config-Admin' creditentials"
288 echo " - Finish the upgrade if needed"
289 echo " - Configure Gallery2 if needed"
290 ;;
291 esac
292
293 echo " "
294 echo " "
295 echo "Current configuration:"
296 /sbin/e-smith/config show egroupware
297 echo " "
298 echo "Following DB parameters are allowed:"
299 echo " # config setprop egroupware HTTPS on/off"
300 echo " # config setprop egroupware PublicAccess local/global"
301 echo " "
302 echo "Don't forget to apply modifications with following commands:"
303 echo " # expand-template /etc/httpd/conf/httpd.conf"
304 echo " # service httpd-e-smith restart"
305 echo " "
306 echo "For more details, see http://wiki.contribs.org/Egroupware"
307 echo "-------------------------------------------------------------------------------"
308
309
310 %preun
311 if [ $1 = 0 ] ; then
312 mv /usr/share/doc/eGroupWare-1.4.004/Sources/DO_NOT_USE_OR_DELETE/eGW-Full-Uninstall.sh /root/
313 fi
314
315
316 %postun
317 if [ $1 = 0 ] ; then
318 echo "Restarting services..."
319 /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
320 /etc/rc7.d/S86httpd-e-smith sigusr1
321 /etc/rc.d/init.d/crond restart
322 echo " "
323 echo " "
324 echo "Uninstallation finished!"
325 echo " "
326 echo "If you want to completly remove eGroupWare"
327 echo "(installation files and MySQL user+database)"
328 echo "please issue the following command at the prompt:"
329 echo "# sh /root/eGW-Full-Uninstall.sh"
330 fi
331
332
333 %files -f %{name}-%{version}-filelist
334
335
336 %defattr(-,root,root)

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