]> git.pld-linux.org Git - packages/openchange.git/blob - openchange.spec
samba 4.20.0 rebuild
[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:        74
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 Patch12:        samba-4.15.patch
34 Patch13:        samba-4.20.patch
35 URL:            https://github.com/openchange
36 BuildRequires:  QtCore-devel >= 4.3.0
37 BuildRequires:  QtGui-devel >= 4.3.0
38 BuildRequires:  autoconf >= 2.57
39 BuildRequires:  automake
40 BuildRequires:  check-devel
41 BuildRequires:  doxygen
42 BuildRequires:  ldb-devel
43 BuildRequires:  libical-devel >= 0.46
44 BuildRequires:  libmagic-devel
45 BuildRequires:  libmemcached-devel >= 1.0.18
46 BuildRequires:  libpcap-devel
47 BuildRequires:  libstdc++-devel
48 BuildRequires:  mysql-devel
49 BuildRequires:  nanomsg-devel >= 1.0.0
50 BuildRequires:  perl-base
51 BuildRequires:  pkgconfig >= 1:0.20
52 BuildRequires:  popt-devel
53 BuildRequires:  python-devel >= 1:2.7
54 %if %{with python}
55 BuildRequires:  python-samba >= 4.2.2
56 %endif
57 BuildRequires:  qt4-build >= 4.3.0
58 BuildRequires:  rpm-build >= 4.6
59 BuildRequires:  rpmbuild(macros) >= 1.752
60 # with DCERCP multiplex and pending call support (upstream 4.1.18+ or 4.2.2+)
61 # samba-4.10-macros patch requires samba-pidl 4.10+
62 BuildRequires:  samba-devel >= 4.10
63 BuildRequires:  samba-pidl >= 4.10
64 BuildRequires:  sed >= 4.0
65 BuildRequires:  subunit-devel
66 BuildRequires:  talloc-devel
67 BuildRequires:  tdb-devel
68 BuildRequires:  zlib-devel
69 Requires:       %{name}-libs = %{version}-%{release}
70 %{?with_python:Requires:        python-openchange = %{version}-%{release}}
71 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
73 %define         _noautoreq_perl         utils
74
75 %description
76 OpenChange is a portable Open Source implementation of Microsoft
77 Exchange server and Exchange protocols. It provides a complete
78 solution to interoperate with Microsoft Outlook clients or Microsoft
79 Exchange servers.
80
81 OpenChange client-side library is used in existing messaging clients
82 and is the solution in new projects to communicate natively with
83 Microsoft Exchange and Exchange-compatible servers. OpenChange server
84 is a transparent Microsoft Exchange server replacement using native
85 Exchange protocols and does not require any plugin installation in
86 Outlook.
87
88 %description -l pl.UTF-8
89 OpenChange to przenośna, mająca otwarte źródła implementacja serwera
90 oraz protokołów Microsoft Exchange. Dostarcza kompletne rozwiązanie
91 pozwalające współpracować z klientami Microsoft Outlook oraz serwerami
92 Microsoft Exchange.
93
94 Biblioteka kliencka OpenChange jest używana przez istniejących
95 klientów pocztowych i pozwalają na natywną komunikację z serwerami
96 Microsoft Exchange oraz zgodnymi. Serwer OpenChange to przezroczysty
97 zamiennik serwera Microsoft Exchange wykorzystujący natywne protokoły
98 Exchange, nie wymagający instalowania żadnych wtyczek w Outlooku.
99
100 %package libs
101 Summary:        OpenChange client libraries
102 Summary(pl.UTF-8):      Biblioteki klienckie OpenChange
103 Group:          Libraries
104
105 %description libs
106 OpenChange client libraries.
107
108 %description libs -l pl.UTF-8
109 Biblioteki klienckie OpenChange.
110
111 %package devel
112 Summary:        Header files for OpenChange libraries
113 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek OpenChange
114 Group:          Development/Libraries
115 Requires:       %{name}-libs = %{version}-%{release}
116 Requires:       ldb-devel
117 Requires:       samba-devel >= 4.2.2
118 Requires:       talloc-devel
119 Requires:       tevent-devel
120 Requires:       zlib-devel
121
122 %description devel
123 Header files for OpenChange libraries.
124
125 %description devel -l pl.UTF-8
126 Pliki nagłówkowe bibliotek OpenChange.
127
128 %package c++
129 Summary:        C++ interface to OpenChange MAPI library
130 Summary(pl.UTF-8):      Interfejs C++ do biblioteki OpenChange MAPI
131 Group:          Libraries
132 Requires:       %{name}-libs = %{version}-%{release}
133
134 %description c++
135 C++ interface to OpenChange MAPI library.
136
137 %description c++ -l pl.UTF-8
138 Interfejs C++ do biblioteki OpenChange MAPI.
139
140 %package c++-devel
141 Summary:        Header files of C++ interface to OpenChange MAPI library
142 Summary(pl.UTF-8):      Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI
143 Group:          Development/Libraries
144 Requires:       %{name}-c++ = %{version}-%{release}
145 Requires:       %{name}-devel = %{version}-%{release}
146 Requires:       libstdc++-devel
147
148 %description c++-devel
149 Header files of C++ interface to OpenChange MAPI library.
150
151 %description c++-devel -l pl.UTF-8
152 Pliki nagłówkowe interfejsu C++ do biblioteki OpenChange MAPI.
153
154 %package qt
155 Summary:        Qt interface to OpenChange MAPI library
156 Summary(pl.UTF-8):      Interfejs Qt do biblioteki OpenChange MAPI
157 Group:          Libraries
158 Requires:       %{name}-c++ = %{version}-%{release}
159 Requires:       QtCore >= 4.3.0
160 Requires:       QtGui >= 4.3.0
161
162 %description qt
163 Qt interface to OpenChange MAPI library.
164
165 %description qt -l pl.UTF-8
166 Interfejs Qt do biblioteki OpenChange MAPI.
167
168 %package qt-devel
169 Summary:        Header files of Qt interface to OpenChange MAPI library
170 Summary(pl.UTF-8):      Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI
171 Group:          Development/Libraries
172 Requires:       %{name}-qt = %{version}-%{release}
173 Requires:       QtGui-devel >= 4.3.0
174
175 %description qt-devel
176 Header files of Qt interface to OpenChange MAPI library.
177
178 %description qt-devel -l pl.UTF-8
179 Pliki nagłówkowe interfejsu Qt do biblioteki OpenChange MAPI.
180
181 %package apidocs
182 Summary:        API documentation for OpenChange libraries
183 Summary(pl.UTF-8):      Dokumentacja API bibliotek OpenChange
184 Group:          Documentation
185 BuildArch:      noarch
186
187 %description apidocs
188 API documentation for OpenChange libraries.
189
190 %description apidocs -l pl.UTF-8
191 Dokumentacja API bibliotek OpenChange.
192
193 %package -n python-openchange
194 Summary:        Python interface to OpenChange libraries
195 Summary(pl.UTF-8):      Interfejs Pythona do bibliotek OpenChange
196 Group:          Libraries/Python
197 Requires:       %{name}-libs = %{version}-%{release}
198
199 %description -n python-openchange
200 Python interface to OpenChange libraries.
201
202 %description -n python-openchange -l pl.UTF-8
203 Interfejs Pythona do bibliotek OpenChange.
204
205 %package -n nagios-plugin-openchange
206 Summary:        Nagios plugin to check Exchange/OpenChange services
207 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange
208 Group:          Networking
209 Requires:       %{name} = %{version}-%{release}
210 Requires:       nagios
211
212 %description -n nagios-plugin-openchange
213 Nagios plugin to check Exchange/OpenChange services.
214
215 %description -n nagios-plugin-openchange -l pl.UTF-8
216 Wtyczka Nagiosa do sprawdzania usług Exchange/OpenChange.
217
218 %prep
219 %setup -q -n %{name}-%{name}-%{version}-%{cname}
220 %patch0 -p1
221 %patch1 -p1
222 %patch2 -p1
223 %patch3 -p1
224 %patch4 -p1
225 %patch5 -p1
226 %patch6 -p1
227 %patch7 -p1
228 %patch8 -p1
229 %patch9 -p1
230 %patch10 -p1
231 %patch11 -p1
232 %patch12 -p1
233 %patch13 -p1
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}
242 # instead of calling automake (there is no Makefile.am)
243 cp -f /usr/share/automake/{compile,missing} .
244 %configure \
245         --datadir=%{_datadir}/openchange \
246         --enable-openchange-qt4 \
247         %{?with_python:--enable-pyopenchange} \
248         --with-modulesdir=%{_libdir}/openchange/modules
249 %{__make}
250
251 %if %{with apidocs}
252 %{__make} doxygen
253 %endif
254
255 %install
256 rm -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
266 install -d $RPM_BUILD_ROOT%{_mandir}/man1
267 cp doc/man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1
268 %endif
269
270 # missing from make install
271 install -d $RPM_BUILD_ROOT%{_includedir}/libqtmapi
272 cp -p qt/lib/*.h $RPM_BUILD_ROOT%{_includedir}/libqtmapi
273 cp -a libqtmapi.so.*.* libqtmapi.so $RPM_BUILD_ROOT%{_libdir}
274
275 # tests
276 %{__rm} $RPM_BUILD_ROOT%{_bindir}/test_asyncnotif
277 %if %{without mapitest}
278 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mapitest.1
279 %endif
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
288 rm -rf $RPM_BUILD_ROOT
289
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
296 %post   qt -p /sbin/ldconfig
297 %postun qt -p /sbin/ldconfig
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
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
311 %dir %{_datadir}/openchange
312 %dir %{_datadir}/openchange/setup
313 %{_datadir}/openchange/setup/profiles
314 %{_mandir}/man1/exchange2ical.1*
315 %{_mandir}/man1/exchange2mbox.1*
316 %{_mandir}/man1/mapiprofile.1*
317 %{_mandir}/man1/openchangeclient.1*
318 %{_mandir}/man1/openchangepfadmin.1*
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
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
361 %attr(755,root,root) %{_libdir}/libocpf.so.*.*
362 %attr(755,root,root) %ghost %{_libdir}/libocpf.so.0
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
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
376 %attr(755,root,root) %{_libdir}/libocpf.so
377 %{_includedir}/gen_ndr
378 %{_includedir}/libmapi
379 %{_includedir}/libmapiadmin
380 %{_includedir}/libocpf
381 %{_pkgconfigdir}/libmapi.pc
382 %{_pkgconfigdir}/libmapiadmin.pc
383 %{_pkgconfigdir}/libocpf.pc
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
395
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
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
423 %if %{with python}
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
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
436 %endif
437
438 %files -n nagios-plugin-openchange
439 %defattr(644,root,root,755)
440 # R: perl, openchangeclient
441 # FIXME: use /usr/lib/nagios/plugins dir and make package noarch
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.068999 seconds and 4 git commands to generate.