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