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 URL: https://github.com/openchange
35 BuildRequires: QtCore-devel >= 4.3.0
36 BuildRequires: QtGui-devel >= 4.3.0
37 BuildRequires: autoconf >= 2.57
38 BuildRequires: automake
39 BuildRequires: check-devel
40 BuildRequires: doxygen
41 BuildRequires: ldb-devel
42 BuildRequires: libical-devel >= 0.46
43 BuildRequires: libmagic-devel
44 BuildRequires: libmemcached-devel >= 1.0.18
45 BuildRequires: libpcap-devel
46 BuildRequires: libstdc++-devel
47 BuildRequires: mysql-devel
48 BuildRequires: nanomsg-devel >= 1.0.0
49 BuildRequires: perl-base
50 BuildRequires: pkgconfig >= 1:0.20
51 BuildRequires: popt-devel
52 BuildRequires: python-devel >= 1:2.7
54 BuildRequires: python-samba >= 4.2.2
56 BuildRequires: qt4-build >= 4.3.0
57 BuildRequires: rpm-build >= 4.6
58 BuildRequires: rpmbuild(macros) >= 1.752
59 # with DCERCP multiplex and pending call support (upstream 4.1.18+ or 4.2.2+)
60 # samba-4.10-macros patch requires samba-pidl 4.10+
61 BuildRequires: samba-devel >= 4.10
62 BuildRequires: samba-pidl >= 4.10
63 BuildRequires: sed >= 4.0
64 BuildRequires: subunit-devel
65 BuildRequires: talloc-devel
66 BuildRequires: tdb-devel
67 BuildRequires: zlib-devel
68 Requires: %{name}-libs = %{version}-%{release}
69 %{?with_python:Requires: python-openchange = %{version}-%{release}}
70 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72 %define _noautoreq_perl utils
75 OpenChange is a portable Open Source implementation of Microsoft
76 Exchange server and Exchange protocols. It provides a complete
77 solution to interoperate with Microsoft Outlook clients or Microsoft
80 OpenChange client-side library is used in existing messaging clients
81 and is the solution in new projects to communicate natively with
82 Microsoft Exchange and Exchange-compatible servers. OpenChange server
83 is a transparent Microsoft Exchange server replacement using native
84 Exchange protocols and does not require any plugin installation in
87 %description -l pl.UTF-8
88 OpenChange to przenośna, mająca otwarte źródła implementacja serwera
89 oraz protokołów Microsoft Exchange. Dostarcza kompletne rozwiązanie
90 pozwalające współpracować z klientami Microsoft Outlook oraz serwerami
93 Biblioteka kliencka OpenChange jest używana przez istniejących
94 klientów pocztowych i pozwalają na natywną komunikację z serwerami
95 Microsoft Exchange oraz zgodnymi. Serwer OpenChange to przezroczysty
96 zamiennik serwera Microsoft Exchange wykorzystujący natywne protokoły
97 Exchange, nie wymagający instalowania żadnych wtyczek w Outlooku.
100 Summary: OpenChange client libraries
101 Summary(pl.UTF-8): Biblioteki klienckie OpenChange
105 OpenChange client libraries.
107 %description libs -l pl.UTF-8
108 Biblioteki klienckie OpenChange.
111 Summary: Header files for OpenChange libraries
112 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek OpenChange
113 Group: Development/Libraries
114 Requires: %{name}-libs = %{version}-%{release}
116 Requires: samba-devel >= 4.2.2
117 Requires: talloc-devel
118 Requires: tevent-devel
122 Header files for OpenChange libraries.
124 %description devel -l pl.UTF-8
125 Pliki nagłówkowe bibliotek OpenChange.
128 Summary: C++ interface to OpenChange MAPI library
129 Summary(pl.UTF-8): Interfejs C++ do biblioteki OpenChange MAPI
131 Requires: %{name}-libs = %{version}-%{release}
134 C++ interface to OpenChange MAPI library.
136 %description c++ -l pl.UTF-8
137 Interfejs C++ do biblioteki OpenChange MAPI.
140 Summary: Header files of C++ interface to OpenChange MAPI library
141 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI
142 Group: Development/Libraries
143 Requires: %{name}-c++ = %{version}-%{release}
144 Requires: %{name}-devel = %{version}-%{release}
145 Requires: libstdc++-devel
147 %description c++-devel
148 Header files of C++ interface to OpenChange MAPI library.
150 %description c++-devel -l pl.UTF-8
151 Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI.
154 Summary: Qt interface to OpenChange MAPI library
155 Summary(pl.UTF-8): Interfejs Qt do biblioteki OpenChange MAPI
157 Requires: %{name}-c++ = %{version}-%{release}
158 Requires: QtCore >= 4.3.0
159 Requires: QtGui >= 4.3.0
162 Qt interface to OpenChange MAPI library.
164 %description qt -l pl.UTF-8
165 Interfejs Qt do biblioteki OpenChange MAPI.
168 Summary: Header files of Qt interface to OpenChange MAPI library
169 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI
170 Group: Development/Libraries
171 Requires: %{name}-qt = %{version}-%{release}
172 Requires: QtGui-devel >= 4.3.0
174 %description qt-devel
175 Header files of Qt interface to OpenChange MAPI library.
177 %description qt-devel -l pl.UTF-8
178 Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI.
181 Summary: API documentation for OpenChange libraries
182 Summary(pl.UTF-8): Dokumentacja API bibliotek OpenChange
187 API documentation for OpenChange libraries.
189 %description apidocs -l pl.UTF-8
190 Dokumentacja API bibliotek OpenChange.
192 %package -n python-openchange
193 Summary: Python interface to OpenChange libraries
194 Summary(pl.UTF-8): Interfejs Pythona do bibliotek OpenChange
195 Group: Libraries/Python
196 Requires: %{name}-libs = %{version}-%{release}
198 %description -n python-openchange
199 Python interface to OpenChange libraries.
201 %description -n python-openchange -l pl.UTF-8
202 Interfejs Pythona do bibliotek OpenChange.
204 %package -n nagios-plugin-openchange
205 Summary: Nagios plugin to check Exchange/OpenChange services
206 Summary(pl.UTF-8): Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange
208 Requires: %{name} = %{version}-%{release}
211 %description -n nagios-plugin-openchange
212 Nagios plugin to check Exchange/OpenChange services.
214 %description -n nagios-plugin-openchange -l pl.UTF-8
215 Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange.
218 %setup -q -n %{name}-%{name}-%{version}-%{cname}
233 # no switch for verbose mode, enable manually :/
234 %{__sed} -i -e 's/^ @\(\$(\(PIDL\|CC\|CXX\|MOC\)\)/ \1/' Makefile
240 # instead of calling automake (there is no Makefile.am)
241 cp -f /usr/share/automake/{compile,missing} .
243 --datadir=%{_datadir}/openchange \
244 --enable-openchange-qt4 \
245 %{?with_python:--enable-pyopenchange} \
246 --with-modulesdir=%{_libdir}/openchange/modules
254 rm -rf $RPM_BUILD_ROOT
257 DESTDIR=$RPM_BUILD_ROOT
259 # doxygen generated man pages are messy; use HTML docs and install man1 pages manually
261 %{__make} installman \
262 DESTDIR=$RPM_BUILD_ROOT
264 install -d $RPM_BUILD_ROOT%{_mandir}/man1
265 cp doc/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1
268 # missing from make install
269 install -d $RPM_BUILD_ROOT%{_includedir}/libqtmapi
270 cp -p qt/lib/*.h $RPM_BUILD_ROOT%{_includedir}/libqtmapi
271 cp -a libqtmapi.so.*.* libqtmapi.so $RPM_BUILD_ROOT%{_libdir}
274 %{__rm} $RPM_BUILD_ROOT%{_bindir}/test_asyncnotif
275 %if %{without mapitest}
276 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mapitest.1
279 /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
281 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
282 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
286 rm -rf $RPM_BUILD_ROOT
288 %post libs -p /sbin/ldconfig
289 %postun libs -p /sbin/ldconfig
291 %post c++ -p /sbin/ldconfig
292 %postun c++ -p /sbin/ldconfig
294 %post qt -p /sbin/ldconfig
295 %postun qt -p /sbin/ldconfig
298 %defattr(644,root,root,755)
299 %doc CHANGES.md IDL_LICENSE.txt README.md README.smbconf.md doc/howto.txt
300 %attr(755,root,root) %{_bindir}/exchange2ical
301 %attr(755,root,root) %{_bindir}/exchange2mbox
302 %attr(755,root,root) %{_bindir}/mapiprofile
303 %attr(755,root,root) %{_bindir}/mapipropsdump
304 %attr(755,root,root) %{_bindir}/openchangeclient
305 %attr(755,root,root) %{_bindir}/openchangemapidump
306 %attr(755,root,root) %{_bindir}/openchangepfadmin
307 %attr(755,root,root) %{_bindir}/rpcextract
308 %attr(755,root,root) %{_bindir}/schemaIDGUID
309 %dir %{_datadir}/openchange
310 %dir %{_datadir}/openchange/setup
311 %{_datadir}/openchange/setup/profiles
312 %{_mandir}/man1/exchange2ical.1*
313 %{_mandir}/man1/exchange2mbox.1*
314 %{_mandir}/man1/mapiprofile.1*
315 %{_mandir}/man1/openchangeclient.1*
316 %{_mandir}/man1/openchangepfadmin.1*
317 %if %{with mapiproxy}
318 %attr(755,root,root) %{_bindir}/ocnotify
319 %attr(755,root,root) %{_sbindir}/openchange_group
320 %attr(755,root,root) %{_sbindir}/openchange_migrate
321 %attr(755,root,root) %{_sbindir}/openchange_neworganization
322 %attr(755,root,root) %{_sbindir}/openchange_newuser
323 %attr(755,root,root) %{_sbindir}/openchange_provision
324 # XXX: dir specified by dcerpc_server.pc file, should belong to samba or samba-libs
325 %dir %{_libdir}/samba/dcerpc_server
326 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_asyncemsmdb.so
327 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_mapiproxy.so
328 %dir %{_libdir}/openchange
329 %dir %{_libdir}/openchange/modules
330 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy
331 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_cache.so
332 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_downgrade.so
333 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_dummy.so
334 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_pack.so
335 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy_server
336 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_ds_rfr.so
337 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_emsmdb.so
338 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_nsp.so
339 %{_datadir}/openchange/setup/mapistore
340 %{_datadir}/openchange/setup/openchangedb
341 %dir %{_datadir}/samba/setup/AD
342 %{_datadir}/samba/setup/AD/oc_provision_*.ldif
343 %{_datadir}/samba/setup/AD/provision_schema_basedn_modify.ldif
344 %{_datadir}/samba/setup/AD/update_now.ldif
345 %{_datadir}/samba/setup/AD/prefixMap.txt
348 %attr(755,root,root) %{_bindir}/mapitest
349 %{_datadir}/openchange/mapitest
350 %{_mandir}/man1/mapitest.1*
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_libdir}/libmapi.so.*.*
356 %attr(755,root,root) %ghost %{_libdir}/libmapi.so.0
357 %attr(755,root,root) %{_libdir}/libmapiadmin.so.*.*
358 %attr(755,root,root) %ghost %{_libdir}/libmapiadmin.so.0
359 %attr(755,root,root) %{_libdir}/libocpf.so.*.*
360 %attr(755,root,root) %ghost %{_libdir}/libocpf.so.0
361 %if %{with mapiproxy}
362 %attr(755,root,root) %{_libdir}/libmapiproxy.so.*.*
363 %attr(755,root,root) %ghost %{_libdir}/libmapiproxy.so.0
364 %attr(755,root,root) %{_libdir}/libmapiserver.so.*.*
365 %attr(755,root,root) %ghost %{_libdir}/libmapiserver.so.0
366 %attr(755,root,root) %{_libdir}/libmapistore.so.*.*
367 %attr(755,root,root) %ghost %{_libdir}/libmapistore.so.0
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_libdir}/libmapi.so
373 %attr(755,root,root) %{_libdir}/libmapiadmin.so
374 %attr(755,root,root) %{_libdir}/libocpf.so
375 %{_includedir}/gen_ndr
376 %{_includedir}/libmapi
377 %{_includedir}/libmapiadmin
378 %{_includedir}/libocpf
379 %{_pkgconfigdir}/libmapi.pc
380 %{_pkgconfigdir}/libmapiadmin.pc
381 %{_pkgconfigdir}/libocpf.pc
382 %if %{with mapiproxy}
383 %attr(755,root,root) %{_libdir}/libmapiproxy.so
384 %attr(755,root,root) %{_libdir}/libmapiserver.so
385 %attr(755,root,root) %{_libdir}/libmapistore.so
386 %{_includedir}/mapistore
387 %{_includedir}/libmapiproxy.h
388 %{_includedir}/libmapiserver.h
389 %{_pkgconfigdir}/libmapiproxy.pc
390 %{_pkgconfigdir}/libmapiserver.pc
391 %{_pkgconfigdir}/libmapistore.pc
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/libmapipp.so.*.*
397 %attr(755,root,root) %ghost %{_libdir}/libmapipp.so.0
400 %defattr(644,root,root,755)
401 %attr(755,root,root) %{_libdir}/libmapipp.so
402 %{_includedir}/libmapi++
403 %{_pkgconfigdir}/libmapi++.pc
406 %defattr(644,root,root,755)
407 %attr(755,root,root) %{_libdir}/libqtmapi.so.*.*
408 %attr(755,root,root) %ghost %{_libdir}/libqtmapi.so.0
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_libdir}/libqtmapi.so
413 %{_includedir}/libqtmapi
417 %defattr(644,root,root,755)
422 %files -n python-openchange
423 %defattr(644,root,root,755)
424 %dir %{py_sitedir}/openchange
425 %attr(755,root,root) %{py_sitedir}/openchange/mapi.so
426 %attr(755,root,root) %{py_sitedir}/openchange/mapistore.so
427 %if %{with mapiproxy}
428 %{py_sitedir}/openchange/*.py[co]
429 %{py_sitedir}/openchange/migration
430 %{py_sitedir}/openchange/tests
431 %{py_sitedir}/openchange/utils
432 %{py_sitedir}/openchange/web
436 %files -n nagios-plugin-openchange
437 %defattr(644,root,root,755)
438 # R: perl, openchangeclient
439 # FIXME: use /usr/lib/nagios/plugins dir and make package noarch
440 %attr(755,root,root) %{_libdir}/nagios/check_exchange
441 # default profile database - should be /etc/...
442 #%config(noreplace) %verify(not md5 mtime size) %{_libdir}/nagios/plugins/check_exchange.ldb