- release 42 (for samba 4.10.8)
[packages/openchange.git] / openchange.spec
CommitLineData
b3ba35a0
ER
1# TODO
2# - nagios plugin (see it's files section for details)
cc90af90
JB
3#
4# Conditional build:
5%bcond_without apidocs # do not build and package API docs
d7a0312a
JB
6%bcond_with mapiproxy # mapiproxy suite (disabled with Samba 4.4+)
7%bcond_with mapitest # mapitest utility (disabled with Samba 4.4+)
83692358 8%bcond_with python # build python package (requires disabled mapiproxy)
b3ba35a0
ER
9
10%define cname VULCAN
cc90af90
JB
11Summary: OpenChange - portable implementation of MS Exchange Server and Exchange protocols
12Summary(pl.UTF-8): OpenChange - przenośna implementacja serwera oraz protokołów MS Exchange
13Name: openchange
14Version: 2.3
4b49de4d 15Release: 42
cc90af90
JB
16License: GPL v3+
17Group: Libraries
cc90af90
JB
18Source0: https://github.com/openchange/openchange/archive/%{name}-%{version}-%{cname}.tar.gz
19# Source0-md5: 96c13c78c2bcbd7040f7848746284b9f
db79d4b2 20Patch0: disable-mapiproxy.patch
cc90af90 21Patch1: %{name}-link.patch
2407fd75 22Patch2: flex2.6.patch
db79d4b2
JR
23Patch3: samba-4.2.patch
24Patch4: fix-connection-args.patch
25Patch5: samba-4.4.patch
f28b8ba4
JB
26Patch6: %{name}-covscan.patch
27Patch7: %{name}-samba-4.10-macros.patch
3368736e 28Patch8: %{name}-libical.patch
74e2b0c5 29URL: https://github.com/openchange
cc90af90
JB
30BuildRequires: QtCore-devel >= 4.3.0
31BuildRequires: QtGui-devel >= 4.3.0
32BuildRequires: autoconf >= 2.57
33BuildRequires: automake
34BuildRequires: check-devel
35BuildRequires: doxygen
36BuildRequires: ldb-devel
37BuildRequires: libical-devel >= 0.46
38BuildRequires: libmagic-devel
39BuildRequires: libmemcached-devel >= 1.0.18
40BuildRequires: libpcap-devel
41BuildRequires: libstdc++-devel
42BuildRequires: mysql-devel
43BuildRequires: nanomsg-devel >= 0.5
44BuildRequires: perl-base
45BuildRequires: pkgconfig >= 1:0.20
46BuildRequires: popt-devel
83692358 47%if %{with python}
cc90af90 48BuildRequires: python-devel >= 1:2.7
ce2c05b9 49BuildRequires: python-samba >= 4.2.2
83692358 50%endif
cc90af90 51BuildRequires: rpmbuild(macros) >= 1.219
e0431659 52# with DCERCP multiplex and pending call support (upstream 4.1.18+ or 4.2.2+)
f28b8ba4
JB
53# samba-4.10-macros patch requires samba-pidl 4.10+
54BuildRequires: samba-devel >= 4.10
55BuildRequires: samba-pidl >= 4.10
cc90af90
JB
56BuildRequires: sed >= 4.0
57BuildRequires: subunit-devel
58BuildRequires: talloc-devel
59BuildRequires: tdb-devel
60BuildRequires: zlib-devel
61Requires: %{name}-libs = %{version}-%{release}
2ef972cd 62%{?with_python:Requires: python-openchange = %{version}-%{release}}
cc90af90
JB
63BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
cc90af90
JB
65%description
66OpenChange is a portable Open Source implementation of Microsoft
67Exchange server and Exchange protocols. It provides a complete
68solution to interoperate with Microsoft Outlook clients or Microsoft
69Exchange servers.
70
71OpenChange client-side library is used in existing messaging clients
72and is the solution in new projects to communicate natively with
73Microsoft Exchange and Exchange-compatible servers. OpenChange server
74is a transparent Microsoft Exchange server replacement using native
75Exchange protocols and does not require any plugin installation in
76Outlook.
77
78%description -l pl.UTF-8
79OpenChange to przenośna, mająca otwarte źródła implementacja serwera
80oraz protokołów Microsoft Exchange. Dostarcza kompletne rozwiązanie
81pozwalające współpracować z klientami Microsoft Outlook oraz serwerami
82Microsoft Exchange.
83
84Biblioteka kliencka OpenChange jest używana przez istniejących
85klientów pocztowych i pozwalają na natywną komunikację z serwerami
86Microsoft Exchange oraz zgodnymi. Serwer OpenChange to przezroczysty
87zamiennik serwera Microsoft Exchange wykorzystujący natywne protokoły
88Exchange, nie wymagający instalowania żadnych wtyczek w Outlooku.
89
90%package libs
91Summary: OpenChange client libraries
92Summary(pl.UTF-8): Biblioteki klienckie OpenChange
93Group: Libraries
94
95%description libs
96OpenChange client libraries.
97
98%description libs -l pl.UTF-8
99Biblioteki klienckie OpenChange.
100
101%package devel
102Summary: Header files for OpenChange libraries
103Summary(pl.UTF-8): Pliki nagłówkowe bibliotek OpenChange
104Group: Development/Libraries
105Requires: %{name}-libs = %{version}-%{release}
f6e502a6 106Requires: ldb-devel
e0431659 107Requires: samba-devel >= 4.2.2
f6e502a6
JB
108Requires: talloc-devel
109Requires: tevent-devel
110Requires: zlib-devel
cc90af90
JB
111
112%description devel
113Header files for OpenChange libraries.
114
115%description devel -l pl.UTF-8
116Pliki nagłówkowe bibliotek OpenChange.
117
118%package c++
119Summary: C++ interface to OpenChange MAPI library
120Summary(pl.UTF-8): Interfejs C++ do biblioteki OpenChange MAPI
121Group: Libraries
f6e502a6 122Requires: %{name}-libs = %{version}-%{release}
cc90af90
JB
123
124%description c++
125C++ interface to OpenChange MAPI library.
126
127%description c++ -l pl.UTF-8
128Interfejs C++ do biblioteki OpenChange MAPI.
129
130%package c++-devel
131Summary: Header files of C++ interface to OpenChange MAPI library
132Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI
133Group: Development/Libraries
134Requires: %{name}-c++ = %{version}-%{release}
f6e502a6
JB
135Requires: %{name}-devel = %{version}-%{release}
136Requires: libstdc++-devel
cc90af90
JB
137
138%description c++-devel
139Header files of C++ interface to OpenChange MAPI library.
140
141%description c++-devel -l pl.UTF-8
142Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI.
143
144%package qt
145Summary: Qt interface to OpenChange MAPI library
146Summary(pl.UTF-8): Interfejs Qt do biblioteki OpenChange MAPI
147Group: Libraries
f6e502a6
JB
148Requires: %{name}-c++ = %{version}-%{release}
149Requires: QtCore >= 4.3.0
150Requires: QtGui >= 4.3.0
cc90af90
JB
151
152%description qt
153Qt interface to OpenChange MAPI library.
154
155%description qt -l pl.UTF-8
156Interfejs Qt do biblioteki OpenChange MAPI.
157
158%package qt-devel
159Summary: Header files of Qt interface to OpenChange MAPI library
160Summary(pl.UTF-8): Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI
161Group: Development/Libraries
162Requires: %{name}-qt = %{version}-%{release}
f6e502a6 163Requires: QtGui-devel >= 4.3.0
cc90af90
JB
164
165%description qt-devel
166Header files of Qt interface to OpenChange MAPI library.
167
168%description qt-devel -l pl.UTF-8
169Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI.
170
171%package apidocs
172Summary: API documentation for OpenChange libraries
173Summary(pl.UTF-8): Dokumentacja API bibliotek OpenChange
174Group: Documentation
b3ba35a0
ER
175%if "%{_rpmversion}" >= "5"
176BuildArch: noarch
177%endif
cc90af90
JB
178
179%description apidocs
180API documentation for OpenChange libraries.
181
182%description apidocs -l pl.UTF-8
183Dokumentacja API bibliotek OpenChange.
184
185%package -n python-openchange
186Summary: Python interface to OpenChange libraries
187Summary(pl.UTF-8): Interfejs Pythona do bibliotek OpenChange
188Group: Libraries/Python
189Requires: %{name}-libs = %{version}-%{release}
190
191%description -n python-openchange
192Python interface to OpenChange libraries.
193
194%description -n python-openchange -l pl.UTF-8
195Interfejs Pythona do bibliotek OpenChange.
196
197%package -n nagios-plugin-openchange
198Summary: Nagios plugin to check Exchange/OpenChange services
199Summary(pl.UTF-8): Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange
200Group: Networking
201Requires: %{name} = %{version}-%{release}
202Requires: nagios
203
204%description -n nagios-plugin-openchange
205Nagios plugin to check Exchange/OpenChange services.
206
207%description -n nagios-plugin-openchange -l pl.UTF-8
208Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange.
209
210%prep
211%setup -q -n %{name}-%{name}-%{version}-%{cname}
212%patch0 -p1
213%patch1 -p1
2407fd75 214%patch2 -p1
db79d4b2
JR
215%patch3 -p1
216%patch4 -p1
217%patch5 -p1
f28b8ba4
JB
218%patch6 -p1
219%patch7 -p1
3368736e 220%patch8 -p1
cc90af90
JB
221
222# no switch for verbose mode, enable manually :/
223%{__sed} -i -e 's/^ @\(\$(\(PIDL\|CC\|CXX\|MOC\)\)/ \1/' Makefile
224
225%build
226%{__aclocal}
227%{__autoconf}
228%{__autoheader}
229%configure \
230 --datadir=%{_datadir}/openchange \
231 --enable-openchange-qt4 \
83692358 232 %{?with_python:--enable-pyopenchange} \
cc90af90
JB
233 --with-modulesdir=%{_libdir}/openchange/modules
234%{__make}
235
236%if %{with apidocs}
237%{__make} doxygen
238%endif
239
240%install
241rm -rf $RPM_BUILD_ROOT
242
243%{__make} install \
244 DESTDIR=$RPM_BUILD_ROOT
245
246# doxygen generated man pages are messy; use HTML docs and install man1 pages manually
247%if 0
248%{__make} installman \
249 DESTDIR=$RPM_BUILD_ROOT
250%else
251install -d $RPM_BUILD_ROOT%{_mandir}/man1
252cp doc/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1
253%endif
254
255# missing from make install
256install -d $RPM_BUILD_ROOT%{_includedir}/libqtmapi
257cp -p qt/lib/*.h $RPM_BUILD_ROOT%{_includedir}/libqtmapi
258cp -a libqtmapi.so.*.* libqtmapi.so $RPM_BUILD_ROOT%{_libdir}
259
260# tests
f28b8ba4 261%{__rm} $RPM_BUILD_ROOT%{_bindir}/test_asyncnotif
d7a0312a
JB
262%if %{without mapitest}
263%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mapitest.1
264%endif
cc90af90
JB
265
266/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
267
268%py_comp $RPM_BUILD_ROOT%{py_sitedir}
269%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
270%py_postclean
271
272%clean
273rm -rf $RPM_BUILD_ROOT
274
c949a72b
JB
275%post libs -p /sbin/ldconfig
276%postun libs -p /sbin/ldconfig
277
278%post c++ -p /sbin/ldconfig
279%postun c++ -p /sbin/ldconfig
280
503206d3
JB
281%post qt -p /sbin/ldconfig
282%postun qt -p /sbin/ldconfig
cc90af90
JB
283
284%files
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
cc90af90
JB
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
cc90af90 296%dir %{_datadir}/openchange
cc90af90 297%dir %{_datadir}/openchange/setup
cc90af90 298%{_datadir}/openchange/setup/profiles
cc90af90
JB
299%{_mandir}/man1/exchange2ical.1*
300%{_mandir}/man1/exchange2mbox.1*
301%{_mandir}/man1/mapiprofile.1*
cc90af90
JB
302%{_mandir}/man1/openchangeclient.1*
303%{_mandir}/man1/openchangepfadmin.1*
d7a0312a
JB
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
333%endif
334%if %{with mapitest}
335%attr(755,root,root) %{_bindir}/mapitest
336%{_datadir}/openchange/mapitest
337%{_mandir}/man1/mapitest.1*
338%endif
cc90af90
JB
339
340%files libs
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
cc90af90
JB
346%attr(755,root,root) %{_libdir}/libocpf.so.*.*
347%attr(755,root,root) %ghost %{_libdir}/libocpf.so.0
d7a0312a
JB
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
355%endif
cc90af90
JB
356
357%files devel
358%defattr(644,root,root,755)
359%attr(755,root,root) %{_libdir}/libmapi.so
360%attr(755,root,root) %{_libdir}/libmapiadmin.so
cc90af90
JB
361%attr(755,root,root) %{_libdir}/libocpf.so
362%{_includedir}/gen_ndr
363%{_includedir}/libmapi
cc90af90
JB
364%{_includedir}/libmapiadmin
365%{_includedir}/libocpf
cc90af90 366%{_pkgconfigdir}/libmapi.pc
cc90af90 367%{_pkgconfigdir}/libmapiadmin.pc
cc90af90 368%{_pkgconfigdir}/libocpf.pc
d7a0312a
JB
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
379%endif
cc90af90 380
c949a72b
JB
381%files c++
382%defattr(644,root,root,755)
383%attr(755,root,root) %{_libdir}/libmapipp.so.*.*
384%attr(755,root,root) %ghost %{_libdir}/libmapipp.so.0
385
386%files c++-devel
387%defattr(644,root,root,755)
388%attr(755,root,root) %{_libdir}/libmapipp.so
389%{_includedir}/libmapi++
390%{_pkgconfigdir}/libmapi++.pc
391
cc90af90
JB
392%files qt
393%defattr(644,root,root,755)
394%attr(755,root,root) %{_libdir}/libqtmapi.so.*.*
395%attr(755,root,root) %ghost %{_libdir}/libqtmapi.so.0
396
397%files qt-devel
398%defattr(644,root,root,755)
399%attr(755,root,root) %{_libdir}/libqtmapi.so
400%{_includedir}/libqtmapi
401
402%if %{with apidocs}
403%files apidocs
404%defattr(644,root,root,755)
405%doc apidocs/html/*
406%endif
407
83692358 408%if %{with python}
cc90af90
JB
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
d7a0312a
JB
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
420%endif
83692358 421%endif
cc90af90
JB
422
423%files -n nagios-plugin-openchange
424%defattr(644,root,root,755)
425# R: perl, openchangeclient
b3ba35a0 426# FIXME: use /usr/lib/nagios/plugins dir and make package noarch
cc90af90
JB
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
This page took 0.09756 seconds and 4 git commands to generate.