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