]>
Commit | Line | Data |
---|---|---|
1 | # TODO: package go files (where?) | |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_with static_libs # static libraries | |
5 | %bcond_with golang # Go binding | |
6 | %bcond_without python # Python binding | |
7 | %bcond_without ruby # Ruby binding | |
8 | ||
9 | Summary: Qpid Proton - AMQP messaging toolkit | |
10 | Summary(pl.UTF-8): Qpid Proton - narzędzia do komunikacji AMQP | |
11 | Name: qpid-proton | |
12 | Version: 0.32.0 | |
13 | Release: 1 | |
14 | License: Apache v2.0 | |
15 | Group: Libraries | |
16 | Source0: https://downloads.apache.org/qpid/proton/%{version}/%{name}-%{version}.tar.gz | |
17 | # Source0-md5: 5bb5cc9a50f53c76fe281d5e3d5e5342 | |
18 | Patch0: %{name}-format.patch | |
19 | URL: http://qpid.apache.org/proton/ | |
20 | BuildRequires: cmake >= 2.8.12 | |
21 | BuildRequires: cyrus-sasl-devel | |
22 | BuildRequires: doxygen | |
23 | %{?with_golang:BuildRequires: golang >= 1.11} | |
24 | BuildRequires: libstdc++-devel | |
25 | BuildRequires: libuuid-devel | |
26 | BuildRequires: openssl-devel | |
27 | BuildRequires: pkgconfig | |
28 | BuildRequires: python >= 2 | |
29 | %{?with_python:BuildRequires: python-devel} | |
30 | %{?with_ruby:BuildRequires: ruby-devel} | |
31 | %{?with_python:BuildRequires: swig-python} | |
32 | %{?with_ruby:BuildRequires: swig-ruby} | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | Proton is a high performance, lightweight messaging library. It can be | |
37 | used in the widest range of messaging applications including brokers, | |
38 | client libraries, routers, bridges, proxies, and more. Proton makes it | |
39 | trivial to integrate with the AMQP 1.0 ecosystem from any platform, | |
40 | environment, or language. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | Proton to wydajna, lekka biblioteka do komunikacji. Może być używana w | |
44 | szerokiej gamie aplikacji komunikacyjnych, w tym brokerów, bibliotek | |
45 | klienckich, routerów, mostków, proxy itp. Proton powoduje, że | |
46 | integrowanie z ekosystemem AMQP 1.0 z woeolnej platformy, środowiska | |
47 | czy języka staje się trywialne. | |
48 | ||
49 | %package c | |
50 | Summary: C libraries for Qpid Proton | |
51 | Summary(pl.UTF-8): Biblioteki C Qpid Proton | |
52 | Group: Libraries | |
53 | ||
54 | %description c | |
55 | C libraries for Qpid Proton. | |
56 | ||
57 | %description c -l pl.UTF-8 | |
58 | Biblioteki C Qpid Proton. | |
59 | ||
60 | %package c-devel | |
61 | Summary: Development files for Qpid Proton C libraries | |
62 | Summary(pl.UTF-8): Pliki programistyczne bibliotek Qpid Proton dla C | |
63 | Group: Development/Libraries | |
64 | Requires: %{name}-c = %{version}-%{release} | |
65 | ||
66 | %description c-devel | |
67 | Development files for writing messaging apps with Qpid Proton C | |
68 | libraries. | |
69 | ||
70 | %description c-devel -l pl.UTF-8 | |
71 | Pliki programistyczne do tworzenia aplikacji z wykorzystaniem | |
72 | bibliotek C Qpid Proton. | |
73 | ||
74 | %package c-apidocs | |
75 | Summary: Documentation for Qpid Proton C API | |
76 | Summary(pl.UTF-8): Dokumentacja API bibliotek C Qpid Proton | |
77 | Group: Documentation | |
78 | Obsoletes: qpid-proton-c-devel-doc < 0.31.0 | |
79 | BuildArch: noarch | |
80 | ||
81 | %description c-apidocs | |
82 | Documentation for Qpid Proton C API. | |
83 | ||
84 | %description c-apidocs -l pl.UTF-8 | |
85 | Dokumentacja API bibliotek C Qpid Proton. | |
86 | ||
87 | %package cpp | |
88 | Summary: C++ libraries for Qpid Proton | |
89 | Summary(pl.UTF-8): Biblioteki C++ Qpid Proton | |
90 | Group: Libraries | |
91 | Requires: %{name}-c = %{version}-%{release} | |
92 | Requires: libstdc++-devel | |
93 | ||
94 | %description cpp | |
95 | C++ libraries for Qpid Proton. | |
96 | ||
97 | %description cpp -l pl.UTF-8 | |
98 | Biblioteki C++ Qpid Proton. | |
99 | ||
100 | %package cpp-devel | |
101 | Summary: Development files for Qpid Proton C++ library | |
102 | Summary(pl.UTF-8): Pliki programistyczne biblioteki Qpid Proton dla C++ | |
103 | Group: Development/Libraries | |
104 | Requires: %{name}-c-devel = %{version}-%{release} | |
105 | Requires: %{name}-cpp = %{version}-%{release} | |
106 | ||
107 | %description cpp-devel | |
108 | Development files for writing messaging apps with Qpid Proton C++ | |
109 | library. | |
110 | ||
111 | %description cpp-devel -l pl.UTF-8 | |
112 | Pliki programistyczne do tworzenia aplikacji z wykorzystaniem | |
113 | biblioteki C++ Qpid Proton. | |
114 | ||
115 | %package cpp-apidocs | |
116 | Summary: Documentation for Qpid Proton C++ API | |
117 | Summary(pl.UTF-8): Dokumentacja API biblioteki C++ Qpid Proton | |
118 | Group: Documentation | |
119 | BuildArch: noarch | |
120 | ||
121 | %description cpp-apidocs | |
122 | Documentation for Qpid Proton C++ API. | |
123 | ||
124 | %description c-apidocs -l pl.UTF-8 | |
125 | Dokumentacja API biblioteki C++ Qpid Proton. | |
126 | ||
127 | ||
128 | %package -n python-%{name} | |
129 | Summary: Python language bindings for the Qpid Proton messaging framework | |
130 | Summary(pl.UTF-8): Wiązania Pythona do szkieletu komunikacji Qpid Proton | |
131 | Group: Libraries/Python | |
132 | Requires: %{name}-c = %{version}-%{release} | |
133 | ||
134 | %description -n python-%{name} | |
135 | Python language bindings for the Qpid Proton messaging framework. | |
136 | ||
137 | %description -n python-%{name} -l pl.UTF-8 | |
138 | Wiązania Pythona do szkieletu komunikacji Qpid Proton. | |
139 | ||
140 | %package -n python-%{name}-apidocs | |
141 | Summary: Documentation for the Python language bindings for Qpid Proton | |
142 | Summary(pl.UTF-8): Dokumentacja wiązań Pythona do biblioteki Qpid Proton | |
143 | Group: Documentation | |
144 | Obsoletes: python-qpid-proton-doc < 0.31.0 | |
145 | BuildArch: noarch | |
146 | ||
147 | %description -n python-%{name}-apidocs | |
148 | Documentation for the Python language bindings for Qpid Proton. | |
149 | ||
150 | %description -n python-%{name}-apidocs -l pl.UTF-8 | |
151 | Dokumentacja wiązań Pythona do biblioteki Qpid Proton. | |
152 | ||
153 | %package -n ruby-%{name} | |
154 | Summary: Ruby language bindings for the Qpid Proton messaging framework | |
155 | Summary(pl.UTF-8): Wiązania języka Ruby do szkieletu komunikacji Qpid Proton | |
156 | Group: Development/Languages | |
157 | Requires: %{name}-c = %{version}-%{release} | |
158 | Requires: ruby-modules | |
159 | ||
160 | %description -n ruby-%{name} | |
161 | Ruby language bindings for the Qpid Proton messaging framework. | |
162 | ||
163 | %description -n ruby-%{name} -l pl.UTF-8 | |
164 | Wiązania języka Ruby do szkieletu komunikacji Qpid Proton. | |
165 | ||
166 | %prep | |
167 | %setup -q | |
168 | %patch0 -p1 | |
169 | ||
170 | %{__sed} -i -e '1s,/usr/bin/python$,%{__python},' \ | |
171 | c/examples/testme \ | |
172 | cpp/examples/testme | |
173 | ||
174 | %{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' \ | |
175 | python/examples/*.py | |
176 | ||
177 | %build | |
178 | install -d build | |
179 | cd build | |
180 | %cmake .. \ | |
181 | -DBUILD_BINDINGS="cpp;go%{?with_python:;python}%{?with_ruby:;ruby}" \ | |
182 | %{?with_golang:-DBUILD_GO=ON} \ | |
183 | %{?with_static_libs:-DBUILD_STATIC_LIBS=ON} \ | |
184 | -DPYTHON_SITEARCH_PACKAGES=%{py_sitedir} \ | |
185 | -DSYSINSTALL_PYTHON=ON | |
186 | ||
187 | %{__make} all docs | |
188 | ||
189 | %install | |
190 | rm -rf $RPM_BUILD_ROOT | |
191 | ||
192 | %{__make} -C build install \ | |
193 | DESTDIR=$RPM_BUILD_ROOT | |
194 | ||
195 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/proton/{CMakeLists.txt,LICENSE.txt,README.md,examples/README.md,tests} | |
196 | ||
197 | install -d $RPM_BUILD_ROOT{%{_examplesdir},%{_docdir}/%{name}} | |
198 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/examples/c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-c-%{version} | |
199 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/examples/cpp $RPM_BUILD_ROOT%{_examplesdir}/%{name}-cpp-%{version} | |
200 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/docs/api-c $RPM_BUILD_ROOT%{_docdir}/%{name} | |
201 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/docs/api-cpp $RPM_BUILD_ROOT%{_docdir}/%{name} | |
202 | ||
203 | %if %{with python} | |
204 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/docs/api-py $RPM_BUILD_ROOT%{_docdir}/%{name} | |
205 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/examples/python $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version} | |
206 | ||
207 | %py_postclean | |
208 | %endif | |
209 | ||
210 | %if %{with ruby} | |
211 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/examples/ruby $RPM_BUILD_ROOT%{_examplesdir}/ruby-%{name}-%{version} | |
212 | %endif | |
213 | ||
214 | %clean | |
215 | rm -rf $RPM_BUILD_ROOT | |
216 | ||
217 | %post c -p /sbin/ldconfig | |
218 | %postun c -p /sbin/ldconfig | |
219 | ||
220 | %post cpp -p /sbin/ldconfig | |
221 | %postun cpp -p /sbin/ldconfig | |
222 | ||
223 | %files c | |
224 | %defattr(644,root,root,755) | |
225 | %doc NOTICE.txt README.md | |
226 | %attr(755,root,root) %{_libdir}/libqpid-proton.so.*.*.* | |
227 | %attr(755,root,root) %ghost %{_libdir}/libqpid-proton.so.11 | |
228 | %attr(755,root,root) %{_libdir}/libqpid-proton-core.so.*.*.* | |
229 | %attr(755,root,root) %ghost %{_libdir}/libqpid-proton-core.so.10 | |
230 | %attr(755,root,root) %{_libdir}/libqpid-proton-proactor.so.*.*.* | |
231 | %attr(755,root,root) %ghost %{_libdir}/libqpid-proton-proactor.so.1 | |
232 | ||
233 | %files c-devel | |
234 | %defattr(644,root,root,755) | |
235 | %attr(755,root,root) %{_libdir}/libqpid-proton.so | |
236 | %attr(755,root,root) %{_libdir}/libqpid-proton-core.so | |
237 | %attr(755,root,root) %{_libdir}/libqpid-proton-proactor.so | |
238 | %dir %{_includedir}/proton | |
239 | %{_includedir}/proton/*.h | |
240 | %{_includedir}/proton/cproton.i | |
241 | %{_pkgconfigdir}/libqpid-proton.pc | |
242 | %{_pkgconfigdir}/libqpid-proton-core.pc | |
243 | %{_pkgconfigdir}/libqpid-proton-proactor.pc | |
244 | %{_libdir}/cmake/Proton | |
245 | ||
246 | %files c-apidocs | |
247 | %defattr(644,root,root,755) | |
248 | %dir %{_docdir}/%{name} | |
249 | %{_docdir}/%{name}/api-c | |
250 | %{_examplesdir}/%{name}-c-%{version} | |
251 | ||
252 | %files cpp | |
253 | %defattr(644,root,root,755) | |
254 | %attr(755,root,root) %{_libdir}/libqpid-proton-cpp.so.*.*.* | |
255 | %attr(755,root,root) %ghost %{_libdir}/libqpid-proton-cpp.so.12 | |
256 | ||
257 | %files cpp-devel | |
258 | %defattr(644,root,root,755) | |
259 | %attr(755,root,root) %{_libdir}/libqpid-proton-cpp.so | |
260 | %{_includedir}/proton/*.hpp | |
261 | %{_includedir}/proton/codec | |
262 | %{_includedir}/proton/internal | |
263 | %{_includedir}/proton/io | |
264 | %{_pkgconfigdir}/libqpid-proton-cpp.pc | |
265 | %{_libdir}/cmake/ProtonCpp | |
266 | ||
267 | %files cpp-apidocs | |
268 | %defattr(644,root,root,755) | |
269 | %dir %{_docdir}/%{name} | |
270 | %{_docdir}/%{name}/api-cpp | |
271 | %{_examplesdir}/%{name}-cpp-%{version} | |
272 | ||
273 | %if %{with python} | |
274 | %files -n python-%{name} | |
275 | %defattr(644,root,root,755) | |
276 | %attr(755,root,root) %{py_sitedir}/_cproton.so | |
277 | %{py_sitedir}/cproton.py[co] | |
278 | %{py_sitedir}/proton | |
279 | ||
280 | %files -n python-%{name}-apidocs | |
281 | %defattr(644,root,root,755) | |
282 | %dir %{_docdir}/%{name} | |
283 | %{_docdir}/%{name}/api-py | |
284 | %{_examplesdir}/python-%{name}-%{version} | |
285 | %endif | |
286 | ||
287 | %if %{with ruby} | |
288 | %files -n ruby-%{name} | |
289 | %defattr(644,root,root,755) | |
290 | %if 0 | |
291 | # cannot use SYSINSTALL_RUBY for now because... | |
292 | %attr(755,root,root) %{ruby_vendorarchdir}/cproton.so | |
293 | %{ruby_vendorarchdir}/qpid_proton.rb | |
294 | # the files below are likely to conflict with other ruby packages | |
295 | %{ruby_vendorarchdir}/codec | |
296 | %{ruby_vendorarchdir}/core | |
297 | %{ruby_vendorarchdir}/handler | |
298 | %{ruby_vendorarchdir}/reactor | |
299 | %{ruby_vendorarchdir}/types | |
300 | %{ruby_vendorarchdir}/util | |
301 | %else | |
302 | # ...so use private install | |
303 | %dir %{_libdir}/proton | |
304 | %dir %{_libdir}/proton/bindings | |
305 | %dir %{_libdir}/proton/bindings/ruby | |
306 | %attr(755,root,root) %{_libdir}/proton/bindings/ruby/cproton.so | |
307 | %{_libdir}/proton/bindings/ruby/qpid_proton.rb | |
308 | %{_libdir}/proton/bindings/ruby/codec | |
309 | %{_libdir}/proton/bindings/ruby/core | |
310 | %{_libdir}/proton/bindings/ruby/handler | |
311 | %{_libdir}/proton/bindings/ruby/reactor | |
312 | %{_libdir}/proton/bindings/ruby/types | |
313 | %{_libdir}/proton/bindings/ruby/util | |
314 | %endif | |
315 | %{_examplesdir}/ruby-%{name}-%{version} | |
316 | %endif |