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