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