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