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