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