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