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 URL: https://github.com/openchange
34 BuildRequires: QtCore-devel >= 4.3.0
35 BuildRequires: QtGui-devel >= 4.3.0
36 BuildRequires: autoconf >= 2.57
37 BuildRequires: automake
38 BuildRequires: check-devel
39 BuildRequires: doxygen
40 BuildRequires: ldb-devel
41 BuildRequires: libical-devel >= 0.46
42 BuildRequires: libmagic-devel
43 BuildRequires: libmemcached-devel >= 1.0.18
44 BuildRequires: libpcap-devel
45 BuildRequires: libstdc++-devel
46 BuildRequires: mysql-devel
47 BuildRequires: nanomsg-devel >= 1.0.0
48 BuildRequires: perl-base
49 BuildRequires: pkgconfig >= 1:0.20
50 BuildRequires: popt-devel
52 BuildRequires: python-devel >= 1:2.7
53 BuildRequires: python-samba >= 4.2.2
55 BuildRequires: rpmbuild(macros) >= 1.752
56 # with DCERCP multiplex and pending call support (upstream 4.1.18+ or 4.2.2+)
57 # samba-4.10-macros patch requires samba-pidl 4.10+
58 BuildRequires: samba-devel >= 4.10
59 BuildRequires: samba-pidl >= 4.10
60 BuildRequires: sed >= 4.0
61 BuildRequires: subunit-devel
62 BuildRequires: talloc-devel
63 BuildRequires: tdb-devel
64 BuildRequires: zlib-devel
65 Requires: %{name}-libs = %{version}-%{release}
66 %{?with_python:Requires: python-openchange = %{version}-%{release}}
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 %define _noautoreq_perl utils
72 OpenChange is a portable Open Source implementation of Microsoft
73 Exchange server and Exchange protocols. It provides a complete
74 solution to interoperate with Microsoft Outlook clients or Microsoft
77 OpenChange client-side library is used in existing messaging clients
78 and is the solution in new projects to communicate natively with
79 Microsoft Exchange and Exchange-compatible servers. OpenChange server
80 is a transparent Microsoft Exchange server replacement using native
81 Exchange protocols and does not require any plugin installation in
84 %description -l pl.UTF-8
85 OpenChange to przenośna, mająca otwarte źródła implementacja serwera
86 oraz protokołów Microsoft Exchange. Dostarcza kompletne rozwiązanie
87 pozwalające współpracować z klientami Microsoft Outlook oraz serwerami
90 Biblioteka kliencka OpenChange jest używana przez istniejących
91 klientów pocztowych i pozwalają na natywną komunikację z serwerami
92 Microsoft Exchange oraz zgodnymi. Serwer OpenChange to przezroczysty
93 zamiennik serwera Microsoft Exchange wykorzystujący natywne protokoły
94 Exchange, nie wymagający instalowania żadnych wtyczek w Outlooku.
97 Summary: OpenChange client libraries
98 Summary(pl.UTF-8): Biblioteki klienckie OpenChange
102 OpenChange client libraries.
104 %description libs -l pl.UTF-8
105 Biblioteki klienckie OpenChange.
108 Summary: Header files for OpenChange libraries
109 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek OpenChange
110 Group: Development/Libraries
111 Requires: %{name}-libs = %{version}-%{release}
113 Requires: samba-devel >= 4.2.2
114 Requires: talloc-devel
115 Requires: tevent-devel
119 Header files for OpenChange libraries.
121 %description devel -l pl.UTF-8
122 Pliki nagłówkowe bibliotek OpenChange.
125 Summary: C++ interface to OpenChange MAPI library
126 Summary(pl.UTF-8): Interfejs C++ do biblioteki OpenChange MAPI
128 Requires: %{name}-libs = %{version}-%{release}
131 C++ interface to OpenChange MAPI library.
133 %description c++ -l pl.UTF-8
134 Interfejs C++ do biblioteki OpenChange MAPI.
137 Summary: Header files of C++ interface to OpenChange MAPI library
138 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI
139 Group: Development/Libraries
140 Requires: %{name}-c++ = %{version}-%{release}
141 Requires: %{name}-devel = %{version}-%{release}
142 Requires: libstdc++-devel
144 %description c++-devel
145 Header files of C++ interface to OpenChange MAPI library.
147 %description c++-devel -l pl.UTF-8
148 Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI.
151 Summary: Qt interface to OpenChange MAPI library
152 Summary(pl.UTF-8): Interfejs Qt do biblioteki OpenChange MAPI
154 Requires: %{name}-c++ = %{version}-%{release}
155 Requires: QtCore >= 4.3.0
156 Requires: QtGui >= 4.3.0
159 Qt interface to OpenChange MAPI library.
161 %description qt -l pl.UTF-8
162 Interfejs Qt do biblioteki OpenChange MAPI.
165 Summary: Header files of Qt interface to OpenChange MAPI library
166 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI
167 Group: Development/Libraries
168 Requires: %{name}-qt = %{version}-%{release}
169 Requires: QtGui-devel >= 4.3.0
171 %description qt-devel
172 Header files of Qt interface to OpenChange MAPI library.
174 %description qt-devel -l pl.UTF-8
175 Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI.
178 Summary: API documentation for OpenChange libraries
179 Summary(pl.UTF-8): Dokumentacja API bibliotek OpenChange
184 API documentation for OpenChange libraries.
186 %description apidocs -l pl.UTF-8
187 Dokumentacja API bibliotek OpenChange.
189 %package -n python-openchange
190 Summary: Python interface to OpenChange libraries
191 Summary(pl.UTF-8): Interfejs Pythona do bibliotek OpenChange
192 Group: Libraries/Python
193 Requires: %{name}-libs = %{version}-%{release}
195 %description -n python-openchange
196 Python interface to OpenChange libraries.
198 %description -n python-openchange -l pl.UTF-8
199 Interfejs Pythona do bibliotek OpenChange.
201 %package -n nagios-plugin-openchange
202 Summary: Nagios plugin to check Exchange/OpenChange services
203 Summary(pl.UTF-8): Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange
205 Requires: %{name} = %{version}-%{release}
208 %description -n nagios-plugin-openchange
209 Nagios plugin to check Exchange/OpenChange services.
211 %description -n nagios-plugin-openchange -l pl.UTF-8
212 Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange.
215 %setup -q -n %{name}-%{name}-%{version}-%{cname}
229 # no switch for verbose mode, enable manually :/
230 %{__sed} -i -e 's/^ @\(\$(\(PIDL\|CC\|CXX\|MOC\)\)/ \1/' Makefile
236 # instead of calling automake (there is no Makefile.am)
237 cp -f /usr/share/automake/{compile,missing} .
239 --datadir=%{_datadir}/openchange \
240 --enable-openchange-qt4 \
241 %{?with_python:--enable-pyopenchange} \
242 --with-modulesdir=%{_libdir}/openchange/modules
250 rm -rf $RPM_BUILD_ROOT
253 DESTDIR=$RPM_BUILD_ROOT
255 # doxygen generated man pages are messy; use HTML docs and install man1 pages manually
257 %{__make} installman \
258 DESTDIR=$RPM_BUILD_ROOT
260 install -d $RPM_BUILD_ROOT%{_mandir}/man1
261 cp doc/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1
264 # missing from make install
265 install -d $RPM_BUILD_ROOT%{_includedir}/libqtmapi
266 cp -p qt/lib/*.h $RPM_BUILD_ROOT%{_includedir}/libqtmapi
267 cp -a libqtmapi.so.*.* libqtmapi.so $RPM_BUILD_ROOT%{_libdir}
270 %{__rm} $RPM_BUILD_ROOT%{_bindir}/test_asyncnotif
271 %if %{without mapitest}
272 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mapitest.1
275 /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
277 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
278 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
282 rm -rf $RPM_BUILD_ROOT
284 %post libs -p /sbin/ldconfig
285 %postun libs -p /sbin/ldconfig
287 %post c++ -p /sbin/ldconfig
288 %postun c++ -p /sbin/ldconfig
290 %post qt -p /sbin/ldconfig
291 %postun qt -p /sbin/ldconfig
294 %defattr(644,root,root,755)
295 %doc CHANGES.md IDL_LICENSE.txt README.md README.smbconf.md doc/howto.txt
296 %attr(755,root,root) %{_bindir}/exchange2ical
297 %attr(755,root,root) %{_bindir}/exchange2mbox
298 %attr(755,root,root) %{_bindir}/mapiprofile
299 %attr(755,root,root) %{_bindir}/mapipropsdump
300 %attr(755,root,root) %{_bindir}/openchangeclient
301 %attr(755,root,root) %{_bindir}/openchangemapidump
302 %attr(755,root,root) %{_bindir}/openchangepfadmin
303 %attr(755,root,root) %{_bindir}/rpcextract
304 %attr(755,root,root) %{_bindir}/schemaIDGUID
305 %dir %{_datadir}/openchange
306 %dir %{_datadir}/openchange/setup
307 %{_datadir}/openchange/setup/profiles
308 %{_mandir}/man1/exchange2ical.1*
309 %{_mandir}/man1/exchange2mbox.1*
310 %{_mandir}/man1/mapiprofile.1*
311 %{_mandir}/man1/openchangeclient.1*
312 %{_mandir}/man1/openchangepfadmin.1*
313 %if %{with mapiproxy}
314 %attr(755,root,root) %{_bindir}/ocnotify
315 %attr(755,root,root) %{_sbindir}/openchange_group
316 %attr(755,root,root) %{_sbindir}/openchange_migrate
317 %attr(755,root,root) %{_sbindir}/openchange_neworganization
318 %attr(755,root,root) %{_sbindir}/openchange_newuser
319 %attr(755,root,root) %{_sbindir}/openchange_provision
320 # XXX: dir specified by dcerpc_server.pc file, should belong to samba or samba-libs
321 %dir %{_libdir}/samba/dcerpc_server
322 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_asyncemsmdb.so
323 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_mapiproxy.so
324 %dir %{_libdir}/openchange
325 %dir %{_libdir}/openchange/modules
326 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy
327 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_cache.so
328 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_downgrade.so
329 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_dummy.so
330 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_pack.so
331 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy_server
332 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_ds_rfr.so
333 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_emsmdb.so
334 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_nsp.so
335 %{_datadir}/openchange/setup/mapistore
336 %{_datadir}/openchange/setup/openchangedb
337 %dir %{_datadir}/samba/setup/AD
338 %{_datadir}/samba/setup/AD/oc_provision_*.ldif
339 %{_datadir}/samba/setup/AD/provision_schema_basedn_modify.ldif
340 %{_datadir}/samba/setup/AD/update_now.ldif
341 %{_datadir}/samba/setup/AD/prefixMap.txt
344 %attr(755,root,root) %{_bindir}/mapitest
345 %{_datadir}/openchange/mapitest
346 %{_mandir}/man1/mapitest.1*
350 %defattr(644,root,root,755)
351 %attr(755,root,root) %{_libdir}/libmapi.so.*.*
352 %attr(755,root,root) %ghost %{_libdir}/libmapi.so.0
353 %attr(755,root,root) %{_libdir}/libmapiadmin.so.*.*
354 %attr(755,root,root) %ghost %{_libdir}/libmapiadmin.so.0
355 %attr(755,root,root) %{_libdir}/libocpf.so.*.*
356 %attr(755,root,root) %ghost %{_libdir}/libocpf.so.0
357 %if %{with mapiproxy}
358 %attr(755,root,root) %{_libdir}/libmapiproxy.so.*.*
359 %attr(755,root,root) %ghost %{_libdir}/libmapiproxy.so.0
360 %attr(755,root,root) %{_libdir}/libmapiserver.so.*.*
361 %attr(755,root,root) %ghost %{_libdir}/libmapiserver.so.0
362 %attr(755,root,root) %{_libdir}/libmapistore.so.*.*
363 %attr(755,root,root) %ghost %{_libdir}/libmapistore.so.0
367 %defattr(644,root,root,755)
368 %attr(755,root,root) %{_libdir}/libmapi.so
369 %attr(755,root,root) %{_libdir}/libmapiadmin.so
370 %attr(755,root,root) %{_libdir}/libocpf.so
371 %{_includedir}/gen_ndr
372 %{_includedir}/libmapi
373 %{_includedir}/libmapiadmin
374 %{_includedir}/libocpf
375 %{_pkgconfigdir}/libmapi.pc
376 %{_pkgconfigdir}/libmapiadmin.pc
377 %{_pkgconfigdir}/libocpf.pc
378 %if %{with mapiproxy}
379 %attr(755,root,root) %{_libdir}/libmapiproxy.so
380 %attr(755,root,root) %{_libdir}/libmapiserver.so
381 %attr(755,root,root) %{_libdir}/libmapistore.so
382 %{_includedir}/mapistore
383 %{_includedir}/libmapiproxy.h
384 %{_includedir}/libmapiserver.h
385 %{_pkgconfigdir}/libmapiproxy.pc
386 %{_pkgconfigdir}/libmapiserver.pc
387 %{_pkgconfigdir}/libmapistore.pc
391 %defattr(644,root,root,755)
392 %attr(755,root,root) %{_libdir}/libmapipp.so.*.*
393 %attr(755,root,root) %ghost %{_libdir}/libmapipp.so.0
396 %defattr(644,root,root,755)
397 %attr(755,root,root) %{_libdir}/libmapipp.so
398 %{_includedir}/libmapi++
399 %{_pkgconfigdir}/libmapi++.pc
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_libdir}/libqtmapi.so.*.*
404 %attr(755,root,root) %ghost %{_libdir}/libqtmapi.so.0
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_libdir}/libqtmapi.so
409 %{_includedir}/libqtmapi
413 %defattr(644,root,root,755)
418 %files -n python-openchange
419 %defattr(644,root,root,755)
420 %dir %{py_sitedir}/openchange
421 %attr(755,root,root) %{py_sitedir}/openchange/mapi.so
422 %attr(755,root,root) %{py_sitedir}/openchange/mapistore.so
423 %if %{with mapiproxy}
424 %{py_sitedir}/openchange/*.py[co]
425 %{py_sitedir}/openchange/migration
426 %{py_sitedir}/openchange/tests
427 %{py_sitedir}/openchange/utils
428 %{py_sitedir}/openchange/web
432 %files -n nagios-plugin-openchange
433 %defattr(644,root,root,755)
434 # R: perl, openchangeclient
435 # FIXME: use /usr/lib/nagios/plugins dir and make package noarch
436 %attr(755,root,root) %{_libdir}/nagios/check_exchange
437 # default profile database - should be /etc/...
438 #%config(noreplace) %verify(not md5 mtime size) %{_libdir}/nagios/plugins/check_exchange.ldb