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 Source0: https://github.com/openchange/openchange/archive/%{name}-%{version}-%{cname}.tar.gz
19 # Source0-md5: 96c13c78c2bcbd7040f7848746284b9f
20 Patch0: disable-mapiproxy.patch
21 Patch1: %{name}-link.patch
23 Patch3: samba-4.2.patch
24 Patch4: fix-connection-args.patch
25 Patch5: samba-4.4.patch
26 Patch6: %{name}-covscan.patch
27 Patch7: %{name}-samba-4.10-macros.patch
28 Patch8: %{name}-libical.patch
29 Patch9: samba-4.11.patch
30 URL: https://github.com/openchange
31 BuildRequires: QtCore-devel >= 4.3.0
32 BuildRequires: QtGui-devel >= 4.3.0
33 BuildRequires: autoconf >= 2.57
34 BuildRequires: automake
35 BuildRequires: check-devel
36 BuildRequires: doxygen
37 BuildRequires: ldb-devel
38 BuildRequires: libical-devel >= 0.46
39 BuildRequires: libmagic-devel
40 BuildRequires: libmemcached-devel >= 1.0.18
41 BuildRequires: libpcap-devel
42 BuildRequires: libstdc++-devel
43 BuildRequires: mysql-devel
44 BuildRequires: nanomsg-devel >= 0.5
45 BuildRequires: perl-base
46 BuildRequires: pkgconfig >= 1:0.20
47 BuildRequires: popt-devel
49 BuildRequires: python-devel >= 1:2.7
50 BuildRequires: python-samba >= 4.2.2
52 BuildRequires: rpmbuild(macros) >= 1.219
53 # with DCERCP multiplex and pending call support (upstream 4.1.18+ or 4.2.2+)
54 # samba-4.10-macros patch requires samba-pidl 4.10+
55 BuildRequires: samba-devel >= 4.10
56 BuildRequires: samba-pidl >= 4.10
57 BuildRequires: sed >= 4.0
58 BuildRequires: subunit-devel
59 BuildRequires: talloc-devel
60 BuildRequires: tdb-devel
61 BuildRequires: zlib-devel
62 Requires: %{name}-libs = %{version}-%{release}
63 %{?with_python:Requires: python-openchange = %{version}-%{release}}
64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 OpenChange is a portable Open Source implementation of Microsoft
68 Exchange server and Exchange protocols. It provides a complete
69 solution to interoperate with Microsoft Outlook clients or Microsoft
72 OpenChange client-side library is used in existing messaging clients
73 and is the solution in new projects to communicate natively with
74 Microsoft Exchange and Exchange-compatible servers. OpenChange server
75 is a transparent Microsoft Exchange server replacement using native
76 Exchange protocols and does not require any plugin installation in
79 %description -l pl.UTF-8
80 OpenChange to przenośna, mająca otwarte źródła implementacja serwera
81 oraz protokołów Microsoft Exchange. Dostarcza kompletne rozwiązanie
82 pozwalające współpracować z klientami Microsoft Outlook oraz serwerami
85 Biblioteka kliencka OpenChange jest używana przez istniejących
86 klientów pocztowych i pozwalają na natywną komunikację z serwerami
87 Microsoft Exchange oraz zgodnymi. Serwer OpenChange to przezroczysty
88 zamiennik serwera Microsoft Exchange wykorzystujący natywne protokoły
89 Exchange, nie wymagający instalowania żadnych wtyczek w Outlooku.
92 Summary: OpenChange client libraries
93 Summary(pl.UTF-8): Biblioteki klienckie OpenChange
97 OpenChange client libraries.
99 %description libs -l pl.UTF-8
100 Biblioteki klienckie OpenChange.
103 Summary: Header files for OpenChange libraries
104 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek OpenChange
105 Group: Development/Libraries
106 Requires: %{name}-libs = %{version}-%{release}
108 Requires: samba-devel >= 4.2.2
109 Requires: talloc-devel
110 Requires: tevent-devel
114 Header files for OpenChange libraries.
116 %description devel -l pl.UTF-8
117 Pliki nagłówkowe bibliotek OpenChange.
120 Summary: C++ interface to OpenChange MAPI library
121 Summary(pl.UTF-8): Interfejs C++ do biblioteki OpenChange MAPI
123 Requires: %{name}-libs = %{version}-%{release}
126 C++ interface to OpenChange MAPI library.
128 %description c++ -l pl.UTF-8
129 Interfejs C++ do biblioteki OpenChange MAPI.
132 Summary: Header files of C++ interface to OpenChange MAPI library
133 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI
134 Group: Development/Libraries
135 Requires: %{name}-c++ = %{version}-%{release}
136 Requires: %{name}-devel = %{version}-%{release}
137 Requires: libstdc++-devel
139 %description c++-devel
140 Header files of C++ interface to OpenChange MAPI library.
142 %description c++-devel -l pl.UTF-8
143 Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI.
146 Summary: Qt interface to OpenChange MAPI library
147 Summary(pl.UTF-8): Interfejs Qt do biblioteki OpenChange MAPI
149 Requires: %{name}-c++ = %{version}-%{release}
150 Requires: QtCore >= 4.3.0
151 Requires: QtGui >= 4.3.0
154 Qt interface to OpenChange MAPI library.
156 %description qt -l pl.UTF-8
157 Interfejs Qt do biblioteki OpenChange MAPI.
160 Summary: Header files of Qt interface to OpenChange MAPI library
161 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI
162 Group: Development/Libraries
163 Requires: %{name}-qt = %{version}-%{release}
164 Requires: QtGui-devel >= 4.3.0
166 %description qt-devel
167 Header files of Qt interface to OpenChange MAPI library.
169 %description qt-devel -l pl.UTF-8
170 Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI.
173 Summary: API documentation for OpenChange libraries
174 Summary(pl.UTF-8): Dokumentacja API bibliotek OpenChange
176 %if "%{_rpmversion}" >= "5"
181 API documentation for OpenChange libraries.
183 %description apidocs -l pl.UTF-8
184 Dokumentacja API bibliotek OpenChange.
186 %package -n python-openchange
187 Summary: Python interface to OpenChange libraries
188 Summary(pl.UTF-8): Interfejs Pythona do bibliotek OpenChange
189 Group: Libraries/Python
190 Requires: %{name}-libs = %{version}-%{release}
192 %description -n python-openchange
193 Python interface to OpenChange libraries.
195 %description -n python-openchange -l pl.UTF-8
196 Interfejs Pythona do bibliotek OpenChange.
198 %package -n nagios-plugin-openchange
199 Summary: Nagios plugin to check Exchange/OpenChange services
200 Summary(pl.UTF-8): Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange
202 Requires: %{name} = %{version}-%{release}
205 %description -n nagios-plugin-openchange
206 Nagios plugin to check Exchange/OpenChange services.
208 %description -n nagios-plugin-openchange -l pl.UTF-8
209 Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange.
212 %setup -q -n %{name}-%{name}-%{version}-%{cname}
224 # no switch for verbose mode, enable manually :/
225 %{__sed} -i -e 's/^ @\(\$(\(PIDL\|CC\|CXX\|MOC\)\)/ \1/' Makefile
232 --datadir=%{_datadir}/openchange \
233 --enable-openchange-qt4 \
234 %{?with_python:--enable-pyopenchange} \
235 --with-modulesdir=%{_libdir}/openchange/modules
243 rm -rf $RPM_BUILD_ROOT
246 DESTDIR=$RPM_BUILD_ROOT
248 # doxygen generated man pages are messy; use HTML docs and install man1 pages manually
250 %{__make} installman \
251 DESTDIR=$RPM_BUILD_ROOT
253 install -d $RPM_BUILD_ROOT%{_mandir}/man1
254 cp doc/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1
257 # missing from make install
258 install -d $RPM_BUILD_ROOT%{_includedir}/libqtmapi
259 cp -p qt/lib/*.h $RPM_BUILD_ROOT%{_includedir}/libqtmapi
260 cp -a libqtmapi.so.*.* libqtmapi.so $RPM_BUILD_ROOT%{_libdir}
263 %{__rm} $RPM_BUILD_ROOT%{_bindir}/test_asyncnotif
264 %if %{without mapitest}
265 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mapitest.1
268 /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
270 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
271 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
275 rm -rf $RPM_BUILD_ROOT
277 %post libs -p /sbin/ldconfig
278 %postun libs -p /sbin/ldconfig
280 %post c++ -p /sbin/ldconfig
281 %postun c++ -p /sbin/ldconfig
283 %post qt -p /sbin/ldconfig
284 %postun qt -p /sbin/ldconfig
287 %defattr(644,root,root,755)
288 %doc CHANGES.md IDL_LICENSE.txt README.md README.smbconf.md doc/howto.txt
289 %attr(755,root,root) %{_bindir}/exchange2ical
290 %attr(755,root,root) %{_bindir}/exchange2mbox
291 %attr(755,root,root) %{_bindir}/mapiprofile
292 %attr(755,root,root) %{_bindir}/mapipropsdump
293 %attr(755,root,root) %{_bindir}/openchangeclient
294 %attr(755,root,root) %{_bindir}/openchangemapidump
295 %attr(755,root,root) %{_bindir}/openchangepfadmin
296 %attr(755,root,root) %{_bindir}/rpcextract
297 %attr(755,root,root) %{_bindir}/schemaIDGUID
298 %dir %{_datadir}/openchange
299 %dir %{_datadir}/openchange/setup
300 %{_datadir}/openchange/setup/profiles
301 %{_mandir}/man1/exchange2ical.1*
302 %{_mandir}/man1/exchange2mbox.1*
303 %{_mandir}/man1/mapiprofile.1*
304 %{_mandir}/man1/openchangeclient.1*
305 %{_mandir}/man1/openchangepfadmin.1*
306 %if %{with mapiproxy}
307 %attr(755,root,root) %{_bindir}/ocnotify
308 %attr(755,root,root) %{_sbindir}/openchange_group
309 %attr(755,root,root) %{_sbindir}/openchange_migrate
310 %attr(755,root,root) %{_sbindir}/openchange_neworganization
311 %attr(755,root,root) %{_sbindir}/openchange_newuser
312 %attr(755,root,root) %{_sbindir}/openchange_provision
313 # XXX: dir specified by dcerpc_server.pc file, should belong to samba or samba-libs
314 %dir %{_libdir}/samba/dcerpc_server
315 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_asyncemsmdb.so
316 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_mapiproxy.so
317 %dir %{_libdir}/openchange
318 %dir %{_libdir}/openchange/modules
319 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy
320 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_cache.so
321 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_downgrade.so
322 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_dummy.so
323 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_pack.so
324 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy_server
325 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_ds_rfr.so
326 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_emsmdb.so
327 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_nsp.so
328 %{_datadir}/openchange/setup/mapistore
329 %{_datadir}/openchange/setup/openchangedb
330 %dir %{_datadir}/samba/setup/AD
331 %{_datadir}/samba/setup/AD/oc_provision_*.ldif
332 %{_datadir}/samba/setup/AD/provision_schema_basedn_modify.ldif
333 %{_datadir}/samba/setup/AD/update_now.ldif
334 %{_datadir}/samba/setup/AD/prefixMap.txt
337 %attr(755,root,root) %{_bindir}/mapitest
338 %{_datadir}/openchange/mapitest
339 %{_mandir}/man1/mapitest.1*
343 %defattr(644,root,root,755)
344 %attr(755,root,root) %{_libdir}/libmapi.so.*.*
345 %attr(755,root,root) %ghost %{_libdir}/libmapi.so.0
346 %attr(755,root,root) %{_libdir}/libmapiadmin.so.*.*
347 %attr(755,root,root) %ghost %{_libdir}/libmapiadmin.so.0
348 %attr(755,root,root) %{_libdir}/libocpf.so.*.*
349 %attr(755,root,root) %ghost %{_libdir}/libocpf.so.0
350 %if %{with mapiproxy}
351 %attr(755,root,root) %{_libdir}/libmapiproxy.so.*.*
352 %attr(755,root,root) %ghost %{_libdir}/libmapiproxy.so.0
353 %attr(755,root,root) %{_libdir}/libmapiserver.so.*.*
354 %attr(755,root,root) %ghost %{_libdir}/libmapiserver.so.0
355 %attr(755,root,root) %{_libdir}/libmapistore.so.*.*
356 %attr(755,root,root) %ghost %{_libdir}/libmapistore.so.0
360 %defattr(644,root,root,755)
361 %attr(755,root,root) %{_libdir}/libmapi.so
362 %attr(755,root,root) %{_libdir}/libmapiadmin.so
363 %attr(755,root,root) %{_libdir}/libocpf.so
364 %{_includedir}/gen_ndr
365 %{_includedir}/libmapi
366 %{_includedir}/libmapiadmin
367 %{_includedir}/libocpf
368 %{_pkgconfigdir}/libmapi.pc
369 %{_pkgconfigdir}/libmapiadmin.pc
370 %{_pkgconfigdir}/libocpf.pc
371 %if %{with mapiproxy}
372 %attr(755,root,root) %{_libdir}/libmapiproxy.so
373 %attr(755,root,root) %{_libdir}/libmapiserver.so
374 %attr(755,root,root) %{_libdir}/libmapistore.so
375 %{_includedir}/mapistore
376 %{_includedir}/libmapiproxy.h
377 %{_includedir}/libmapiserver.h
378 %{_pkgconfigdir}/libmapiproxy.pc
379 %{_pkgconfigdir}/libmapiserver.pc
380 %{_pkgconfigdir}/libmapistore.pc
384 %defattr(644,root,root,755)
385 %attr(755,root,root) %{_libdir}/libmapipp.so.*.*
386 %attr(755,root,root) %ghost %{_libdir}/libmapipp.so.0
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_libdir}/libmapipp.so
391 %{_includedir}/libmapi++
392 %{_pkgconfigdir}/libmapi++.pc
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/libqtmapi.so.*.*
397 %attr(755,root,root) %ghost %{_libdir}/libqtmapi.so.0
400 %defattr(644,root,root,755)
401 %attr(755,root,root) %{_libdir}/libqtmapi.so
402 %{_includedir}/libqtmapi
406 %defattr(644,root,root,755)
411 %files -n python-openchange
412 %defattr(644,root,root,755)
413 %dir %{py_sitedir}/openchange
414 %attr(755,root,root) %{py_sitedir}/openchange/mapi.so
415 %attr(755,root,root) %{py_sitedir}/openchange/mapistore.so
416 %if %{with mapiproxy}
417 %{py_sitedir}/openchange/*.py[co]
418 %{py_sitedir}/openchange/migration
419 %{py_sitedir}/openchange/tests
420 %{py_sitedir}/openchange/utils
421 %{py_sitedir}/openchange/web
425 %files -n nagios-plugin-openchange
426 %defattr(644,root,root,755)
427 # R: perl, openchangeclient
428 # FIXME: use /usr/lib/nagios/plugins dir and make package noarch
429 %attr(755,root,root) %{_libdir}/nagios/check_exchange
430 # default profile database - should be /etc/...
431 #%config(noreplace) %verify(not md5 mtime size) %{_libdir}/nagios/plugins/check_exchange.ldb