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