1 |
# $Id: smeserver-egroupware.spec,v 1.2 2013/06/04 21:03:24 unnilennium Exp $ |
# $Id: smeserver-egroupware.spec,v 1.6 2013/12/13 21:38:45 unnilennium Exp $ |
2 |
# Authority: cool34000 |
# Authority: cool34000 |
3 |
# Name: Sylvain Gomez |
# Name: Sylvain Gomez |
4 |
|
|
5 |
%define name smeserver-egroupware |
%define name smeserver-egroupware |
6 |
%define version 1.8.005 |
%define version 1.8.005 |
7 |
%define release 1 |
%define release 5 |
8 |
%define rpmver 4.0.4 |
%define rpmver 4.0.4 |
9 |
|
|
10 |
|
|
15 |
License: GPL |
License: GPL |
16 |
Group: Web/Application |
Group: Web/Application |
17 |
Source: %{name}-%{version}.tgz |
Source: %{name}-%{version}.tgz |
18 |
|
Patch0: smeserver-egroupware-1.8.005-g2datapath.patch |
19 |
|
Patch1: smeserver-egroupware-1.8.005-deletescript.patch |
20 |
|
PAtch2: smeserver-egroupware-1.8.005-sme5127.patch |
21 |
URL: http://www.egroupware.org |
URL: http://www.egroupware.org |
22 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
23 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
42 |
|
|
43 |
|
|
44 |
%changelog |
%changelog |
45 |
* Thu Dec 12 2013 JP Pialasse <tests@pialasse.com> 1.8.005-1.sme |
* Sun Dec 15 2013 JP Pialasse <tests@pialasse.com> 1.8.005-5.sme |
46 |
|
- fix hostname [SME: 5127] |
47 |
|
|
48 |
|
* Fri Dec 13 2013 JP Pialasse <tests@pialasse.com> 1.8.005-4.sme |
49 |
|
- fixed deletion script see [SME: 8040] comment 25 |
50 |
|
|
51 |
|
* Thu Dec 12 2013 JP Pialasse <tests@pialasse.com> 1.8.005-3.sme |
52 |
- upgrade to eGroupware 1.8 using opensuse rpm for Centos5 |
- upgrade to eGroupware 1.8 using opensuse rpm for Centos5 |
53 |
- built for eGroupware-1.8.005.20131007 |
- built for eGroupware-1.8.005.20131007 |
54 |
- see [SME: 8040] |
- see [SME: 8040] |
55 |
|
- 2 revert back some configuration in spec |
56 |
|
- will need to move to an event |
57 |
|
- 3 fix tmp and sess directory |
58 |
|
- fix default g2data path |
59 |
|
|
60 |
* Tue Jun 04 2013 JP Pialasse <tests@pialasse.com> 1.4.004-2.sme |
* Tue Jun 04 2013 JP Pialasse <tests@pialasse.com> 1.4.004-2.sme |
61 |
- fix upload dir not defined [SME 7653] |
- fix upload dir not defined [SME 7653] |
143 |
|
|
144 |
|
|
145 |
%setup |
%setup |
146 |
#%patch0 -p1 |
%patch0 -p1 |
147 |
|
%patch1 -p1 |
148 |
|
%patch2 -p1 |
149 |
|
|
150 |
%build |
%build |
151 |
# Creating templates2adjust |
# Creating templates2adjust |
171 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
172 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
173 |
rm -f %{name}-%{version}-filelist |
rm -f %{name}-%{version}-filelist |
174 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
175 |
|
|grep -v egroupware_tmp |grep -v egroupware_sess \ |
176 |
|
> %{name}-%{version}-filelist |
177 |
|
|
178 |
|
echo "%dir %attr(0755,www,www) /usr/share/egroupware_tmp">> %{name}-%{version}-filelist |
179 |
|
echo "%dir %attr(0755,www,www) /usr/share/egroupware_sess">> %{name}-%{version}-filelist |
180 |
|
|
181 |
|
|
182 |
%clean |
%clean |
207 |
|
|
208 |
%post |
%post |
209 |
# Initializing SME DB |
# Initializing SME DB |
210 |
/etc/e-smith/events/actions/initialize-default-databases |
echo "Initializing SME DB" |
211 |
|
/etc/e-smith/events/actions/initialize-default-databases 2>/dev/null |
212 |
|
echo " " |
213 |
|
|
214 |
# Variables |
# Variables |
215 |
DOMAIN=$(/sbin/e-smith/db configuration get DomainName) |
DOMAIN=$(/sbin/e-smith/db configuration get DomainName) |
216 |
EGPASS=$(/sbin/e-smith/db configuration getprop egroupware DbPassword) |
EGPASS=$(/sbin/e-smith/db configuration getprop egroupware DbPassword) |
217 |
UPDATE=$(ls /opt | grep -c egroupware) |
UPDATE=$(ls /usr/share/ | grep -c egroupware) |
218 |
|
|
219 |
#echo "Decompressing files..." |
#echo "Decompressing files..." |
220 |
#mkdir -p /opt/egroupware/{files/g2data,backup,tmp} |
#mkdir -p /opt/egroupware/{files/g2data,backup,tmp} |
221 |
#tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-1.4.004.tar.gz -C /opt/egroupware |
#tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-1.4.004.tar.gz -C /opt/egroupware |
222 |
#tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-egw-pear-1.4.004.tar.gz -C /opt/egroupware |
#tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-egw-pear-1.4.004.tar.gz -C /opt/egroupware |
223 |
#tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-gallery-1.4.004.tar.gz -C /opt/egroupware |
#tar xzf /usr/share/doc/eGroupWare-1.4.004/Sources/eGroupWare-gallery-1.4.004.tar.gz -C /opt/egroupware |
224 |
|
echo "Preparing phpSysInfo..." |
225 |
cp -f /usr/share/doc/eGroupWare-1.8.005/Sources/phpSysInfo/config.php /usr/share/egroupware/phpsysinfo/ |
cp -f /usr/share/doc/eGroupWare-1.8.005/Sources/phpSysInfo/config.php /usr/share/egroupware/phpsysinfo/ |
226 |
cp -f /usr/share/doc/eGroupWare-1.8.005/Sources/phpSysInfo/Redhat.png /usr/share/egroupware/phpsysinfo/images/ |
cp -f /usr/share/doc/eGroupWare-1.8.005/Sources/phpSysInfo/Redhat.png /usr/share/egroupware/phpsysinfo/images/ |
227 |
|
|
249 |
#chown www:www /opt/egroupware/tmp |
#chown www:www /opt/egroupware/tmp |
250 |
|
|
251 |
# fixed this one adding .php, not sure if still necessary |
# fixed this one adding .php, not sure if still necessary |
252 |
if [ "$UPDATE" = "0" ] ; then |
#if [ "$UPDATE" = "0" ] ; then |
253 |
echo "Preparing Site-Mgr..." |
# echo "Preparing Site-Mgr..." |
254 |
cd /usr/share/egroupware |
# cd /usr/share/egroupware |
255 |
ln -s sitemgr/sitemgr-link.php |
# ln -s sitemgr/sitemgr-link.php |
256 |
fi |
#fi |
257 |
|
|
258 |
echo "Preparing header.inc.php..." |
echo "Preparing header.inc.php..." |
259 |
case $UPDATE in |
# if first install |
260 |
0) sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/header.inc.php > /usr/share/egroupware/header.inc.php ;; |
if [ "$1" = "1" ] ; then |
261 |
|
# 0) |
262 |
|
sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/header.inc.php > /usr/share/egroupware/header.inc.php |
263 |
|
echo " done!" |
264 |
|
fi |
265 |
# *) mv -f /opt/egroupware/html/header.inc.php /opt/egroupware/ 2>/dev/null ;; |
# *) mv -f /opt/egroupware/html/header.inc.php /opt/egroupware/ 2>/dev/null ;; |
266 |
esac |
#esacc |
267 |
#chown www:www /opt/egroupware/header.inc.php |
#chown www:www /opt/egroupware/header.inc.php |
268 |
#chmod 640 /opt/egroupware/header.inc.php |
#chmod 640 /opt/egroupware/header.inc.php |
269 |
#cd /opt/egroupware/html |
#cd /opt/egroupware/html |
270 |
#ln -s ../header.inc.php 2>/dev/null |
#ln -s ../header.inc.php 2>/dev/null |
271 |
|
echo " " |
272 |
|
|
273 |
# the integration is complete Ithink now..... |
# the integration is complete Ithink now..... |
274 |
#echo "Preparing Gallery2..." |
echo "Preparing Gallery2..." |
275 |
#if [ -f /usr/share/egroupware/gallery/gallery2_config.php ] ; then |
if [ -f /usr/share/egroupware/gallery/gallery2/config.php ] ; then |
276 |
# touch /usr/share/egroupware/gallery/gallery2_config.php |
touch /usr/share/egroupware/gallery/gallery2/config.php |
277 |
#else |
else |
278 |
# sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/Gallery2/config.php > /usr/share/egroupware/gallery/gallery2_config.php |
sed 's.egwpass.'$EGPASS'.g' /usr/share/doc/eGroupWare-1.8.005/Sources/Gallery2/config.php > /usr/share/egroupware/gallery/gallery2/config.php |
279 |
#fi |
fi |
280 |
|
|
281 |
#chmod 640 /opt/egroupware/html/gallery/gallery2/config.php |
chmod 640 /usr/share/egroupware/gallery/gallery2/config.php |
282 |
#chown www:www /opt/egroupware/html/gallery/gallery2/config.php |
chown www:www /usr/share/egroupware/gallery/gallery2/config.php |
283 |
#echo " " |
echo " " |
284 |
|
|
285 |
### this one will be done by event |
### this one will be done by event |
286 |
#echo "MySQL installation:" |
echo "MySQL installation:" |
287 |
#if [ "$UPDATE" = "0" ] ; then |
#if [ "$UPDATE" = "0" ] ; then |
288 |
# cp /usr/share/doc/eGroupWare-1.4.004/Sources/81egw_database.sql /etc/e-smith/sql/init/ |
# cp /usr/share/doc/eGroupWare-1.4.004/Sources/81egw_database.sql /etc/e-smith/sql/init/ |
289 |
#fi |
#fi |
290 |
#/sbin/e-smith/expand-template /etc/e-smith/sql/init/80egw_mysql.sql |
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80egw_mysql.sql |
291 |
#/sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_domain.sql |
/sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_default |
292 |
#/etc/rc.d/init.d/mysql.init start |
/sbin/e-smith/expand-template /etc/e-smith/sql/init/81egw_domain.sql |
293 |
#echo " " |
/etc/rc.d/init.d/mysql.init start |
294 |
|
echo " " |
295 |
#echo "Applying modifications to services..." |
|
296 |
#/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
echo "Applying modifications to services..." |
297 |
#/etc/rc7.d/S86httpd-e-smith sigusr1 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
298 |
#/etc/rc.d/init.d/crond restart |
/etc/rc7.d/S86httpd-e-smith sigusr1 |
299 |
#echo " " |
/etc/rc.d/init.d/crond restart |
300 |
|
echo " " |
301 |
|
|
302 |
echo "-------------------------------------------------------------------------------" |
echo "-------------------------------------------------------------------------------" |
303 |
case $UPDATE in |
case $UPDATE in |