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