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