summaryrefslogtreecommitdiff
path: root/kolab-webclient/kolab-webclient.spec
blob: 55bcc370d6e28d644f0677618d7b5910358d581c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# Versions
%define         V_horde_name horde-webmail
%define         V_package kolab-webclient
%define         V_year  2009
%define         V_month 06
%define         V_day   26
%define         V_version 1.2.0
%define         V_source_version 1.2
%define         V_passwd_version 3.0.1
%define         V_date %{V_year}-%{V_month}-%{V_day}
%define         V_release %{V_year}%{V_month}%{V_day}suc01

# Package Information
Name:		%{V_package}
Summary:	The Kolab Groupware web client (based on horde)
URL:		http://www.kolab.org/
Packager:	Gunnar Wrobel <wrobel@pardus.de> (p@rdus)
Version:	%{V_version}
Release:	%{V_release}
License:	GPL
Group:		MAIL
Distribution:	OpenPKG

# List of Sources
Source0:	http://ftp.horde.org/pub/%{V_horde_name}/%{V_horde_name}-%{V_source_version}.tar.gz
Source1:        http://ftp.horde.org/pub/passwd/passwd-h3-%{V_passwd_version}.tar.gz
Source2:        webclient-kolab-conf.template
Source3:        webclient-kronolith-kolab-conf.template
Source4:        conf.php
Source5:        backends.php
Source6:        webclient-config_hooks.php.template
Source7:        webclient-config_mime_drivers.php.template
Source8:        webclient-config_motd.php.template
Source9:        webclient-config_nls.php.template
Source10:       webclient-config_prefs.php.template
Source11:       webclient-config_registry.php.template
Source12:       webclient-dimp_conf.php.template
Source13:       webclient-dimp_hooks.php.template
Source14:       webclient-dimp_menu.php.template
Source15:       webclient-dimp_portal.php.template
Source16:       webclient-dimp_prefs.php.template
Source17:       webclient-dimp_servers.php.template
Source18:       webclient-imp_conf.php.template
Source19:       webclient-imp_header.php.template
Source20:       webclient-imp_hooks.php.template
Source21:       webclient-imp_menu.php.template
Source22:       webclient-imp_mime_drivers.php.template
Source23:       webclient-imp_motd.php.template
Source24:       webclient-imp_prefs.php.template
Source25:       webclient-imp_servers.php.template
Source26:       webclient-imp_spelling.php.template
Source27:       webclient-ingo_backends.php.template
Source28:       webclient-ingo_conf.php.template
Source29:       webclient-ingo_fields.php.template
Source30:       webclient-ingo_hooks.php.template
Source31:       webclient-ingo_prefs.php.template
Source32:       webclient-kronolith_keywords.php.template
Source33:       webclient-kronolith_menu.php.template
Source34:       webclient-kronolith_prefs.php.template
Source35:       webclient-mimp_conf.php.template
Source36:       webclient-mimp_menu.php.template
Source37:       webclient-mimp_mime_drivers.php.template
Source38:       webclient-mimp_prefs.php.template
Source39:       webclient-mnemo_conf.php.template
Source40:       webclient-mnemo_prefs.php.template
Source41:       webclient-nag_conf.php.template
Source42:       webclient-nag_menu.php.template
Source43:       webclient-nag_prefs.php.template
Source44:       webclient-turba_attributes.php.template
Source45:       webclient-turba_conf.php.template
Source46:       webclient-turba_hooks.php.template
Source47:       webclient-turba_menu.php.template
Source48:       webclient-turba_mime_drivers.php.template
Source49:       webclient-turba_prefs.php.template
Source50:       webclient-turba_sources.php.template

# List of Patches
Patch0:         http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/horde-webmail/%{V_version}/horde-webmail-%{V_version}_kolab_openpkg.patch

# Build Info
Prefix:		%{l_prefix}
BuildRoot:	%{l_buildroot}

#Pre requisites
BuildPreReq:  OpenPKG, openpkg >= 20070603
BuildPreReq:  php, php::with_pear = yes
PreReq:       kolabd

Obsoletes:    horde-kolab, horde-kronolith-kolab, horde-imp-kolab, horde-ingo-kolab, horde-kolab-client, horde-dimp-kolab, horde-mimp-kolab, horde-mnemo-kolab, horde-nag-kolab, horde-passwd-kolab, horde-turba-kolab, PEAR-Net_Sieve

AutoReq:      no
AutoReqProv:  no
#BuildArch:    noarch

%description 
The Kolab Groupware web client provides a Kolab compatible web
frontend to the Kolab server. The package is based on Horde.

%prep
	%setup -q -c %{V_horde_name}-%{V_source_version}
	%setup -T -D -a 1
	mv passwd-h3-%{V_passwd_version} %{V_horde_name}-%{V_source_version}/passwd

	cd %{V_horde_name}-%{V_source_version}
	%patch -p2 -P 0
	cd ..

%build

%install

	%{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/client
	%{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/var/kolab/tmp
	%{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/var/kolab/storage
	%{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates	

	cd %{V_horde_name}-%{V_source_version}

	find . -name 'test.php' | xargs rm

	find . -type f | grep '\.orig$' | xargs rm

	cp -r * $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/client/

        sqlite $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/client/storage/horde.db < scripts/sql/groupware.sql

	cd ..

	%{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/client/passwd

	%{l_shtool} install -c -m 644 %{l_value -s -a} %{S:2} %{S:3} %{S:6} %{S:7} %{S:8} %{S:9} %{S:10} %{S:11} %{S:12} \
	   %{S:13} %{S:14} %{S:15} %{S:16} %{S:17} %{S:18} %{S:19} %{S:20} %{S:21} %{S:22} %{S:23} %{S:24} %{S:25} %{S:26} %{S:27} %{S:28} %{S:29} \
	   %{S:30} %{S:31} %{S:32} %{S:33} %{S:34} %{S:35} %{S:36} %{S:37} %{S:38} %{S:39} %{S:40} %{S:41} %{S:42} %{S:43} %{S:44} %{S:45} %{S:46} \
	   %{S:47} %{S:48} %{S:49} %{S:50} \
	  $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates

	sed -i -e 's#@@@horde_confdir@@@#%{l_prefix}/var/kolab/www/client/config#' $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates/*.php.template
	sed -i -e 's#@@@dimp_confdir@@@#%{l_prefix}/var/kolab/www/client/dimp/config#' $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates/*.php.template
	sed -i -e 's#@@@imp_confdir@@@#%{l_prefix}/var/kolab/www/client/imp/config#' $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates/*.php.template
	sed -i -e 's#@@@ingo_confdir@@@#%{l_prefix}/var/kolab/www/client/ingo/config#' $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates/*.php.template
	sed -i -e 's#@@@kronolith_confdir@@@#%{l_prefix}/var/kolab/www/client/kronolith/config#' $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates/*.php.template
	sed -i -e 's#@@@mimp_confdir@@@#%{l_prefix}/var/kolab/www/client/mimp/config#' $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates/*.php.template
	sed -i -e 's#@@@mnemo_confdir@@@#%{l_prefix}/var/kolab/www/client/mnemo/config#' $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates/*.php.template
	sed -i -e 's#@@@nag_confdir@@@#%{l_prefix}/var/kolab/www/client/nag/config#' $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates/*.php.template
	sed -i -e 's#@@@turba_confdir@@@#%{l_prefix}/var/kolab/www/client/turba/config#' $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates/*.php.template

	# Refresh the translations
	PATH="%{l_prefix}/bin" %{l_prefix}/bin/php -d safe_mode=0 -f $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/client/po/translation.php make --module dimp --no-compendium
	PATH="%{l_prefix}/bin" %{l_prefix}/bin/php -d safe_mode=0 -f $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/client/po/translation.php make --module kronolith --no-compendium

	%{l_shtool} install -c -m 644 %{l_value -s -a} %{S:4} %{S:5} \
	  $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/client/passwd/config

	%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
	    '%config %{l_prefix}/etc/kolab/templates/webclient-kolab-conf.template' \
	    '%config %{l_prefix}/etc/kolab/templates/webclient-kronolith-kolab-conf.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-config_hooks.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-config_mime_drivers.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-config_motd.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-config_nls.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-config_prefs.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-config_registry.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-dimp_conf.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-dimp_hooks.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-dimp_menu.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-dimp_portal.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-dimp_prefs.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-dimp_servers.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-imp_conf.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-imp_header.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-imp_hooks.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-imp_menu.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-imp_mime_drivers.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-imp_motd.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-imp_prefs.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-imp_servers.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-imp_spelling.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-ingo_backends.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-ingo_conf.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-ingo_fields.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-ingo_hooks.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-ingo_prefs.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-kronolith_keywords.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-kronolith_menu.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-kronolith_prefs.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-mimp_conf.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-mimp_menu.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-mimp_mime_drivers.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-mimp_prefs.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-mnemo_conf.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-mnemo_prefs.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-nag_conf.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-nag_menu.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-nag_prefs.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-turba_attributes.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-turba_conf.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-turba_hooks.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-turba_menu.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-turba_mime_drivers.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-turba_prefs.php.template' \
            '%config %{l_prefix}/etc/kolab/templates/webclient-turba_sources.php.template' \
            %dir '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/client/log \
            %dir '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/client/tmp \
            %dir '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/client/storage \
            %dir '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/client/storage/horde.db \
	    '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/client/config/conf.php \
	    '%defattr(-,%{l_nusr},%{l_ngrp})' %{l_prefix}/var/kolab/www/client/**/config/conf.php

%clean
	rm -rf $RPM_BUILD_ROOT

%files -f files