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