1 |
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
2 |
|
3 |
%global kolab_user kolab |
4 |
%global kolab_user_id 412 |
5 |
%global kolab_group kolab |
6 |
%global kolab_group_id 412 |
7 |
|
8 |
%global kolabn_user kolab-n |
9 |
%global kolabn_user_id 413 |
10 |
%global kolabn_group kolab-n |
11 |
%global kolabn_group_id 413 |
12 |
|
13 |
%global kolabr_user kolab-r |
14 |
%global kolabr_user_id 414 |
15 |
%global kolabr_group kolab-r |
16 |
%global kolabr_group_id 414 |
17 |
|
18 |
Summary: Kolab Groupware Solution |
19 |
Name: pykolab |
20 |
Version: 0.5.12 |
21 |
%define subrel 1 |
22 |
Release: %mkrel 1 |
23 |
License: GPLv3+ |
24 |
Group: System/Servers |
25 |
URL: http://git.kolab.org/pykolab |
26 |
Source0: http://git.kolab.org/pykolab//%{name}-%{version}.tar.gz |
27 |
Source1: kolab-saslauthd.tmpfiles.d.conf |
28 |
Patch0: mga-schema-loc.patch |
29 |
Patch1: imap-mga.patch |
30 |
Patch2: roundcube.patch |
31 |
Patch3: mageia_sasl.patch |
32 |
BuildRequires: gettext-devel |
33 |
BuildRequires: glib2-devel |
34 |
BuildRequires: intltool |
35 |
BuildRequires: python-icalendar |
36 |
BuildRequires: python-kolabformat |
37 |
BuildRequires: python-ldap |
38 |
BuildRequires: python-nose |
39 |
BuildRequires: python-pyasn1 |
40 |
BuildRequires: python-pyasn1-modules |
41 |
BuildRequires: python-sqlalchemy |
42 |
Requires: kolab-cli = %{version}-%{release} |
43 |
Requires: python-ldap >= 2.4 |
44 |
Requires: python-pyasn1 |
45 |
Requires: python-pyasn1-modules |
46 |
# this is for serviceadd, etc. |
47 |
Requires(post): systemd >= %{systemd_required_version} |
48 |
Requires(post): rpm-helper |
49 |
Requires(preun): rpm-helper |
50 |
# this is for useradd, groupadd, etc. |
51 |
Requires(pre): rpm-helper |
52 |
Requires(postun): rpm-helper |
53 |
Requires(pre): %{_sbindir}/useradd |
54 |
Requires(pre): %{_sbindir}/usermod |
55 |
Requires(pre): %{_sbindir}/groupadd |
56 |
BuildArch: noarch |
57 |
%description |
58 |
Kolab enables you to easily build a groupware server as part of a |
59 |
collaborative environment. |
60 |
|
61 |
## |
62 |
## Kolab Telemetry Logging |
63 |
## |
64 |
%package telemetry |
65 |
Summary: Kolab Telemetry Logging Capabilities |
66 |
Group: System/Servers |
67 |
Requires: kolab-cli = %{version}-%{release} |
68 |
|
69 |
%description telemetry |
70 |
Cyrus IMAP Telemetry logging handling capabilities for Kolab Groupware |
71 |
|
72 |
## |
73 |
## Kolab XML |
74 |
## |
75 |
%package xml |
76 |
Summary: Kolab XML format wrapper for %{name} |
77 |
Group: System/Servers |
78 |
Requires: %{name} = %{version}-%{release} |
79 |
Requires: python-kolabformat >= 0.5 |
80 |
|
81 |
%description xml |
82 |
Kolab Format XML bindings wrapper for %{name} |
83 |
|
84 |
## |
85 |
## Kolab CLI |
86 |
## |
87 |
%package -n kolab-cli |
88 |
Summary: Kolab CLI components |
89 |
Group: System/Servers |
90 |
BuildRequires: intltool |
91 |
BuildRequires: gettext |
92 |
BuildRequires: python |
93 |
Requires: %{name} = %{version}-%{release} |
94 |
Requires: python-augeas |
95 |
Requires: python-cheetah |
96 |
|
97 |
%description -n kolab-cli |
98 |
Kolab CLI utilities |
99 |
|
100 |
## |
101 |
## Kolab SASL Authentication Daemon |
102 |
## |
103 |
%package -n kolab-saslauthd |
104 |
Summary: Kolab SASL Authentication Daemon |
105 |
Group: System/Servers |
106 |
BuildRequires: intltool |
107 |
BuildRequires: gettext |
108 |
BuildRequires: python |
109 |
Requires: %{name} = %{version}-%{release} |
110 |
Requires: cyrus-sasl |
111 |
Requires: sasl-plug-plain |
112 |
|
113 |
%description -n kolab-saslauthd |
114 |
Kolab SASL Authentication Daemon for multi-domain, multi-authn database deployments |
115 |
|
116 |
## |
117 |
## Kolab Server implemented in Python |
118 |
## |
119 |
%package -n kolab-server |
120 |
Summary: Kolab Server implemented in Python |
121 |
Group: System/Servers |
122 |
BuildRequires: intltool |
123 |
BuildRequires: gettext |
124 |
BuildRequires: python |
125 |
Requires: %{name} = %{version}-%{release} |
126 |
Obsoletes: perl-kolab |
127 |
|
128 |
%description -n kolab-server |
129 |
Kolab Server implemented in Python |
130 |
|
131 |
## |
132 |
## Kolab SMTP Access Policy for Postfix |
133 |
## |
134 |
%package -n postfix-kolab |
135 |
Summary: Kolab SMTP Access Policy for Postfix |
136 |
Group: System/Servers |
137 |
BuildRequires: intltool |
138 |
BuildRequires: gettext |
139 |
BuildRequires: python |
140 |
Requires: postfix |
141 |
Requires: %{name} = %{version}-%{release} |
142 |
Requires: python-sqlalchemy |
143 |
Requires: MySQL-python |
144 |
|
145 |
%description -n postfix-kolab |
146 |
Kolab SMTP Access Policy for Postfix |
147 |
|
148 |
## |
149 |
## Wallace |
150 |
## |
151 |
%package -n wallace |
152 |
Summary: Kolab Content-Filter |
153 |
Group: System/Servers |
154 |
Requires: %{name} = %{version}-%{release} |
155 |
Requires: python-sqlalchemy |
156 |
Requires: MySQL-python |
157 |
Requires: python-icalendar >= 3.0 |
158 |
Requires: %{name}-xml = %{version}-%{release} |
159 |
|
160 |
%description -n wallace |
161 |
This is the Kolab Content Filter, with plugins |
162 |
|
163 |
%prep |
164 |
%setup -q |
165 |
%patch0 -p1 -b .mga-schema-loc |
166 |
%patch1 -p1 -b .imap-mga |
167 |
%patch2 -p1 -b .roundcube |
168 |
%patch3 -p1 -b .sasl |
169 |
|
170 |
%build |
171 |
autoreconf -fi |
172 |
|
173 |
%configure2_5x |
174 |
|
175 |
%install |
176 |
rm -rf %{buildroot} |
177 |
make install DESTDIR=%{buildroot} |
178 |
|
179 |
mkdir -p %{buildroot}/%{_unitdir} |
180 |
%{__install} -p -m 644 kolabd/kolabd.systemd %{buildroot}/%{_unitdir}/kolabd.service |
181 |
%{__install} -p -m 644 saslauthd/kolab-saslauthd.systemd %{buildroot}/%{_unitdir}/kolab-saslauthd.service |
182 |
%{__install} -p -m 644 wallace/wallace.systemd %{buildroot}/%{_unitdir}/wallace.service |
183 |
|
184 |
# Install the systemd tempfiles |
185 |
%{__install} -D -p -m 644 kolabd/kolabd.tmpfiles.d.conf %{buildroot}%{_tmpfilesdir}/kolabd.conf |
186 |
%{__install} -D -p -m 644 wallace/wallace.tmpfiles.d.conf %{buildroot}%{_tmpfilesdir}/wallace.conf |
187 |
%{__install} -D -p -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/kolab-saslauthd.conf |
188 |
|
189 |
|
190 |
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig |
191 |
%{__install} -p -m 644 kolabd/kolabd.sysconfig %{buildroot}/%{_sysconfdir}/sysconfig/kolabd |
192 |
%{__install} -p -m 644 saslauthd/kolab-saslauthd.sysconfig %{buildroot}/%{_sysconfdir}/sysconfig/kolab-saslauthd |
193 |
%{__install} -p -m 644 wallace/wallace.sysconfig %{buildroot}/%{_sysconfdir}/sysconfig/wallace |
194 |
%find_lang pykolab |
195 |
|
196 |
%pre |
197 |
# Add the kolab user and group accounts |
198 |
getent group %{kolab_group} &>/dev/null || groupadd -r %{kolab_group} -g %{kolab_group_id} &>/dev/null |
199 |
getent passwd %{kolab_user} &>/dev/null || \ |
200 |
useradd -r -u %{kolab_user_id} -g %{kolab_group} -d %{_localstatedir}/lib/%{kolab_user} -s /sbin/nologin \ |
201 |
-c "Kolab System Account" %{kolab_user} &>/dev/null || : |
202 |
|
203 |
gpasswd -a apache kolab >/dev/null 2>&1 || : |
204 |
|
205 |
getent group %{kolabn_group} &>/dev/null || groupadd -r %{kolabn_group} -g %{kolabn_group_id} &>/dev/null |
206 |
getent passwd %{kolabn_user} &>/dev/null || \ |
207 |
useradd -r -u %{kolabn_user_id} -g %{kolabn_group} -d %{_localstatedir}/lib/%{kolabn_user} -s /sbin/nologin \ |
208 |
-c "Kolab System Account (N)" %{kolabn_user} &>/dev/null || : |
209 |
gpasswd -a %{kolabn_user} %{kolab_group} &>/dev/null || : |
210 |
|
211 |
getent group %{kolabr_group} &>/dev/null || groupadd -r %{kolabr_group} -g %{kolabr_group_id} &>/dev/null |
212 |
getent passwd %{kolabr_user} &>/dev/null || \ |
213 |
useradd -r -u %{kolabr_user_id} -g %{kolabr_group} -d %{_localstatedir}/lib/%{kolabr_user} -s /sbin/nologin \ |
214 |
-c "Kolab System Account (R)" %{kolabr_user} &>/dev/null || : |
215 |
|
216 |
# Make sure the kolab user and group is added |
217 |
getent passwd %{cyrus_admin} &>/dev/null || \ |
218 |
useradd -r -d %{_localstatedir}/lib/%{cyrus_admin} -s /sbin/nologin \ |
219 |
-c "Kolab Cyrus Administrator Account" %{cyrus_admin} &>/dev/null || : |
220 |
|
221 |
# Make sure our user has the correct home directory |
222 |
if [ $1 -gt 1 ] ; then |
223 |
usermod -d %{_localstatedir}/lib/%{kolab_user} %{kolab_user} &>/dev/null || : |
224 |
usermod -d %{_localstatedir}/lib/%{kolab_user} %{kolabn_user} &>/dev/null || : |
225 |
usermod -d %{_localstatedir}/lib/%{kolab_user} %{kolabr_user} &>/dev/null || : |
226 |
fi |
227 |
|
228 |
%post -n kolab-saslauthd |
229 |
%_tmpfilescreate kolab-saslauthd |
230 |
%_post_service kolab-saslauthd |
231 |
|
232 |
%preun -n kolab-saslauthd |
233 |
%_preun_service kolab-saslauthd |
234 |
|
235 |
%post -n kolab-server |
236 |
%_tmpfilescreate kolabd |
237 |
%_post_service kolabd |
238 |
|
239 |
%preun -n kolab-server |
240 |
%_preun_service kolabd |
241 |
|
242 |
%post -n wallace |
243 |
%_tmpfilescreate wallace |
244 |
%_post_service wallace |
245 |
|
246 |
%preun -n wallace |
247 |
%_preun_service wallace |
248 |
|
249 |
|
250 |
%files -f pykolab.lang |
251 |
%doc AUTHORS COPYING README README.tests |
252 |
%doc conf/kolab.conf |
253 |
%attr(0640,kolab-n,kolab) %config(noreplace) %{_sysconfdir}/kolab/kolab.conf |
254 |
%dir %{python_sitelib}/pykolab/ |
255 |
%exclude %{python_sitelib}/pykolab/telemetry.* |
256 |
%{python_sitelib}/pykolab/*.py |
257 |
%{python_sitelib}/pykolab/*.pyc |
258 |
%{python_sitelib}/pykolab/*.pyo |
259 |
%{python_sitelib}/pykolab/auth/ |
260 |
%{python_sitelib}/pykolab/conf/ |
261 |
%{python_sitelib}/pykolab/imap/ |
262 |
%dir %{python_sitelib}/pykolab/plugins/ |
263 |
%{python_sitelib}/pykolab/plugins/*.py |
264 |
%{python_sitelib}/pykolab/plugins/*.pyc |
265 |
%{python_sitelib}/pykolab/plugins/*.pyo |
266 |
%{python_sitelib}/pykolab/plugins/defaultfolders |
267 |
%{python_sitelib}/pykolab/plugins/dynamicquota |
268 |
%{python_sitelib}/pykolab/plugins/recipientpolicy |
269 |
%{python_sitelib}/kolab/ |
270 |
%{python_sitelib}/cyruslib.py* |
271 |
%attr(0775,kolab,kolab-n) %dir %{_localstatedir}/lib/kolab/ |
272 |
%attr(0775,kolab,kolab-n) %dir %{_localstatedir}/log/kolab/ |
273 |
|
274 |
%files telemetry |
275 |
%doc AUTHORS COPYING |
276 |
%{_sbindir}/kolab_parse_telemetry |
277 |
%{python_sitelib}/pykolab/telemetry.* |
278 |
%{python_sitelib}/pykolab/cli/telemetry/ |
279 |
|
280 |
%files xml |
281 |
%dir %{python_sitelib}/pykolab/xml |
282 |
%{python_sitelib}/pykolab/xml/*.py |
283 |
%{python_sitelib}/pykolab/xml/*.pyc |
284 |
%{python_sitelib}/pykolab/xml/*.pyo |
285 |
|
286 |
%files -n kolab-cli |
287 |
%{_sbindir}/kolab |
288 |
%{_sbindir}/kolab-conf |
289 |
%{_sbindir}/setup-kolab |
290 |
%dir %{_sysconfdir}/kolab/templates |
291 |
%{_datadir}/kolab/templates |
292 |
%dir %{python_sitelib}/pykolab/cli/ |
293 |
%{python_sitelib}/pykolab/cli/*.py |
294 |
%{python_sitelib}/pykolab/cli/*.pyc |
295 |
%{python_sitelib}/pykolab/cli/*.pyo |
296 |
%dir %{python_sitelib}/pykolab/setup/ |
297 |
%{python_sitelib}/pykolab/setup/*.py |
298 |
%{python_sitelib}/pykolab/setup/*.pyc |
299 |
%{python_sitelib}/pykolab/setup/*.pyo |
300 |
%dir %{python_sitelib}/pykolab/wap_client/ |
301 |
%{python_sitelib}/pykolab/wap_client/*.py |
302 |
%{python_sitelib}/pykolab/wap_client/*.pyc |
303 |
%{python_sitelib}/pykolab/wap_client/*.pyo |
304 |
|
305 |
%files -n kolab-saslauthd |
306 |
%doc AUTHORS COPYING |
307 |
%{_unitdir}/kolab-saslauthd.service |
308 |
%config(noreplace) %{_sysconfdir}/sysconfig/kolab-saslauthd |
309 |
%{_sbindir}/kolab-saslauthd |
310 |
%{python_sitelib}/saslauthd/ |
311 |
%{_tmpfilesdir}/kolab-saslauthd.conf |
312 |
|
313 |
%files -n kolab-server |
314 |
%doc AUTHORS COPYING |
315 |
%{_unitdir}/kolabd.service |
316 |
%config(noreplace) %{_sysconfdir}/sysconfig/kolabd |
317 |
%{_sbindir}/kolabd |
318 |
%{python_sitelib}/kolabd/ |
319 |
%{_tmpfilesdir}/kolabd.conf |
320 |
|
321 |
%files -n postfix-kolab |
322 |
%doc AUTHORS COPYING |
323 |
%{_libexecdir}/postfix/kolab_smtp_access_policy |
324 |
|
325 |
%files -n wallace |
326 |
%doc AUTHORS COPYING |
327 |
%{_unitdir}/wallace.service |
328 |
%{_sysconfdir}/sysconfig/wallace |
329 |
%{_sbindir}/wallaced |
330 |
%{python_sitelib}/wallace |
331 |
%attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab |
332 |
%attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab/wallace |
333 |
%{_tmpfilesdir}/wallace.conf |