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