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