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