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