]> git.pld-linux.org Git - packages/openchange.git/blame - openchange.spec
- fix building with samba 4.12
[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
d23f825b 15Release: 49
cc90af90
JB
16License: GPL v3+
17Group: Libraries
aa254850 18#Source0Download: https://github.com/openchange/openchange/releases
cc90af90
JB
19Source0: https://github.com/openchange/openchange/archive/%{name}-%{version}-%{cname}.tar.gz
20# Source0-md5: 96c13c78c2bcbd7040f7848746284b9f
db79d4b2 21Patch0: disable-mapiproxy.patch
cc90af90 22Patch1: %{name}-link.patch
2407fd75 23Patch2: flex2.6.patch
db79d4b2
JR
24Patch3: samba-4.2.patch
25Patch4: fix-connection-args.patch
26Patch5: samba-4.4.patch
f28b8ba4
JB
27Patch6: %{name}-covscan.patch
28Patch7: %{name}-samba-4.10-macros.patch
3368736e 29Patch8: %{name}-libical.patch
224a9b8c 30Patch9: samba-4.11.patch
d23f825b 31Patch10: samba-4.12.patch
74e2b0c5 32URL: https://github.com/openchange
cc90af90
JB
33BuildRequires: QtCore-devel >= 4.3.0
34BuildRequires: QtGui-devel >= 4.3.0
35BuildRequires: autoconf >= 2.57
36BuildRequires: automake
37BuildRequires: check-devel
38BuildRequires: doxygen
39BuildRequires: ldb-devel
40BuildRequires: libical-devel >= 0.46
41BuildRequires: libmagic-devel
42BuildRequires: libmemcached-devel >= 1.0.18
43BuildRequires: libpcap-devel
44BuildRequires: libstdc++-devel
45BuildRequires: mysql-devel
46BuildRequires: nanomsg-devel >= 0.5
47BuildRequires: perl-base
48BuildRequires: pkgconfig >= 1:0.20
49BuildRequires: popt-devel
83692358 50%if %{with python}
cc90af90 51BuildRequires: python-devel >= 1:2.7
ce2c05b9 52BuildRequires: python-samba >= 4.2.2
83692358 53%endif
cc90af90 54BuildRequires: rpmbuild(macros) >= 1.219
e0431659 55# with DCERCP multiplex and pending call support (upstream 4.1.18+ or 4.2.2+)
f28b8ba4
JB
56# samba-4.10-macros patch requires samba-pidl 4.10+
57BuildRequires: samba-devel >= 4.10
58BuildRequires: samba-pidl >= 4.10
cc90af90
JB
59BuildRequires: sed >= 4.0
60BuildRequires: subunit-devel
61BuildRequires: talloc-devel
62BuildRequires: tdb-devel
63BuildRequires: zlib-devel
64Requires: %{name}-libs = %{version}-%{release}
2ef972cd 65%{?with_python:Requires: python-openchange = %{version}-%{release}}
cc90af90
JB
66BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
29dcaaf8
JR
68%define _noautoreq_perl utils
69
cc90af90
JB
70%description
71OpenChange is a portable Open Source implementation of Microsoft
72Exchange server and Exchange protocols. It provides a complete
73solution to interoperate with Microsoft Outlook clients or Microsoft
74Exchange servers.
75
76OpenChange client-side library is used in existing messaging clients
77and is the solution in new projects to communicate natively with
78Microsoft Exchange and Exchange-compatible servers. OpenChange server
79is a transparent Microsoft Exchange server replacement using native
80Exchange protocols and does not require any plugin installation in
81Outlook.
82
83%description -l pl.UTF-8
84OpenChange to przenośna, mająca otwarte źródła implementacja serwera
85oraz protokołów Microsoft Exchange. Dostarcza kompletne rozwiązanie
86pozwalające współpracować z klientami Microsoft Outlook oraz serwerami
87Microsoft Exchange.
88
89Biblioteka kliencka OpenChange jest używana przez istniejących
90klientów pocztowych i pozwalają na natywną komunikację z serwerami
91Microsoft Exchange oraz zgodnymi. Serwer OpenChange to przezroczysty
92zamiennik serwera Microsoft Exchange wykorzystujący natywne protokoły
93Exchange, nie wymagający instalowania żadnych wtyczek w Outlooku.
94
95%package libs
96Summary: OpenChange client libraries
97Summary(pl.UTF-8): Biblioteki klienckie OpenChange
98Group: Libraries
99
100%description libs
101OpenChange client libraries.
102
103%description libs -l pl.UTF-8
104Biblioteki klienckie OpenChange.
105
106%package devel
107Summary: Header files for OpenChange libraries
108Summary(pl.UTF-8): Pliki nagłówkowe bibliotek OpenChange
109Group: Development/Libraries
110Requires: %{name}-libs = %{version}-%{release}
f6e502a6 111Requires: ldb-devel
e0431659 112Requires: samba-devel >= 4.2.2
f6e502a6
JB
113Requires: talloc-devel
114Requires: tevent-devel
115Requires: zlib-devel
cc90af90
JB
116
117%description devel
118Header files for OpenChange libraries.
119
120%description devel -l pl.UTF-8
121Pliki nagłówkowe bibliotek OpenChange.
122
123%package c++
124Summary: C++ interface to OpenChange MAPI library
125Summary(pl.UTF-8): Interfejs C++ do biblioteki OpenChange MAPI
126Group: Libraries
f6e502a6 127Requires: %{name}-libs = %{version}-%{release}
cc90af90
JB
128
129%description c++
130C++ interface to OpenChange MAPI library.
131
132%description c++ -l pl.UTF-8
133Interfejs C++ do biblioteki OpenChange MAPI.
134
135%package c++-devel
136Summary: Header files of C++ interface to OpenChange MAPI library
137Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI
138Group: Development/Libraries
139Requires: %{name}-c++ = %{version}-%{release}
f6e502a6
JB
140Requires: %{name}-devel = %{version}-%{release}
141Requires: libstdc++-devel
cc90af90
JB
142
143%description c++-devel
144Header files of C++ interface to OpenChange MAPI library.
145
146%description c++-devel -l pl.UTF-8
147Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI.
148
149%package qt
150Summary: Qt interface to OpenChange MAPI library
151Summary(pl.UTF-8): Interfejs Qt do biblioteki OpenChange MAPI
152Group: Libraries
f6e502a6
JB
153Requires: %{name}-c++ = %{version}-%{release}
154Requires: QtCore >= 4.3.0
155Requires: QtGui >= 4.3.0
cc90af90
JB
156
157%description qt
158Qt interface to OpenChange MAPI library.
159
160%description qt -l pl.UTF-8
161Interfejs Qt do biblioteki OpenChange MAPI.
162
163%package qt-devel
164Summary: Header files of Qt interface to OpenChange MAPI library
165Summary(pl.UTF-8): Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI
166Group: Development/Libraries
167Requires: %{name}-qt = %{version}-%{release}
f6e502a6 168Requires: QtGui-devel >= 4.3.0
cc90af90
JB
169
170%description qt-devel
171Header files of Qt interface to OpenChange MAPI library.
172
173%description qt-devel -l pl.UTF-8
174Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI.
175
176%package apidocs
177Summary: API documentation for OpenChange libraries
178Summary(pl.UTF-8): Dokumentacja API bibliotek OpenChange
179Group: Documentation
b3ba35a0
ER
180%if "%{_rpmversion}" >= "5"
181BuildArch: noarch
182%endif
cc90af90
JB
183
184%description apidocs
185API documentation for OpenChange libraries.
186
187%description apidocs -l pl.UTF-8
188Dokumentacja API bibliotek OpenChange.
189
190%package -n python-openchange
191Summary: Python interface to OpenChange libraries
192Summary(pl.UTF-8): Interfejs Pythona do bibliotek OpenChange
193Group: Libraries/Python
194Requires: %{name}-libs = %{version}-%{release}
195
196%description -n python-openchange
197Python interface to OpenChange libraries.
198
199%description -n python-openchange -l pl.UTF-8
200Interfejs Pythona do bibliotek OpenChange.
201
202%package -n nagios-plugin-openchange
203Summary: Nagios plugin to check Exchange/OpenChange services
204Summary(pl.UTF-8): Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange
205Group: Networking
206Requires: %{name} = %{version}-%{release}
207Requires: nagios
208
209%description -n nagios-plugin-openchange
210Nagios plugin to check Exchange/OpenChange services.
211
212%description -n nagios-plugin-openchange -l pl.UTF-8
213Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange.
214
215%prep
216%setup -q -n %{name}-%{name}-%{version}-%{cname}
217%patch0 -p1
218%patch1 -p1
2407fd75 219%patch2 -p1
db79d4b2
JR
220%patch3 -p1
221%patch4 -p1
222%patch5 -p1
f28b8ba4
JB
223%patch6 -p1
224%patch7 -p1
3368736e 225%patch8 -p1
224a9b8c 226%patch9 -p1
d23f825b 227%patch10 -p1
cc90af90
JB
228
229# no switch for verbose mode, enable manually :/
230%{__sed} -i -e 's/^ @\(\$(\(PIDL\|CC\|CXX\|MOC\)\)/ \1/' Makefile
231
232%build
233%{__aclocal}
234%{__autoconf}
235%{__autoheader}
236%configure \
237 --datadir=%{_datadir}/openchange \
238 --enable-openchange-qt4 \
83692358 239 %{?with_python:--enable-pyopenchange} \
cc90af90
JB
240 --with-modulesdir=%{_libdir}/openchange/modules
241%{__make}
242
243%if %{with apidocs}
244%{__make} doxygen
245%endif
246
247%install
248rm -rf $RPM_BUILD_ROOT
249
250%{__make} install \
251 DESTDIR=$RPM_BUILD_ROOT
252
253# doxygen generated man pages are messy; use HTML docs and install man1 pages manually
254%if 0
255%{__make} installman \
256 DESTDIR=$RPM_BUILD_ROOT
257%else
258install -d $RPM_BUILD_ROOT%{_mandir}/man1
259cp doc/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1
260%endif
261
262# missing from make install
263install -d $RPM_BUILD_ROOT%{_includedir}/libqtmapi
264cp -p qt/lib/*.h $RPM_BUILD_ROOT%{_includedir}/libqtmapi
265cp -a libqtmapi.so.*.* libqtmapi.so $RPM_BUILD_ROOT%{_libdir}
266
267# tests
f28b8ba4 268%{__rm} $RPM_BUILD_ROOT%{_bindir}/test_asyncnotif
d7a0312a
JB
269%if %{without mapitest}
270%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mapitest.1
271%endif
cc90af90
JB
272
273/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
274
275%py_comp $RPM_BUILD_ROOT%{py_sitedir}
276%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
277%py_postclean
278
279%clean
280rm -rf $RPM_BUILD_ROOT
281
c949a72b
JB
282%post libs -p /sbin/ldconfig
283%postun libs -p /sbin/ldconfig
284
285%post c++ -p /sbin/ldconfig
286%postun c++ -p /sbin/ldconfig
287
503206d3
JB
288%post qt -p /sbin/ldconfig
289%postun qt -p /sbin/ldconfig
cc90af90
JB
290
291%files
292%defattr(644,root,root,755)
293%doc CHANGES.md IDL_LICENSE.txt README.md README.smbconf.md doc/howto.txt
294%attr(755,root,root) %{_bindir}/exchange2ical
295%attr(755,root,root) %{_bindir}/exchange2mbox
296%attr(755,root,root) %{_bindir}/mapiprofile
297%attr(755,root,root) %{_bindir}/mapipropsdump
cc90af90
JB
298%attr(755,root,root) %{_bindir}/openchangeclient
299%attr(755,root,root) %{_bindir}/openchangemapidump
300%attr(755,root,root) %{_bindir}/openchangepfadmin
301%attr(755,root,root) %{_bindir}/rpcextract
302%attr(755,root,root) %{_bindir}/schemaIDGUID
cc90af90 303%dir %{_datadir}/openchange
cc90af90 304%dir %{_datadir}/openchange/setup
cc90af90 305%{_datadir}/openchange/setup/profiles
cc90af90
JB
306%{_mandir}/man1/exchange2ical.1*
307%{_mandir}/man1/exchange2mbox.1*
308%{_mandir}/man1/mapiprofile.1*
cc90af90
JB
309%{_mandir}/man1/openchangeclient.1*
310%{_mandir}/man1/openchangepfadmin.1*
d7a0312a
JB
311%if %{with mapiproxy}
312%attr(755,root,root) %{_bindir}/ocnotify
313%attr(755,root,root) %{_sbindir}/openchange_group
314%attr(755,root,root) %{_sbindir}/openchange_migrate
315%attr(755,root,root) %{_sbindir}/openchange_neworganization
316%attr(755,root,root) %{_sbindir}/openchange_newuser
317%attr(755,root,root) %{_sbindir}/openchange_provision
318# XXX: dir specified by dcerpc_server.pc file, should belong to samba or samba-libs
319%dir %{_libdir}/samba/dcerpc_server
320%attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_asyncemsmdb.so
321%attr(755,root,root) %{_libdir}/samba/dcerpc_server/dcesrv_mapiproxy.so
322%dir %{_libdir}/openchange
323%dir %{_libdir}/openchange/modules
324%dir %{_libdir}/openchange/modules/dcerpc_mapiproxy
325%attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_cache.so
326%attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_downgrade.so
327%attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_dummy.so
328%attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy/mpm_pack.so
329%dir %{_libdir}/openchange/modules/dcerpc_mapiproxy_server
330%attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_ds_rfr.so
331%attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_emsmdb.so
332%attr(755,root,root) %{_libdir}/openchange/modules/dcerpc_mapiproxy_server/exchange_nsp.so
333%{_datadir}/openchange/setup/mapistore
334%{_datadir}/openchange/setup/openchangedb
335%dir %{_datadir}/samba/setup/AD
336%{_datadir}/samba/setup/AD/oc_provision_*.ldif
337%{_datadir}/samba/setup/AD/provision_schema_basedn_modify.ldif
338%{_datadir}/samba/setup/AD/update_now.ldif
339%{_datadir}/samba/setup/AD/prefixMap.txt
340%endif
341%if %{with mapitest}
342%attr(755,root,root) %{_bindir}/mapitest
343%{_datadir}/openchange/mapitest
344%{_mandir}/man1/mapitest.1*
345%endif
cc90af90
JB
346
347%files libs
348%defattr(644,root,root,755)
349%attr(755,root,root) %{_libdir}/libmapi.so.*.*
350%attr(755,root,root) %ghost %{_libdir}/libmapi.so.0
351%attr(755,root,root) %{_libdir}/libmapiadmin.so.*.*
352%attr(755,root,root) %ghost %{_libdir}/libmapiadmin.so.0
cc90af90
JB
353%attr(755,root,root) %{_libdir}/libocpf.so.*.*
354%attr(755,root,root) %ghost %{_libdir}/libocpf.so.0
d7a0312a
JB
355%if %{with mapiproxy}
356%attr(755,root,root) %{_libdir}/libmapiproxy.so.*.*
357%attr(755,root,root) %ghost %{_libdir}/libmapiproxy.so.0
358%attr(755,root,root) %{_libdir}/libmapiserver.so.*.*
359%attr(755,root,root) %ghost %{_libdir}/libmapiserver.so.0
360%attr(755,root,root) %{_libdir}/libmapistore.so.*.*
361%attr(755,root,root) %ghost %{_libdir}/libmapistore.so.0
362%endif
cc90af90
JB
363
364%files devel
365%defattr(644,root,root,755)
366%attr(755,root,root) %{_libdir}/libmapi.so
367%attr(755,root,root) %{_libdir}/libmapiadmin.so
cc90af90
JB
368%attr(755,root,root) %{_libdir}/libocpf.so
369%{_includedir}/gen_ndr
370%{_includedir}/libmapi
cc90af90
JB
371%{_includedir}/libmapiadmin
372%{_includedir}/libocpf
cc90af90 373%{_pkgconfigdir}/libmapi.pc
cc90af90 374%{_pkgconfigdir}/libmapiadmin.pc
cc90af90 375%{_pkgconfigdir}/libocpf.pc
d7a0312a
JB
376%if %{with mapiproxy}
377%attr(755,root,root) %{_libdir}/libmapiproxy.so
378%attr(755,root,root) %{_libdir}/libmapiserver.so
379%attr(755,root,root) %{_libdir}/libmapistore.so
380%{_includedir}/mapistore
381%{_includedir}/libmapiproxy.h
382%{_includedir}/libmapiserver.h
383%{_pkgconfigdir}/libmapiproxy.pc
384%{_pkgconfigdir}/libmapiserver.pc
385%{_pkgconfigdir}/libmapistore.pc
386%endif
cc90af90 387
c949a72b
JB
388%files c++
389%defattr(644,root,root,755)
390%attr(755,root,root) %{_libdir}/libmapipp.so.*.*
391%attr(755,root,root) %ghost %{_libdir}/libmapipp.so.0
392
393%files c++-devel
394%defattr(644,root,root,755)
395%attr(755,root,root) %{_libdir}/libmapipp.so
396%{_includedir}/libmapi++
397%{_pkgconfigdir}/libmapi++.pc
398
cc90af90
JB
399%files qt
400%defattr(644,root,root,755)
401%attr(755,root,root) %{_libdir}/libqtmapi.so.*.*
402%attr(755,root,root) %ghost %{_libdir}/libqtmapi.so.0
403
404%files qt-devel
405%defattr(644,root,root,755)
406%attr(755,root,root) %{_libdir}/libqtmapi.so
407%{_includedir}/libqtmapi
408
409%if %{with apidocs}
410%files apidocs
411%defattr(644,root,root,755)
412%doc apidocs/html/*
413%endif
414
83692358 415%if %{with python}
cc90af90
JB
416%files -n python-openchange
417%defattr(644,root,root,755)
418%dir %{py_sitedir}/openchange
419%attr(755,root,root) %{py_sitedir}/openchange/mapi.so
420%attr(755,root,root) %{py_sitedir}/openchange/mapistore.so
d7a0312a
JB
421%if %{with mapiproxy}
422%{py_sitedir}/openchange/*.py[co]
423%{py_sitedir}/openchange/migration
424%{py_sitedir}/openchange/tests
425%{py_sitedir}/openchange/utils
426%{py_sitedir}/openchange/web
427%endif
83692358 428%endif
cc90af90
JB
429
430%files -n nagios-plugin-openchange
431%defattr(644,root,root,755)
432# R: perl, openchangeclient
b3ba35a0 433# FIXME: use /usr/lib/nagios/plugins dir and make package noarch
cc90af90
JB
434%attr(755,root,root) %{_libdir}/nagios/check_exchange
435# default profile database - should be /etc/...
436#%config(noreplace) %verify(not md5 mtime size) %{_libdir}/nagios/plugins/check_exchange.ldb
This page took 0.114206 seconds and 4 git commands to generate.