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