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