2 # - nagios plugin (see it's files section for details)
5 %bcond_without apidocs # do not build and package API docs
6 %bcond_with mapiproxy # mapiproxy suite (disabled with Samba 4.4+)
7 %bcond_with mapitest # mapitest utility (disabled with Samba 4.4+)
8 %bcond_with python # build python package (requires disabled mapiproxy)
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
18 #Source0Download: https://github.com/openchange/openchange/releases
19 Source0: https://github.com/openchange/openchange/archive/%{name}-%{version}-%{cname}.tar.gz
20 # Source0-md5: 96c13c78c2bcbd7040f7848746284b9f
21 Patch0: disable-mapiproxy.patch
22 Patch1: %{name}-link.patch
24 Patch3: samba-4.2.patch
25 Patch4: fix-connection-args.patch
26 Patch5: samba-4.4.patch
27 Patch6: %{name}-covscan.patch
28 Patch7: %{name}-samba-4.10-macros.patch
29 Patch8: %{name}-libical.patch
30 Patch9: samba-4.11.patch
31 Patch10: samba-4.12.patch
32 Patch11: %{name}-nanomsg.patch
33 Patch12: samba-4.15.patch
34 Patch13: samba-4.20.patch
35 URL: https://github.com/openchange
36 BuildRequires: QtCore-devel >= 4.3.0
37 BuildRequires: QtGui-devel >= 4.3.0
38 BuildRequires: autoconf >= 2.57
39 BuildRequires: automake
40 BuildRequires: check-devel
41 BuildRequires: doxygen
42 BuildRequires: ldb-devel
43 BuildRequires: libical-devel >= 0.46
44 BuildRequires: libmagic-devel
45 BuildRequires: libmemcached-devel >= 1.0.18
46 BuildRequires: libpcap-devel
47 BuildRequires: libstdc++-devel
48 BuildRequires: mysql-devel
49 BuildRequires: nanomsg-devel >= 1.0.0
50 BuildRequires: perl-base
51 BuildRequires: pkgconfig >= 1:0.20
52 BuildRequires: popt-devel
53 BuildRequires: python-devel >= 1:2.7
55 BuildRequires: python-samba >= 4.2.2
57 BuildRequires: qt4-build >= 4.3.0
58 BuildRequires: rpm-build >= 4.6
59 BuildRequires: rpmbuild(macros) >= 1.752
60 # with DCERCP multiplex and pending call support (upstream 4.1.18+ or 4.2.2+)
61 # samba-4.10-macros patch requires samba-pidl 4.10+
62 BuildRequires: samba-devel >= 4.10
63 BuildRequires: samba-pidl >= 4.10
64 BuildRequires: sed >= 4.0
65 BuildRequires: subunit-devel
66 BuildRequires: talloc-devel
67 BuildRequires: tdb-devel
68 BuildRequires: zlib-devel
69 Requires: %{name}-libs = %{version}-%{release}
70 %{?with_python:Requires: python-openchange = %{version}-%{release}}
71 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73 %define _noautoreq_perl utils
76 OpenChange is a portable Open Source implementation of Microsoft
77 Exchange server and Exchange protocols. It provides a complete
78 solution to interoperate with Microsoft Outlook clients or Microsoft
81 OpenChange client-side library is used in existing messaging clients
82 and is the solution in new projects to communicate natively with
83 Microsoft Exchange and Exchange-compatible servers. OpenChange server
84 is a transparent Microsoft Exchange server replacement using native
85 Exchange protocols and does not require any plugin installation in
88 %description -l pl.UTF-8
89 OpenChange to przenośna, mająca otwarte źródła implementacja serwera
90 oraz protokołów Microsoft Exchange. Dostarcza kompletne rozwiązanie
91 pozwalające współpracować z klientami Microsoft Outlook oraz serwerami
94 Biblioteka kliencka OpenChange jest używana przez istniejących
95 klientów pocztowych i pozwalają na natywną komunikację z serwerami
96 Microsoft Exchange oraz zgodnymi. Serwer OpenChange to przezroczysty
97 zamiennik serwera Microsoft Exchange wykorzystujący natywne protokoły
98 Exchange, nie wymagający instalowania żadnych wtyczek w Outlooku.
101 Summary: OpenChange client libraries
102 Summary(pl.UTF-8): Biblioteki klienckie OpenChange
106 OpenChange client libraries.
108 %description libs -l pl.UTF-8
109 Biblioteki klienckie OpenChange.
112 Summary: Header files for OpenChange libraries
113 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek OpenChange
114 Group: Development/Libraries
115 Requires: %{name}-libs = %{version}-%{release}
117 Requires: samba-devel >= 4.2.2
118 Requires: talloc-devel
119 Requires: tevent-devel
123 Header files for OpenChange libraries.
125 %description devel -l pl.UTF-8
126 Pliki nagłówkowe bibliotek OpenChange.
129 Summary: C++ interface to OpenChange MAPI library
130 Summary(pl.UTF-8): Interfejs C++ do biblioteki OpenChange MAPI
132 Requires: %{name}-libs = %{version}-%{release}
135 C++ interface to OpenChange MAPI library.
137 %description c++ -l pl.UTF-8
138 Interfejs C++ do biblioteki OpenChange MAPI.
141 Summary: Header files of C++ interface to OpenChange MAPI library
142 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI
143 Group: Development/Libraries
144 Requires: %{name}-c++ = %{version}-%{release}
145 Requires: %{name}-devel = %{version}-%{release}
146 Requires: libstdc++-devel
148 %description c++-devel
149 Header files of C++ interface to OpenChange MAPI library.
151 %description c++-devel -l pl.UTF-8
152 Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI.
155 Summary: Qt interface to OpenChange MAPI library
156 Summary(pl.UTF-8): Interfejs Qt do biblioteki OpenChange MAPI
158 Requires: %{name}-c++ = %{version}-%{release}
159 Requires: QtCore >= 4.3.0
160 Requires: QtGui >= 4.3.0
163 Qt interface to OpenChange MAPI library.
165 %description qt -l pl.UTF-8
166 Interfejs Qt do biblioteki OpenChange MAPI.
169 Summary: Header files of Qt interface to OpenChange MAPI library
170 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI
171 Group: Development/Libraries
172 Requires: %{name}-qt = %{version}-%{release}
173 Requires: QtGui-devel >= 4.3.0
175 %description qt-devel
176 Header files of Qt interface to OpenChange MAPI library.
178 %description qt-devel -l pl.UTF-8
179 Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI.
182 Summary: API documentation for OpenChange libraries
183 Summary(pl.UTF-8): Dokumentacja API bibliotek OpenChange
188 API documentation for OpenChange libraries.
190 %description apidocs -l pl.UTF-8
191 Dokumentacja API bibliotek OpenChange.
193 %package -n python-openchange
194 Summary: Python interface to OpenChange libraries
195 Summary(pl.UTF-8): Interfejs Pythona do bibliotek OpenChange
196 Group: Libraries/Python
197 Requires: %{name}-libs = %{version}-%{release}
199 %description -n python-openchange
200 Python interface to OpenChange libraries.
202 %description -n python-openchange -l pl.UTF-8
203 Interfejs Pythona do bibliotek OpenChange.
205 %package -n nagios-plugin-openchange
206 Summary: Nagios plugin to check Exchange/OpenChange services
207 Summary(pl.UTF-8): Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange
209 Requires: %{name} = %{version}-%{release}
212 %description -n nagios-plugin-openchange
213 Nagios plugin to check Exchange/OpenChange services.
215 %description -n nagios-plugin-openchange -l pl.UTF-8
216 Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange.
219 %setup -q -n %{name}-%{name}-%{version}-%{cname}
235 # no switch for verbose mode, enable manually :/
236 %{__sed} -i -e 's/^ @\(\$(\(PIDL\|CC\|CXX\|MOC\)\)/ \1/' Makefile
242 # instead of calling automake (there is no Makefile.am)
243 cp -f /usr/share/automake/{compile,missing} .
245 --datadir=%{_datadir}/openchange \
246 --enable-openchange-qt4 \
247 %{?with_python:--enable-pyopenchange} \
248 --with-modulesdir=%{_libdir}/openchange/modules
256 rm -rf $RPM_BUILD_ROOT
259 DESTDIR=$RPM_BUILD_ROOT
261 # doxygen generated man pages are messy; use HTML docs and install man1 pages manually
263 %{__make} installman \
264 DESTDIR=$RPM_BUILD_ROOT
266 install -d $RPM_BUILD_ROOT%{_mandir}/man1
267 cp doc/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1
270 # missing from make install
271 install -d $RPM_BUILD_ROOT%{_includedir}/libqtmapi
272 cp -p qt/lib/*.h $RPM_BUILD_ROOT%{_includedir}/libqtmapi
273 cp -a libqtmapi.so.*.* libqtmapi.so $RPM_BUILD_ROOT%{_libdir}
276 %{__rm} $RPM_BUILD_ROOT%{_bindir}/test_asyncnotif
277 %if %{without mapitest}
278 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mapitest.1
281 /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
283 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
284 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
288 rm -rf $RPM_BUILD_ROOT
290 %post libs -p /sbin/ldconfig
291 %postun libs -p /sbin/ldconfig
293 %post c++ -p /sbin/ldconfig
294 %postun c++ -p /sbin/ldconfig
296 %post qt -p /sbin/ldconfig
297 %postun qt -p /sbin/ldconfig
300 %defattr(644,root,root,755)
301 %doc CHANGES.md IDL_LICENSE.txt README.md README.smbconf.md doc/howto.txt
302 %attr(755,root,root) %{_bindir}/exchange2ical
303 %attr(755,root,root) %{_bindir}/exchange2mbox
304 %attr(755,root,root) %{_bindir}/mapiprofile
305 %attr(755,root,root) %{_bindir}/mapipropsdump
306 %attr(755,root,root) %{_bindir}/openchangeclient
307 %attr(755,root,root) %{_bindir}/openchangemapidump
308 %attr(755,root,root) %{_bindir}/openchangepfadmin
309 %attr(755,root,root) %{_bindir}/rpcextract
310 %attr(755,root,root) %{_bindir}/schemaIDGUID
311 %dir %{_datadir}/openchange
312 %dir %{_datadir}/openchange/setup
313 %{_datadir}/openchange/setup/profiles
314 %{_mandir}/man1/exchange2ical.1*
315 %{_mandir}/man1/exchange2mbox.1*
316 %{_mandir}/man1/mapiprofile.1*
317 %{_mandir}/man1/openchangeclient.1*
318 %{_mandir}/man1/openchangepfadmin.1*
319 %if %{with mapiproxy}
320 %attr(755,root,root) %{_bindir}/ocnotify
321 %attr(755,root,root) %{_sbindir}/openchange_group
322 %attr(755,root,root) %{_sbindir}/openchange_migrate
323 %attr(755,root,root) %{_sbindir}/openchange_neworganization
324 %attr(755,root,root) %{_sbindir}/openchange_newuser
325 %attr(755,root,root) %{_sbindir}/openchange_provision
326 # XXX: dir specified by dcerpc_server.pc file, should belong to samba or samba-libs
327 %dir %{_libdir}/samba/dcerpc_server
328 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_asyncemsmdb.so
329 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_mapiproxy.so
330 %dir %{_libdir}/openchange
331 %dir %{_libdir}/openchange/modules
332 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy
333 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_cache.so
334 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_downgrade.so
335 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_dummy.so
336 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_pack.so
337 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy_server
338 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_ds_rfr.so
339 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_emsmdb.so
340 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_nsp.so
341 %{_datadir}/openchange/setup/mapistore
342 %{_datadir}/openchange/setup/openchangedb
343 %dir %{_datadir}/samba/setup/AD
344 %{_datadir}/samba/setup/AD/oc_provision_*.ldif
345 %{_datadir}/samba/setup/AD/provision_schema_basedn_modify.ldif
346 %{_datadir}/samba/setup/AD/update_now.ldif
347 %{_datadir}/samba/setup/AD/prefixMap.txt
350 %attr(755,root,root) %{_bindir}/mapitest
351 %{_datadir}/openchange/mapitest
352 %{_mandir}/man1/mapitest.1*
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_libdir}/libmapi.so.*.*
358 %attr(755,root,root) %ghost %{_libdir}/libmapi.so.0
359 %attr(755,root,root) %{_libdir}/libmapiadmin.so.*.*
360 %attr(755,root,root) %ghost %{_libdir}/libmapiadmin.so.0
361 %attr(755,root,root) %{_libdir}/libocpf.so.*.*
362 %attr(755,root,root) %ghost %{_libdir}/libocpf.so.0
363 %if %{with mapiproxy}
364 %attr(755,root,root) %{_libdir}/libmapiproxy.so.*.*
365 %attr(755,root,root) %ghost %{_libdir}/libmapiproxy.so.0
366 %attr(755,root,root) %{_libdir}/libmapiserver.so.*.*
367 %attr(755,root,root) %ghost %{_libdir}/libmapiserver.so.0
368 %attr(755,root,root) %{_libdir}/libmapistore.so.*.*
369 %attr(755,root,root) %ghost %{_libdir}/libmapistore.so.0
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_libdir}/libmapi.so
375 %attr(755,root,root) %{_libdir}/libmapiadmin.so
376 %attr(755,root,root) %{_libdir}/libocpf.so
377 %{_includedir}/gen_ndr
378 %{_includedir}/libmapi
379 %{_includedir}/libmapiadmin
380 %{_includedir}/libocpf
381 %{_pkgconfigdir}/libmapi.pc
382 %{_pkgconfigdir}/libmapiadmin.pc
383 %{_pkgconfigdir}/libocpf.pc
384 %if %{with mapiproxy}
385 %attr(755,root,root) %{_libdir}/libmapiproxy.so
386 %attr(755,root,root) %{_libdir}/libmapiserver.so
387 %attr(755,root,root) %{_libdir}/libmapistore.so
388 %{_includedir}/mapistore
389 %{_includedir}/libmapiproxy.h
390 %{_includedir}/libmapiserver.h
391 %{_pkgconfigdir}/libmapiproxy.pc
392 %{_pkgconfigdir}/libmapiserver.pc
393 %{_pkgconfigdir}/libmapistore.pc
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_libdir}/libmapipp.so.*.*
399 %attr(755,root,root) %ghost %{_libdir}/libmapipp.so.0
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_libdir}/libmapipp.so
404 %{_includedir}/libmapi++
405 %{_pkgconfigdir}/libmapi++.pc
408 %defattr(644,root,root,755)
409 %attr(755,root,root) %{_libdir}/libqtmapi.so.*.*
410 %attr(755,root,root) %ghost %{_libdir}/libqtmapi.so.0
413 %defattr(644,root,root,755)
414 %attr(755,root,root) %{_libdir}/libqtmapi.so
415 %{_includedir}/libqtmapi
419 %defattr(644,root,root,755)
424 %files -n python-openchange
425 %defattr(644,root,root,755)
426 %dir %{py_sitedir}/openchange
427 %attr(755,root,root) %{py_sitedir}/openchange/mapi.so
428 %attr(755,root,root) %{py_sitedir}/openchange/mapistore.so
429 %if %{with mapiproxy}
430 %{py_sitedir}/openchange/*.py[co]
431 %{py_sitedir}/openchange/migration
432 %{py_sitedir}/openchange/tests
433 %{py_sitedir}/openchange/utils
434 %{py_sitedir}/openchange/web
438 %files -n nagios-plugin-openchange
439 %defattr(644,root,root,755)
440 # R: perl, openchangeclient
441 # FIXME: use /usr/lib/nagios/plugins dir and make package noarch
442 %attr(755,root,root) %{_libdir}/nagios/check_exchange
443 # default profile database - should be /etc/...
444 #%config(noreplace) %verify(not md5 mtime size) %{_libdir}/nagios/plugins/check_exchange.ldb