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