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 URL: https://github.com/openchange
30 BuildRequires: QtCore-devel >= 4.3.0
31 BuildRequires: QtGui-devel >= 4.3.0
32 BuildRequires: autoconf >= 2.57
33 BuildRequires: automake
34 BuildRequires: check-devel
35 BuildRequires: doxygen
36 BuildRequires: ldb-devel
37 BuildRequires: libical-devel >= 0.46
38 BuildRequires: libmagic-devel
39 BuildRequires: libmemcached-devel >= 1.0.18
40 BuildRequires: libpcap-devel
41 BuildRequires: libstdc++-devel
42 BuildRequires: mysql-devel
43 BuildRequires: nanomsg-devel >= 0.5
44 BuildRequires: perl-base
45 BuildRequires: pkgconfig >= 1:0.20
46 BuildRequires: popt-devel
48 BuildRequires: python-devel >= 1:2.7
49 BuildRequires: python-samba >= 4.2.2
51 BuildRequires: rpmbuild(macros) >= 1.219
52 # with DCERCP multiplex and pending call support (upstream 4.1.18+ or 4.2.2+)
53 # samba-4.10-macros patch requires samba-pidl 4.10+
54 BuildRequires: samba-devel >= 4.10
55 BuildRequires: samba-pidl >= 4.10
56 BuildRequires: sed >= 4.0
57 BuildRequires: subunit-devel
58 BuildRequires: talloc-devel
59 BuildRequires: tdb-devel
60 BuildRequires: zlib-devel
61 Requires: %{name}-libs = %{version}-%{release}
62 %{?with_python:Requires: python-openchange = %{version}-%{release}}
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66 OpenChange is a portable Open Source implementation of Microsoft
67 Exchange server and Exchange protocols. It provides a complete
68 solution to interoperate with Microsoft Outlook clients or Microsoft
71 OpenChange client-side library is used in existing messaging clients
72 and is the solution in new projects to communicate natively with
73 Microsoft Exchange and Exchange-compatible servers. OpenChange server
74 is a transparent Microsoft Exchange server replacement using native
75 Exchange protocols and does not require any plugin installation in
78 %description -l pl.UTF-8
79 OpenChange to przenośna, mająca otwarte źródła implementacja serwera
80 oraz protokołów Microsoft Exchange. Dostarcza kompletne rozwiązanie
81 pozwalające współpracować z klientami Microsoft Outlook oraz serwerami
84 Biblioteka kliencka OpenChange jest używana przez istniejących
85 klientów pocztowych i pozwalają na natywną komunikację z serwerami
86 Microsoft Exchange oraz zgodnymi. Serwer OpenChange to przezroczysty
87 zamiennik serwera Microsoft Exchange wykorzystujący natywne protokoły
88 Exchange, nie wymagający instalowania żadnych wtyczek w Outlooku.
91 Summary: OpenChange client libraries
92 Summary(pl.UTF-8): Biblioteki klienckie OpenChange
96 OpenChange client libraries.
98 %description libs -l pl.UTF-8
99 Biblioteki klienckie OpenChange.
102 Summary: Header files for OpenChange libraries
103 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek OpenChange
104 Group: Development/Libraries
105 Requires: %{name}-libs = %{version}-%{release}
107 Requires: samba-devel >= 4.2.2
108 Requires: talloc-devel
109 Requires: tevent-devel
113 Header files for OpenChange libraries.
115 %description devel -l pl.UTF-8
116 Pliki nagłówkowe bibliotek OpenChange.
119 Summary: C++ interface to OpenChange MAPI library
120 Summary(pl.UTF-8): Interfejs C++ do biblioteki OpenChange MAPI
122 Requires: %{name}-libs = %{version}-%{release}
125 C++ interface to OpenChange MAPI library.
127 %description c++ -l pl.UTF-8
128 Interfejs C++ do biblioteki OpenChange MAPI.
131 Summary: Header files of C++ interface to OpenChange MAPI library
132 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI
133 Group: Development/Libraries
134 Requires: %{name}-c++ = %{version}-%{release}
135 Requires: %{name}-devel = %{version}-%{release}
136 Requires: libstdc++-devel
138 %description c++-devel
139 Header files of C++ interface to OpenChange MAPI library.
141 %description c++-devel -l pl.UTF-8
142 Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI.
145 Summary: Qt interface to OpenChange MAPI library
146 Summary(pl.UTF-8): Interfejs Qt do biblioteki OpenChange MAPI
148 Requires: %{name}-c++ = %{version}-%{release}
149 Requires: QtCore >= 4.3.0
150 Requires: QtGui >= 4.3.0
153 Qt interface to OpenChange MAPI library.
155 %description qt -l pl.UTF-8
156 Interfejs Qt do biblioteki OpenChange MAPI.
159 Summary: Header files of Qt interface to OpenChange MAPI library
160 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI
161 Group: Development/Libraries
162 Requires: %{name}-qt = %{version}-%{release}
163 Requires: QtGui-devel >= 4.3.0
165 %description qt-devel
166 Header files of Qt interface to OpenChange MAPI library.
168 %description qt-devel -l pl.UTF-8
169 Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI.
172 Summary: API documentation for OpenChange libraries
173 Summary(pl.UTF-8): Dokumentacja API bibliotek OpenChange
175 %if "%{_rpmversion}" >= "5"
180 API documentation for OpenChange libraries.
182 %description apidocs -l pl.UTF-8
183 Dokumentacja API bibliotek OpenChange.
185 %package -n python-openchange
186 Summary: Python interface to OpenChange libraries
187 Summary(pl.UTF-8): Interfejs Pythona do bibliotek OpenChange
188 Group: Libraries/Python
189 Requires: %{name}-libs = %{version}-%{release}
191 %description -n python-openchange
192 Python interface to OpenChange libraries.
194 %description -n python-openchange -l pl.UTF-8
195 Interfejs Pythona do bibliotek OpenChange.
197 %package -n nagios-plugin-openchange
198 Summary: Nagios plugin to check Exchange/OpenChange services
199 Summary(pl.UTF-8): Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange
201 Requires: %{name} = %{version}-%{release}
204 %description -n nagios-plugin-openchange
205 Nagios plugin to check Exchange/OpenChange services.
207 %description -n nagios-plugin-openchange -l pl.UTF-8
208 Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange.
211 %setup -q -n %{name}-%{name}-%{version}-%{cname}
222 # no switch for verbose mode, enable manually :/
223 %{__sed} -i -e 's/^ @\(\$(\(PIDL\|CC\|CXX\|MOC\)\)/ \1/' Makefile
230 --datadir=%{_datadir}/openchange \
231 --enable-openchange-qt4 \
232 %{?with_python:--enable-pyopenchange} \
233 --with-modulesdir=%{_libdir}/openchange/modules
241 rm -rf $RPM_BUILD_ROOT
244 DESTDIR=$RPM_BUILD_ROOT
246 # doxygen generated man pages are messy; use HTML docs and install man1 pages manually
248 %{__make} installman \
249 DESTDIR=$RPM_BUILD_ROOT
251 install -d $RPM_BUILD_ROOT%{_mandir}/man1
252 cp doc/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1
255 # missing from make install
256 install -d $RPM_BUILD_ROOT%{_includedir}/libqtmapi
257 cp -p qt/lib/*.h $RPM_BUILD_ROOT%{_includedir}/libqtmapi
258 cp -a libqtmapi.so.*.* libqtmapi.so $RPM_BUILD_ROOT%{_libdir}
261 %{__rm} $RPM_BUILD_ROOT%{_bindir}/test_asyncnotif
262 %if %{without mapitest}
263 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mapitest.1
266 /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
268 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
269 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
273 rm -rf $RPM_BUILD_ROOT
275 %post libs -p /sbin/ldconfig
276 %postun libs -p /sbin/ldconfig
278 %post c++ -p /sbin/ldconfig
279 %postun c++ -p /sbin/ldconfig
281 %post qt -p /sbin/ldconfig
282 %postun qt -p /sbin/ldconfig
285 %defattr(644,root,root,755)
286 %doc CHANGES.md IDL_LICENSE.txt README.md README.smbconf.md doc/howto.txt
287 %attr(755,root,root) %{_bindir}/exchange2ical
288 %attr(755,root,root) %{_bindir}/exchange2mbox
289 %attr(755,root,root) %{_bindir}/mapiprofile
290 %attr(755,root,root) %{_bindir}/mapipropsdump
291 %attr(755,root,root) %{_bindir}/openchangeclient
292 %attr(755,root,root) %{_bindir}/openchangemapidump
293 %attr(755,root,root) %{_bindir}/openchangepfadmin
294 %attr(755,root,root) %{_bindir}/rpcextract
295 %attr(755,root,root) %{_bindir}/schemaIDGUID
296 %dir %{_datadir}/openchange
297 %dir %{_datadir}/openchange/setup
298 %{_datadir}/openchange/setup/profiles
299 %{_mandir}/man1/exchange2ical.1*
300 %{_mandir}/man1/exchange2mbox.1*
301 %{_mandir}/man1/mapiprofile.1*
302 %{_mandir}/man1/openchangeclient.1*
303 %{_mandir}/man1/openchangepfadmin.1*
304 %if %{with mapiproxy}
305 %attr(755,root,root) %{_bindir}/ocnotify
306 %attr(755,root,root) %{_sbindir}/openchange_group
307 %attr(755,root,root) %{_sbindir}/openchange_migrate
308 %attr(755,root,root) %{_sbindir}/openchange_neworganization
309 %attr(755,root,root) %{_sbindir}/openchange_newuser
310 %attr(755,root,root) %{_sbindir}/openchange_provision
311 # XXX: dir specified by dcerpc_server.pc file, should belong to samba or samba-libs
312 %dir %{_libdir}/samba/dcerpc_server
313 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_asyncemsmdb.so
314 %attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_mapiproxy.so
315 %dir %{_libdir}/openchange
316 %dir %{_libdir}/openchange/modules
317 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy
318 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_cache.so
319 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_downgrade.so
320 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_dummy.so
321 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_pack.so
322 %dir %{_libdir}/openchange/modules/dcerpc_mapiproxy_server
323 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_ds_rfr.so
324 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_emsmdb.so
325 %attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_nsp.so
326 %{_datadir}/openchange/setup/mapistore
327 %{_datadir}/openchange/setup/openchangedb
328 %dir %{_datadir}/samba/setup/AD
329 %{_datadir}/samba/setup/AD/oc_provision_*.ldif
330 %{_datadir}/samba/setup/AD/provision_schema_basedn_modify.ldif
331 %{_datadir}/samba/setup/AD/update_now.ldif
332 %{_datadir}/samba/setup/AD/prefixMap.txt
335 %attr(755,root,root) %{_bindir}/mapitest
336 %{_datadir}/openchange/mapitest
337 %{_mandir}/man1/mapitest.1*
341 %defattr(644,root,root,755)
342 %attr(755,root,root) %{_libdir}/libmapi.so.*.*
343 %attr(755,root,root) %ghost %{_libdir}/libmapi.so.0
344 %attr(755,root,root) %{_libdir}/libmapiadmin.so.*.*
345 %attr(755,root,root) %ghost %{_libdir}/libmapiadmin.so.0
346 %attr(755,root,root) %{_libdir}/libocpf.so.*.*
347 %attr(755,root,root) %ghost %{_libdir}/libocpf.so.0
348 %if %{with mapiproxy}
349 %attr(755,root,root) %{_libdir}/libmapiproxy.so.*.*
350 %attr(755,root,root) %ghost %{_libdir}/libmapiproxy.so.0
351 %attr(755,root,root) %{_libdir}/libmapiserver.so.*.*
352 %attr(755,root,root) %ghost %{_libdir}/libmapiserver.so.0
353 %attr(755,root,root) %{_libdir}/libmapistore.so.*.*
354 %attr(755,root,root) %ghost %{_libdir}/libmapistore.so.0
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_libdir}/libmapi.so
360 %attr(755,root,root) %{_libdir}/libmapiadmin.so
361 %attr(755,root,root) %{_libdir}/libocpf.so
362 %{_includedir}/gen_ndr
363 %{_includedir}/libmapi
364 %{_includedir}/libmapiadmin
365 %{_includedir}/libocpf
366 %{_pkgconfigdir}/libmapi.pc
367 %{_pkgconfigdir}/libmapiadmin.pc
368 %{_pkgconfigdir}/libocpf.pc
369 %if %{with mapiproxy}
370 %attr(755,root,root) %{_libdir}/libmapiproxy.so
371 %attr(755,root,root) %{_libdir}/libmapiserver.so
372 %attr(755,root,root) %{_libdir}/libmapistore.so
373 %{_includedir}/mapistore
374 %{_includedir}/libmapiproxy.h
375 %{_includedir}/libmapiserver.h
376 %{_pkgconfigdir}/libmapiproxy.pc
377 %{_pkgconfigdir}/libmapiserver.pc
378 %{_pkgconfigdir}/libmapistore.pc
382 %defattr(644,root,root,755)
383 %attr(755,root,root) %{_libdir}/libmapipp.so.*.*
384 %attr(755,root,root) %ghost %{_libdir}/libmapipp.so.0
387 %defattr(644,root,root,755)
388 %attr(755,root,root) %{_libdir}/libmapipp.so
389 %{_includedir}/libmapi++
390 %{_pkgconfigdir}/libmapi++.pc
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/libqtmapi.so.*.*
395 %attr(755,root,root) %ghost %{_libdir}/libqtmapi.so.0
398 %defattr(644,root,root,755)
399 %attr(755,root,root) %{_libdir}/libqtmapi.so
400 %{_includedir}/libqtmapi
404 %defattr(644,root,root,755)
409 %files -n python-openchange
410 %defattr(644,root,root,755)
411 %dir %{py_sitedir}/openchange
412 %attr(755,root,root) %{py_sitedir}/openchange/mapi.so
413 %attr(755,root,root) %{py_sitedir}/openchange/mapistore.so
414 %if %{with mapiproxy}
415 %{py_sitedir}/openchange/*.py[co]
416 %{py_sitedir}/openchange/migration
417 %{py_sitedir}/openchange/tests
418 %{py_sitedir}/openchange/utils
419 %{py_sitedir}/openchange/web
423 %files -n nagios-plugin-openchange
424 %defattr(644,root,root,755)
425 # R: perl, openchangeclient
426 # FIXME: use /usr/lib/nagios/plugins dir and make package noarch
427 %attr(755,root,root) %{_libdir}/nagios/check_exchange
428 # default profile database - should be /etc/...
429 #%config(noreplace) %verify(not md5 mtime size) %{_libdir}/nagios/plugins/check_exchange.ldb