]>
Commit | Line | Data |
---|---|---|
b3ba35a0 ER |
1 | # TODO |
2 | # - nagios plugin (see it's files section for details) | |
cc90af90 JB |
3 | # |
4 | # Conditional build: | |
5 | %bcond_without apidocs # do not build and package API docs | |
d7a0312a JB |
6 | %bcond_with mapiproxy # mapiproxy suite (disabled with Samba 4.4+) |
7 | %bcond_with mapitest # mapitest utility (disabled with Samba 4.4+) | |
83692358 | 8 | %bcond_with python # build python package (requires disabled mapiproxy) |
b3ba35a0 ER |
9 | |
10 | %define cname VULCAN | |
cc90af90 JB |
11 | Summary: OpenChange - portable implementation of MS Exchange Server and Exchange protocols |
12 | Summary(pl.UTF-8): OpenChange - przenośna implementacja serwera oraz protokołów MS Exchange | |
13 | Name: openchange | |
14 | Version: 2.3 | |
4db9cff8 | 15 | Release: 43 |
cc90af90 JB |
16 | License: GPL v3+ |
17 | Group: Libraries | |
cc90af90 JB |
18 | Source0: https://github.com/openchange/openchange/archive/%{name}-%{version}-%{cname}.tar.gz |
19 | # Source0-md5: 96c13c78c2bcbd7040f7848746284b9f | |
db79d4b2 | 20 | Patch0: disable-mapiproxy.patch |
cc90af90 | 21 | Patch1: %{name}-link.patch |
2407fd75 | 22 | Patch2: flex2.6.patch |
db79d4b2 JR |
23 | Patch3: samba-4.2.patch |
24 | Patch4: fix-connection-args.patch | |
25 | Patch5: samba-4.4.patch | |
f28b8ba4 JB |
26 | Patch6: %{name}-covscan.patch |
27 | Patch7: %{name}-samba-4.10-macros.patch | |
3368736e | 28 | Patch8: %{name}-libical.patch |
74e2b0c5 | 29 | URL: https://github.com/openchange |
cc90af90 JB |
30 | BuildRequires: QtCore-devel >= 4.3.0 |
31 | BuildRequires: QtGui-devel >= 4.3.0 | |
32 | BuildRequires: autoconf >= 2.57 | |
33 | BuildRequires: automake | |
34 | BuildRequires: check-devel | |
35 | BuildRequires: doxygen | |
36 | BuildRequires: ldb-devel | |
37 | BuildRequires: libical-devel >= 0.46 | |
38 | BuildRequires: libmagic-devel | |
39 | BuildRequires: libmemcached-devel >= 1.0.18 | |
40 | BuildRequires: libpcap-devel | |
41 | BuildRequires: libstdc++-devel | |
42 | BuildRequires: mysql-devel | |
43 | BuildRequires: nanomsg-devel >= 0.5 | |
44 | BuildRequires: perl-base | |
45 | BuildRequires: pkgconfig >= 1:0.20 | |
46 | BuildRequires: popt-devel | |
83692358 | 47 | %if %{with python} |
cc90af90 | 48 | BuildRequires: python-devel >= 1:2.7 |
ce2c05b9 | 49 | BuildRequires: python-samba >= 4.2.2 |
83692358 | 50 | %endif |
cc90af90 | 51 | BuildRequires: rpmbuild(macros) >= 1.219 |
e0431659 | 52 | # with DCERCP multiplex and pending call support (upstream 4.1.18+ or 4.2.2+) |
f28b8ba4 JB |
53 | # samba-4.10-macros patch requires samba-pidl 4.10+ |
54 | BuildRequires: samba-devel >= 4.10 | |
55 | BuildRequires: samba-pidl >= 4.10 | |
cc90af90 JB |
56 | BuildRequires: sed >= 4.0 |
57 | BuildRequires: subunit-devel | |
58 | BuildRequires: talloc-devel | |
59 | BuildRequires: tdb-devel | |
60 | BuildRequires: zlib-devel | |
61 | Requires: %{name}-libs = %{version}-%{release} | |
2ef972cd | 62 | %{?with_python:Requires: python-openchange = %{version}-%{release}} |
cc90af90 JB |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
64 | ||
cc90af90 JB |
65 | %description |
66 | OpenChange is a portable Open Source implementation of Microsoft | |
67 | Exchange server and Exchange protocols. It provides a complete | |
68 | solution to interoperate with Microsoft Outlook clients or Microsoft | |
69 | Exchange servers. | |
70 | ||
71 | OpenChange client-side library is used in existing messaging clients | |
72 | and is the solution in new projects to communicate natively with | |
73 | Microsoft Exchange and Exchange-compatible servers. OpenChange server | |
74 | is a transparent Microsoft Exchange server replacement using native | |
75 | Exchange protocols and does not require any plugin installation in | |
76 | Outlook. | |
77 | ||
78 | %description -l pl.UTF-8 | |
79 | OpenChange to przenośna, mająca otwarte źródła implementacja serwera | |
80 | oraz protokołów Microsoft Exchange. Dostarcza kompletne rozwiązanie | |
81 | pozwalające współpracować z klientami Microsoft Outlook oraz serwerami | |
82 | Microsoft Exchange. | |
83 | ||
84 | Biblioteka kliencka OpenChange jest używana przez istniejących | |
85 | klientów pocztowych i pozwalają na natywną komunikację z serwerami | |
86 | Microsoft Exchange oraz zgodnymi. Serwer OpenChange to przezroczysty | |
87 | zamiennik serwera Microsoft Exchange wykorzystujący natywne protokoły | |
88 | Exchange, nie wymagający instalowania żadnych wtyczek w Outlooku. | |
89 | ||
90 | %package libs | |
91 | Summary: OpenChange client libraries | |
92 | Summary(pl.UTF-8): Biblioteki klienckie OpenChange | |
93 | Group: Libraries | |
94 | ||
95 | %description libs | |
96 | OpenChange client libraries. | |
97 | ||
98 | %description libs -l pl.UTF-8 | |
99 | Biblioteki klienckie OpenChange. | |
100 | ||
101 | %package devel | |
102 | Summary: Header files for OpenChange libraries | |
103 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek OpenChange | |
104 | Group: Development/Libraries | |
105 | Requires: %{name}-libs = %{version}-%{release} | |
f6e502a6 | 106 | Requires: ldb-devel |
e0431659 | 107 | Requires: samba-devel >= 4.2.2 |
f6e502a6 JB |
108 | Requires: talloc-devel |
109 | Requires: tevent-devel | |
110 | Requires: zlib-devel | |
cc90af90 JB |
111 | |
112 | %description devel | |
113 | Header files for OpenChange libraries. | |
114 | ||
115 | %description devel -l pl.UTF-8 | |
116 | Pliki nagłówkowe bibliotek OpenChange. | |
117 | ||
118 | %package c++ | |
119 | Summary: C++ interface to OpenChange MAPI library | |
120 | Summary(pl.UTF-8): Interfejs C++ do biblioteki OpenChange MAPI | |
121 | Group: Libraries | |
f6e502a6 | 122 | Requires: %{name}-libs = %{version}-%{release} |
cc90af90 JB |
123 | |
124 | %description c++ | |
125 | C++ interface to OpenChange MAPI library. | |
126 | ||
127 | %description c++ -l pl.UTF-8 | |
128 | Interfejs C++ do biblioteki OpenChange MAPI. | |
129 | ||
130 | %package c++-devel | |
131 | Summary: Header files of C++ interface to OpenChange MAPI library | |
132 | Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI | |
133 | Group: Development/Libraries | |
134 | Requires: %{name}-c++ = %{version}-%{release} | |
f6e502a6 JB |
135 | Requires: %{name}-devel = %{version}-%{release} |
136 | Requires: libstdc++-devel | |
cc90af90 JB |
137 | |
138 | %description c++-devel | |
139 | Header files of C++ interface to OpenChange MAPI library. | |
140 | ||
141 | %description c++-devel -l pl.UTF-8 | |
142 | Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI. | |
143 | ||
144 | %package qt | |
145 | Summary: Qt interface to OpenChange MAPI library | |
146 | Summary(pl.UTF-8): Interfejs Qt do biblioteki OpenChange MAPI | |
147 | Group: Libraries | |
f6e502a6 JB |
148 | Requires: %{name}-c++ = %{version}-%{release} |
149 | Requires: QtCore >= 4.3.0 | |
150 | Requires: QtGui >= 4.3.0 | |
cc90af90 JB |
151 | |
152 | %description qt | |
153 | Qt interface to OpenChange MAPI library. | |
154 | ||
155 | %description qt -l pl.UTF-8 | |
156 | Interfejs Qt do biblioteki OpenChange MAPI. | |
157 | ||
158 | %package qt-devel | |
159 | Summary: Header files of Qt interface to OpenChange MAPI library | |
160 | Summary(pl.UTF-8): Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI | |
161 | Group: Development/Libraries | |
162 | Requires: %{name}-qt = %{version}-%{release} | |
f6e502a6 | 163 | Requires: QtGui-devel >= 4.3.0 |
cc90af90 JB |
164 | |
165 | %description qt-devel | |
166 | Header files of Qt interface to OpenChange MAPI library. | |
167 | ||
168 | %description qt-devel -l pl.UTF-8 | |
169 | Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI. | |
170 | ||
171 | %package apidocs | |
172 | Summary: API documentation for OpenChange libraries | |
173 | Summary(pl.UTF-8): Dokumentacja API bibliotek OpenChange | |
174 | Group: Documentation | |
b3ba35a0 ER |
175 | %if "%{_rpmversion}" >= "5" |
176 | BuildArch: noarch | |
177 | %endif | |
cc90af90 JB |
178 | |
179 | %description apidocs | |
180 | API documentation for OpenChange libraries. | |
181 | ||
182 | %description apidocs -l pl.UTF-8 | |
183 | Dokumentacja API bibliotek OpenChange. | |
184 | ||
185 | %package -n python-openchange | |
186 | Summary: Python interface to OpenChange libraries | |
187 | Summary(pl.UTF-8): Interfejs Pythona do bibliotek OpenChange | |
188 | Group: Libraries/Python | |
189 | Requires: %{name}-libs = %{version}-%{release} | |
190 | ||
191 | %description -n python-openchange | |
192 | Python interface to OpenChange libraries. | |
193 | ||
194 | %description -n python-openchange -l pl.UTF-8 | |
195 | Interfejs Pythona do bibliotek OpenChange. | |
196 | ||
197 | %package -n nagios-plugin-openchange | |
198 | Summary: Nagios plugin to check Exchange/OpenChange services | |
199 | Summary(pl.UTF-8): Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange | |
200 | Group: Networking | |
201 | Requires: %{name} = %{version}-%{release} | |
202 | Requires: nagios | |
203 | ||
204 | %description -n nagios-plugin-openchange | |
205 | Nagios plugin to check Exchange/OpenChange services. | |
206 | ||
207 | %description -n nagios-plugin-openchange -l pl.UTF-8 | |
208 | Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange. | |
209 | ||
210 | %prep | |
211 | %setup -q -n %{name}-%{name}-%{version}-%{cname} | |
212 | %patch0 -p1 | |
213 | %patch1 -p1 | |
2407fd75 | 214 | %patch2 -p1 |
db79d4b2 JR |
215 | %patch3 -p1 |
216 | %patch4 -p1 | |
217 | %patch5 -p1 | |
f28b8ba4 JB |
218 | %patch6 -p1 |
219 | %patch7 -p1 | |
3368736e | 220 | %patch8 -p1 |
cc90af90 JB |
221 | |
222 | # no switch for verbose mode, enable manually :/ | |
223 | %{__sed} -i -e 's/^ @\(\$(\(PIDL\|CC\|CXX\|MOC\)\)/ \1/' Makefile | |
224 | ||
225 | %build | |
226 | %{__aclocal} | |
227 | %{__autoconf} | |
228 | %{__autoheader} | |
229 | %configure \ | |
230 | --datadir=%{_datadir}/openchange \ | |
231 | --enable-openchange-qt4 \ | |
83692358 | 232 | %{?with_python:--enable-pyopenchange} \ |
cc90af90 JB |
233 | --with-modulesdir=%{_libdir}/openchange/modules |
234 | %{__make} | |
235 | ||
236 | %if %{with apidocs} | |
237 | %{__make} doxygen | |
238 | %endif | |
239 | ||
240 | %install | |
241 | rm -rf $RPM_BUILD_ROOT | |
242 | ||
243 | %{__make} install \ | |
244 | DESTDIR=$RPM_BUILD_ROOT | |
245 | ||
246 | # doxygen generated man pages are messy; use HTML docs and install man1 pages manually | |
247 | %if 0 | |
248 | %{__make} installman \ | |
249 | DESTDIR=$RPM_BUILD_ROOT | |
250 | %else | |
251 | install -d $RPM_BUILD_ROOT%{_mandir}/man1 | |
252 | cp doc/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1 | |
253 | %endif | |
254 | ||
255 | # missing from make install | |
256 | install -d $RPM_BUILD_ROOT%{_includedir}/libqtmapi | |
257 | cp -p qt/lib/*.h $RPM_BUILD_ROOT%{_includedir}/libqtmapi | |
258 | cp -a libqtmapi.so.*.* libqtmapi.so $RPM_BUILD_ROOT%{_libdir} | |
259 | ||
260 | # tests | |
f28b8ba4 | 261 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/test_asyncnotif |
d7a0312a JB |
262 | %if %{without mapitest} |
263 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mapitest.1 | |
264 | %endif | |
cc90af90 JB |
265 | |
266 | /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir} | |
267 | ||
268 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
269 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
270 | %py_postclean | |
271 | ||
272 | %clean | |
273 | rm -rf $RPM_BUILD_ROOT | |
274 | ||
c949a72b JB |
275 | %post libs -p /sbin/ldconfig |
276 | %postun libs -p /sbin/ldconfig | |
277 | ||
278 | %post c++ -p /sbin/ldconfig | |
279 | %postun c++ -p /sbin/ldconfig | |
280 | ||
503206d3 JB |
281 | %post qt -p /sbin/ldconfig |
282 | %postun qt -p /sbin/ldconfig | |
cc90af90 JB |
283 | |
284 | %files | |
285 | %defattr(644,root,root,755) | |
286 | %doc CHANGES.md IDL_LICENSE.txt README.md README.smbconf.md doc/howto.txt | |
287 | %attr(755,root,root) %{_bindir}/exchange2ical | |
288 | %attr(755,root,root) %{_bindir}/exchange2mbox | |
289 | %attr(755,root,root) %{_bindir}/mapiprofile | |
290 | %attr(755,root,root) %{_bindir}/mapipropsdump | |
cc90af90 JB |
291 | %attr(755,root,root) %{_bindir}/openchangeclient |
292 | %attr(755,root,root) %{_bindir}/openchangemapidump | |
293 | %attr(755,root,root) %{_bindir}/openchangepfadmin | |
294 | %attr(755,root,root) %{_bindir}/rpcextract | |
295 | %attr(755,root,root) %{_bindir}/schemaIDGUID | |
cc90af90 | 296 | %dir %{_datadir}/openchange |
cc90af90 | 297 | %dir %{_datadir}/openchange/setup |
cc90af90 | 298 | %{_datadir}/openchange/setup/profiles |
cc90af90 JB |
299 | %{_mandir}/man1/exchange2ical.1* |
300 | %{_mandir}/man1/exchange2mbox.1* | |
301 | %{_mandir}/man1/mapiprofile.1* | |
cc90af90 JB |
302 | %{_mandir}/man1/openchangeclient.1* |
303 | %{_mandir}/man1/openchangepfadmin.1* | |
d7a0312a JB |
304 | %if %{with mapiproxy} |
305 | %attr(755,root,root) %{_bindir}/ocnotify | |
306 | %attr(755,root,root) %{_sbindir}/openchange_group | |
307 | %attr(755,root,root) %{_sbindir}/openchange_migrate | |
308 | %attr(755,root,root) %{_sbindir}/openchange_neworganization | |
309 | %attr(755,root,root) %{_sbindir}/openchange_newuser | |
310 | %attr(755,root,root) %{_sbindir}/openchange_provision | |
311 | # XXX: dir specified by dcerpc_server.pc file, should belong to samba or samba-libs | |
312 | %dir %{_libdir}/samba/dcerpc_server | |
313 | %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_asyncemsmdb.so | |
314 | %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_mapiproxy.so | |
315 | %dir %{_libdir}/openchange | |
316 | %dir %{_libdir}/openchange/modules | |
317 | %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy | |
318 | %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_cache.so | |
319 | %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_downgrade.so | |
320 | %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_dummy.so | |
321 | %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_pack.so | |
322 | %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy_server | |
323 | %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_ds_rfr.so | |
324 | %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_emsmdb.so | |
325 | %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_nsp.so | |
326 | %{_datadir}/openchange/setup/mapistore | |
327 | %{_datadir}/openchange/setup/openchangedb | |
328 | %dir %{_datadir}/samba/setup/AD | |
329 | %{_datadir}/samba/setup/AD/oc_provision_*.ldif | |
330 | %{_datadir}/samba/setup/AD/provision_schema_basedn_modify.ldif | |
331 | %{_datadir}/samba/setup/AD/update_now.ldif | |
332 | %{_datadir}/samba/setup/AD/prefixMap.txt | |
333 | %endif | |
334 | %if %{with mapitest} | |
335 | %attr(755,root,root) %{_bindir}/mapitest | |
336 | %{_datadir}/openchange/mapitest | |
337 | %{_mandir}/man1/mapitest.1* | |
338 | %endif | |
cc90af90 JB |
339 | |
340 | %files libs | |
341 | %defattr(644,root,root,755) | |
342 | %attr(755,root,root) %{_libdir}/libmapi.so.*.* | |
343 | %attr(755,root,root) %ghost %{_libdir}/libmapi.so.0 | |
344 | %attr(755,root,root) %{_libdir}/libmapiadmin.so.*.* | |
345 | %attr(755,root,root) %ghost %{_libdir}/libmapiadmin.so.0 | |
cc90af90 JB |
346 | %attr(755,root,root) %{_libdir}/libocpf.so.*.* |
347 | %attr(755,root,root) %ghost %{_libdir}/libocpf.so.0 | |
d7a0312a JB |
348 | %if %{with mapiproxy} |
349 | %attr(755,root,root) %{_libdir}/libmapiproxy.so.*.* | |
350 | %attr(755,root,root) %ghost %{_libdir}/libmapiproxy.so.0 | |
351 | %attr(755,root,root) %{_libdir}/libmapiserver.so.*.* | |
352 | %attr(755,root,root) %ghost %{_libdir}/libmapiserver.so.0 | |
353 | %attr(755,root,root) %{_libdir}/libmapistore.so.*.* | |
354 | %attr(755,root,root) %ghost %{_libdir}/libmapistore.so.0 | |
355 | %endif | |
cc90af90 JB |
356 | |
357 | %files devel | |
358 | %defattr(644,root,root,755) | |
359 | %attr(755,root,root) %{_libdir}/libmapi.so | |
360 | %attr(755,root,root) %{_libdir}/libmapiadmin.so | |
cc90af90 JB |
361 | %attr(755,root,root) %{_libdir}/libocpf.so |
362 | %{_includedir}/gen_ndr | |
363 | %{_includedir}/libmapi | |
cc90af90 JB |
364 | %{_includedir}/libmapiadmin |
365 | %{_includedir}/libocpf | |
cc90af90 | 366 | %{_pkgconfigdir}/libmapi.pc |
cc90af90 | 367 | %{_pkgconfigdir}/libmapiadmin.pc |
cc90af90 | 368 | %{_pkgconfigdir}/libocpf.pc |
d7a0312a JB |
369 | %if %{with mapiproxy} |
370 | %attr(755,root,root) %{_libdir}/libmapiproxy.so | |
371 | %attr(755,root,root) %{_libdir}/libmapiserver.so | |
372 | %attr(755,root,root) %{_libdir}/libmapistore.so | |
373 | %{_includedir}/mapistore | |
374 | %{_includedir}/libmapiproxy.h | |
375 | %{_includedir}/libmapiserver.h | |
376 | %{_pkgconfigdir}/libmapiproxy.pc | |
377 | %{_pkgconfigdir}/libmapiserver.pc | |
378 | %{_pkgconfigdir}/libmapistore.pc | |
379 | %endif | |
cc90af90 | 380 | |
c949a72b JB |
381 | %files c++ |
382 | %defattr(644,root,root,755) | |
383 | %attr(755,root,root) %{_libdir}/libmapipp.so.*.* | |
384 | %attr(755,root,root) %ghost %{_libdir}/libmapipp.so.0 | |
385 | ||
386 | %files c++-devel | |
387 | %defattr(644,root,root,755) | |
388 | %attr(755,root,root) %{_libdir}/libmapipp.so | |
389 | %{_includedir}/libmapi++ | |
390 | %{_pkgconfigdir}/libmapi++.pc | |
391 | ||
cc90af90 JB |
392 | %files qt |
393 | %defattr(644,root,root,755) | |
394 | %attr(755,root,root) %{_libdir}/libqtmapi.so.*.* | |
395 | %attr(755,root,root) %ghost %{_libdir}/libqtmapi.so.0 | |
396 | ||
397 | %files qt-devel | |
398 | %defattr(644,root,root,755) | |
399 | %attr(755,root,root) %{_libdir}/libqtmapi.so | |
400 | %{_includedir}/libqtmapi | |
401 | ||
402 | %if %{with apidocs} | |
403 | %files apidocs | |
404 | %defattr(644,root,root,755) | |
405 | %doc apidocs/html/* | |
406 | %endif | |
407 | ||
83692358 | 408 | %if %{with python} |
cc90af90 JB |
409 | %files -n python-openchange |
410 | %defattr(644,root,root,755) | |
411 | %dir %{py_sitedir}/openchange | |
412 | %attr(755,root,root) %{py_sitedir}/openchange/mapi.so | |
413 | %attr(755,root,root) %{py_sitedir}/openchange/mapistore.so | |
d7a0312a JB |
414 | %if %{with mapiproxy} |
415 | %{py_sitedir}/openchange/*.py[co] | |
416 | %{py_sitedir}/openchange/migration | |
417 | %{py_sitedir}/openchange/tests | |
418 | %{py_sitedir}/openchange/utils | |
419 | %{py_sitedir}/openchange/web | |
420 | %endif | |
83692358 | 421 | %endif |
cc90af90 JB |
422 | |
423 | %files -n nagios-plugin-openchange | |
424 | %defattr(644,root,root,755) | |
425 | # R: perl, openchangeclient | |
b3ba35a0 | 426 | # FIXME: use /usr/lib/nagios/plugins dir and make package noarch |
cc90af90 JB |
427 | %attr(755,root,root) %{_libdir}/nagios/check_exchange |
428 | # default profile database - should be /etc/... | |
429 | #%config(noreplace) %verify(not md5 mtime size) %{_libdir}/nagios/plugins/check_exchange.ldb |