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