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