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