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 URL: https://github.com/openchange
32 BuildRequires: QtCore-devel >= 4.3.0
33 BuildRequires: QtGui-devel >= 4.3.0
34 BuildRequires: autoconf >= 2.57
35 BuildRequires: automake
36 BuildRequires: check-devel
37 BuildRequires: doxygen
38 BuildRequires: ldb-devel
39 BuildRequires: libical-devel >= 0.46
40 BuildRequires: libmagic-devel
41 BuildRequires: libmemcached-devel >= 1.0.18
42 BuildRequires: libpcap-devel
43 BuildRequires: libstdc++-devel
44 BuildRequires: mysql-devel
45 BuildRequires: nanomsg-devel >= 0.5
46 BuildRequires: perl-base
47 BuildRequires: pkgconfig >= 1:0.20
48 BuildRequires: popt-devel
50 BuildRequires: python-devel >= 1:2.7
51 BuildRequires: python-samba >= 4.2.2
53 BuildRequires: rpmbuild(macros) >= 1.219
54 # with DCERCP multiplex and pending call support (upstream 4.1.18+ or 4.2.2+)
55 # samba-4.10-macros patch requires samba-pidl 4.10+
56 BuildRequires: samba-devel >= 4.10
57 BuildRequires: samba-pidl >= 4.10
58 BuildRequires: sed >= 4.0
59 BuildRequires: subunit-devel
60 BuildRequires: talloc-devel
61 BuildRequires: tdb-devel
62 BuildRequires: zlib-devel
63 Requires: %{name}-libs = %{version}-%{release}
64 %{?with_python:Requires: python-openchange = %{version}-%{release}}
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 OpenChange is a portable Open Source implementation of Microsoft
69 Exchange server and Exchange protocols. It provides a complete
70 solution to interoperate with Microsoft Outlook clients or Microsoft
73 OpenChange client-side library is used in existing messaging clients
74 and is the solution in new projects to communicate natively with
75 Microsoft Exchange and Exchange-compatible servers. OpenChange server
76 is a transparent Microsoft Exchange server replacement using native
77 Exchange protocols and does not require any plugin installation in
80 %description -l pl.UTF-8
81 OpenChange to przenośna, mająca otwarte źródła implementacja serwera
82 oraz protokołów Microsoft Exchange. Dostarcza kompletne rozwiązanie
83 pozwalające współpracować z klientami Microsoft Outlook oraz serwerami
86 Biblioteka kliencka OpenChange jest używana przez istniejących
87 klientów pocztowych i pozwalają na natywną komunikację z serwerami
88 Microsoft Exchange oraz zgodnymi. Serwer OpenChange to przezroczysty
89 zamiennik serwera Microsoft Exchange wykorzystujący natywne protokoły
90 Exchange, nie wymagający instalowania żadnych wtyczek w Outlooku.
93 Summary: OpenChange client libraries
94 Summary(pl.UTF-8): Biblioteki klienckie OpenChange
98 OpenChange client libraries.
100 %description libs -l pl.UTF-8
101 Biblioteki klienckie OpenChange.
104 Summary: Header files for OpenChange libraries
105 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek OpenChange
106 Group: Development/Libraries
107 Requires: %{name}-libs = %{version}-%{release}
109 Requires: samba-devel >= 4.2.2
110 Requires: talloc-devel
111 Requires: tevent-devel
115 Header files for OpenChange libraries.
117 %description devel -l pl.UTF-8
118 Pliki nagłówkowe bibliotek OpenChange.
121 Summary: C++ interface to OpenChange MAPI library
122 Summary(pl.UTF-8): Interfejs C++ do biblioteki OpenChange MAPI
124 Requires: %{name}-libs = %{version}-%{release}
127 C++ interface to OpenChange MAPI library.
129 %description c++ -l pl.UTF-8
130 Interfejs C++ do biblioteki OpenChange MAPI.
133 Summary: Header files of C++ interface to OpenChange MAPI library
134 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI
135 Group: Development/Libraries
136 Requires: %{name}-c++ = %{version}-%{release}
137 Requires: %{name}-devel = %{version}-%{release}
138 Requires: libstdc++-devel
140 %description c++-devel
141 Header files of C++ interface to OpenChange MAPI library.
143 %description c++-devel -l pl.UTF-8
144 Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI.
147 Summary: Qt interface to OpenChange MAPI library
148 Summary(pl.UTF-8): Interfejs Qt do biblioteki OpenChange MAPI
150 Requires: %{name}-c++ = %{version}-%{release}
151 Requires: QtCore >= 4.3.0
152 Requires: QtGui >= 4.3.0
155 Qt interface to OpenChange MAPI library.
157 %description qt -l pl.UTF-8
158 Interfejs Qt do biblioteki OpenChange MAPI.
161 Summary: Header files of Qt interface to OpenChange MAPI library
162 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI
163 Group: Development/Libraries
164 Requires: %{name}-qt = %{version}-%{release}
165 Requires: QtGui-devel >= 4.3.0
167 %description qt-devel
168 Header files of Qt interface to OpenChange MAPI library.
170 %description qt-devel -l pl.UTF-8
171 Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI.
174 Summary: API documentation for OpenChange libraries
175 Summary(pl.UTF-8): Dokumentacja API bibliotek OpenChange
177 %if "%{_rpmversion}" >= "5"
182 API documentation for OpenChange libraries.
184 %description apidocs -l pl.UTF-8
185 Dokumentacja API bibliotek OpenChange.
187 %package -n python-openchange
188 Summary: Python interface to OpenChange libraries
189 Summary(pl.UTF-8): Interfejs Pythona do bibliotek OpenChange
190 Group: Libraries/Python
191 Requires: %{name}-libs = %{version}-%{release}
193 %description -n python-openchange
194 Python interface to OpenChange libraries.
196 %description -n python-openchange -l pl.UTF-8
197 Interfejs Pythona do bibliotek OpenChange.
199 %package -n nagios-plugin-openchange
200 Summary: Nagios plugin to check Exchange/OpenChange services
201 Summary(pl.UTF-8): Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange
203 Requires: %{name} = %{version}-%{release}
206 %description -n nagios-plugin-openchange
207 Nagios plugin to check Exchange/OpenChange services.
209 %description -n nagios-plugin-openchange -l pl.UTF-8
210 Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange.
213 %setup -q -n %{name}-%{name}-%{version}-%{cname}
225 # no switch for verbose mode, enable manually :/
226 %{__sed} -i -e 's/^ @\(\$(\(PIDL\|CC\|CXX\|MOC\)\)/ \1/' Makefile
233 --datadir=%{_datadir}/openchange \
234 --enable-openchange-qt4 \
235 %{?with_python:--enable-pyopenchange} \
236 --with-modulesdir=%{_libdir}/openchange/modules
244 rm -rf $RPM_BUILD_ROOT
247 DESTDIR=$RPM_BUILD_ROOT
249 # doxygen generated man pages are messy; use HTML docs and install man1 pages manually
251 %{__make} installman \
252 DESTDIR=$RPM_BUILD_ROOT
254 install -d $RPM_BUILD_ROOT%{_mandir}/man1
255 cp doc/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1
258 # missing from make install
259 install -d $RPM_BUILD_ROOT%{_includedir}/libqtmapi
260 cp -p qt/lib/*.h $RPM_BUILD_ROOT%{_includedir}/libqtmapi
261 cp -a libqtmapi.so.*.* libqtmapi.so $RPM_BUILD_ROOT%{_libdir}
264 %{__rm} $RPM_BUILD_ROOT%{_bindir}/test_asyncnotif
265 %if %{without mapitest}
266 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mapitest.1
269 /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
271 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
272 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
276 rm -rf $RPM_BUILD_ROOT
278 %post libs -p /sbin/ldconfig
279 %postun libs -p /sbin/ldconfig
281 %post c++ -p /sbin/ldconfig
282 %postun c++ -p /sbin/ldconfig
284 %post qt -p /sbin/ldconfig
285 %postun qt -p /sbin/ldconfig
288 %defattr(644,root,root,755)
289 %doc CHANGES.md IDL_LICENSE.txt README.md README.smbconf.md doc/howto.txt
290 %attr(755,root,root) %{_bindir}/exchange2ical
291 %attr(755,root,root) %{_bindir}/exchange2mbox
292 %attr(755,root,root) %{_bindir}/mapiprofile
293 %attr(755,root,root) %{_bindir}/mapipropsdump
294 %attr(755,root,root) %{_bindir}/openchangeclient
295 %attr(755,root,root) %{_bindir}/openchangemapidump
296 %attr(755,root,root) %{_bindir}/openchangepfadmin
297 %attr(755,root,root) %{_bindir}/rpcextract
298 %attr(755,root,root) %{_bindir}/schemaIDGUID
299 %dir %{_datadir}/openchange
300 %dir %{_datadir}/openchange/setup
301 %{_datadir}/openchange/setup/profiles
302 %{_mandir}/man1/exchange2ical.1*
303 %{_mandir}/man1/exchange2mbox.1*
304 %{_mandir}/man1/mapiprofile.1*
305 %{_mandir}/man1/openchangeclient.1*
306 %{_mandir}/man1/openchangepfadmin.1*
307 %if %{with mapiproxy}
308 %attr(755,root,root) %{_bindir}/ocnotify
309 %attr(755,root,root) %{_sbindir}/openchange_group
310 %attr(755,root,root) %{_sbindir}/openchange_migrate
311 %attr(755,root,root) %{_sbindir}/openchange_neworganization
312 %attr(755,root,root) %{_sbindir}/openchange_newuser
313 %attr(755,root,root) %{_sbindir}/openchange_provision
314 # XXX: dir specified by dcerpc_server.pc file, should belong to samba or samba-libs
315 %dir %{_libdir}/samba/dcerpc_server
316 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_asyncemsmdb.so
317 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_mapiproxy.so
318 %dir %{_libdir}/openchange
319 %dir %{_libdir}/openchange/modules
320 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy
321 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_cache.so
322 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_downgrade.so
323 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_dummy.so
324 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_pack.so
325 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy_server
326 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_ds_rfr.so
327 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_emsmdb.so
328 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_nsp.so
329 %{_datadir}/openchange/setup/mapistore
330 %{_datadir}/openchange/setup/openchangedb
331 %dir %{_datadir}/samba/setup/AD
332 %{_datadir}/samba/setup/AD/oc_provision_*.ldif
333 %{_datadir}/samba/setup/AD/provision_schema_basedn_modify.ldif
334 %{_datadir}/samba/setup/AD/update_now.ldif
335 %{_datadir}/samba/setup/AD/prefixMap.txt
338 %attr(755,root,root) %{_bindir}/mapitest
339 %{_datadir}/openchange/mapitest
340 %{_mandir}/man1/mapitest.1*
344 %defattr(644,root,root,755)
345 %attr(755,root,root) %{_libdir}/libmapi.so.*.*
346 %attr(755,root,root) %ghost %{_libdir}/libmapi.so.0
347 %attr(755,root,root) %{_libdir}/libmapiadmin.so.*.*
348 %attr(755,root,root) %ghost %{_libdir}/libmapiadmin.so.0
349 %attr(755,root,root) %{_libdir}/libocpf.so.*.*
350 %attr(755,root,root) %ghost %{_libdir}/libocpf.so.0
351 %if %{with mapiproxy}
352 %attr(755,root,root) %{_libdir}/libmapiproxy.so.*.*
353 %attr(755,root,root) %ghost %{_libdir}/libmapiproxy.so.0
354 %attr(755,root,root) %{_libdir}/libmapiserver.so.*.*
355 %attr(755,root,root) %ghost %{_libdir}/libmapiserver.so.0
356 %attr(755,root,root) %{_libdir}/libmapistore.so.*.*
357 %attr(755,root,root) %ghost %{_libdir}/libmapistore.so.0
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_libdir}/libmapi.so
363 %attr(755,root,root) %{_libdir}/libmapiadmin.so
364 %attr(755,root,root) %{_libdir}/libocpf.so
365 %{_includedir}/gen_ndr
366 %{_includedir}/libmapi
367 %{_includedir}/libmapiadmin
368 %{_includedir}/libocpf
369 %{_pkgconfigdir}/libmapi.pc
370 %{_pkgconfigdir}/libmapiadmin.pc
371 %{_pkgconfigdir}/libocpf.pc
372 %if %{with mapiproxy}
373 %attr(755,root,root) %{_libdir}/libmapiproxy.so
374 %attr(755,root,root) %{_libdir}/libmapiserver.so
375 %attr(755,root,root) %{_libdir}/libmapistore.so
376 %{_includedir}/mapistore
377 %{_includedir}/libmapiproxy.h
378 %{_includedir}/libmapiserver.h
379 %{_pkgconfigdir}/libmapiproxy.pc
380 %{_pkgconfigdir}/libmapiserver.pc
381 %{_pkgconfigdir}/libmapistore.pc
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_libdir}/libmapipp.so.*.*
387 %attr(755,root,root) %ghost %{_libdir}/libmapipp.so.0
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_libdir}/libmapipp.so
392 %{_includedir}/libmapi++
393 %{_pkgconfigdir}/libmapi++.pc
396 %defattr(644,root,root,755)
397 %attr(755,root,root) %{_libdir}/libqtmapi.so.*.*
398 %attr(755,root,root) %ghost %{_libdir}/libqtmapi.so.0
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_libdir}/libqtmapi.so
403 %{_includedir}/libqtmapi
407 %defattr(644,root,root,755)
412 %files -n python-openchange
413 %defattr(644,root,root,755)
414 %dir %{py_sitedir}/openchange
415 %attr(755,root,root) %{py_sitedir}/openchange/mapi.so
416 %attr(755,root,root) %{py_sitedir}/openchange/mapistore.so
417 %if %{with mapiproxy}
418 %{py_sitedir}/openchange/*.py[co]
419 %{py_sitedir}/openchange/migration
420 %{py_sitedir}/openchange/tests
421 %{py_sitedir}/openchange/utils
422 %{py_sitedir}/openchange/web
426 %files -n nagios-plugin-openchange
427 %defattr(644,root,root,755)
428 # R: perl, openchangeclient
429 # FIXME: use /usr/lib/nagios/plugins dir and make package noarch
430 %attr(755,root,root) %{_libdir}/nagios/check_exchange
431 # default profile database - should be /etc/...
432 #%config(noreplace) %verify(not md5 mtime size) %{_libdir}/nagios/plugins/check_exchange.ldb