- unconditional noarch subpackages
[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
0cf0530f 12Version: 0.32.0
6af9bd58 13Release: 1
6d1b46c8
ER
14License: Apache v2.0
15Group: Libraries
6af9bd58 16Source0: https://downloads.apache.org/qpid/proton/%{version}/%{name}-%{version}.tar.gz
0cf0530f 17# Source0-md5: 5bb5cc9a50f53c76fe281d5e3d5e5342
6af9bd58 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
6af9bd58 79BuildArch: noarch
6af9bd58
JB
80
81%description c-apidocs
82Documentation for Qpid Proton C API.
83
84%description c-apidocs -l pl.UTF-8
85Dokumentacja API bibliotek C Qpid Proton.
6d1b46c8 86
6af9bd58
JB
87%package cpp
88Summary: C++ libraries for Qpid Proton
89Summary(pl.UTF-8): Biblioteki C++ Qpid Proton
90Group: Libraries
91Requires: %{name}-c = %{version}-%{release}
92Requires: libstdc++-devel
93
94%description cpp
95C++ libraries for Qpid Proton.
96
97%description cpp -l pl.UTF-8
98Biblioteki C++ Qpid Proton.
99
100%package cpp-devel
101Summary: Development files for Qpid Proton C++ library
102Summary(pl.UTF-8): Pliki programistyczne biblioteki Qpid Proton dla C++
103Group: Development/Libraries
104Requires: %{name}-c-devel = %{version}-%{release}
105Requires: %{name}-cpp = %{version}-%{release}
106
107%description cpp-devel
108Development files for writing messaging apps with Qpid Proton C++
109library.
110
111%description cpp-devel -l pl.UTF-8
112Pliki programistyczne do tworzenia aplikacji z wykorzystaniem
113biblioteki C++ Qpid Proton.
114
115%package cpp-apidocs
116Summary: Documentation for Qpid Proton C++ API
117Summary(pl.UTF-8): Dokumentacja API biblioteki C++ Qpid Proton
6d1b46c8 118Group: Documentation
6d1b46c8 119BuildArch: noarch
6d1b46c8 120
6af9bd58
JB
121%description cpp-apidocs
122Documentation for Qpid Proton C++ API.
123
124%description c-apidocs -l pl.UTF-8
125Dokumentacja API biblioteki C++ Qpid Proton.
126
6d1b46c8
ER
127
128%package -n python-%{name}
129Summary: Python language bindings for the Qpid Proton messaging framework
6af9bd58 130Summary(pl.UTF-8): Wiązania Pythona do szkieletu komunikacji Qpid Proton
6d1b46c8
ER
131Group: Libraries/Python
132Requires: %{name}-c = %{version}-%{release}
133
134%description -n python-%{name}
6af9bd58
JB
135Python language bindings for the Qpid Proton messaging framework.
136
137%description -n python-%{name} -l pl.UTF-8
138Wiązania Pythona do szkieletu komunikacji Qpid Proton.
6d1b46c8 139
6af9bd58 140%package -n python-%{name}-apidocs
6d1b46c8 141Summary: Documentation for the Python language bindings for Qpid Proton
6af9bd58 142Summary(pl.UTF-8): Dokumentacja wiązań Pythona do biblioteki Qpid Proton
6d1b46c8 143Group: Documentation
6af9bd58 144Obsoletes: python-qpid-proton-doc < 0.31.0
6d1b46c8 145BuildArch: noarch
6d1b46c8 146
6af9bd58
JB
147%description -n python-%{name}-apidocs
148Documentation for the Python language bindings for Qpid Proton.
149
150%description -n python-%{name}-apidocs -l pl.UTF-8
151Dokumentacja wiązań Pythona do biblioteki Qpid Proton.
152
153%package -n ruby-%{name}
154Summary: Ruby language bindings for the Qpid Proton messaging framework
155Summary(pl.UTF-8): Wiązania języka Ruby do szkieletu komunikacji Qpid Proton
156Group: Development/Languages
157Requires: %{name}-c = %{version}-%{release}
158Requires: ruby-modules
159
160%description -n ruby-%{name}
161Ruby language bindings for the Qpid Proton messaging framework.
162
163%description -n ruby-%{name} -l pl.UTF-8
164Wiązania języka Ruby do szkieletu komunikacji Qpid Proton.
6d1b46c8
ER
165
166%prep
167%setup -q
6af9bd58
JB
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
6d1b46c8
ER
176
177%build
6af9bd58
JB
178install -d build
179cd 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
6d1b46c8
ER
186
187%{__make} all docs
188
189%install
190rm -rf $RPM_BUILD_ROOT
6af9bd58
JB
191
192%{__make} -C build install \
6d1b46c8
ER
193 DESTDIR=$RPM_BUILD_ROOT
194
6af9bd58
JB
195%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/proton/{CMakeLists.txt,LICENSE.txt,README.md,examples/README.md,tests}
196
197install -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
6d1b46c8 203%if %{with python}
6af9bd58
JB
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
6d1b46c8
ER
208%endif
209
6af9bd58
JB
210%if %{with ruby}
211%{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/examples/ruby $RPM_BUILD_ROOT%{_examplesdir}/ruby-%{name}-%{version}
212%endif
6d1b46c8
ER
213
214%clean
215rm -rf $RPM_BUILD_ROOT
216
217%post c -p /sbin/ldconfig
218%postun c -p /sbin/ldconfig
219
6af9bd58
JB
220%post cpp -p /sbin/ldconfig
221%postun cpp -p /sbin/ldconfig
222
6d1b46c8
ER
223%files c
224%defattr(644,root,root,755)
6af9bd58 225%doc NOTICE.txt README.md
6d1b46c8 226%attr(755,root,root) %{_libdir}/libqpid-proton.so.*.*.*
6af9bd58
JB
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
6d1b46c8
ER
232
233%files c-devel
234%defattr(644,root,root,755)
6af9bd58
JB
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
6d1b46c8 241%{_pkgconfigdir}/libqpid-proton.pc
6af9bd58
JB
242%{_pkgconfigdir}/libqpid-proton-core.pc
243%{_pkgconfigdir}/libqpid-proton-proactor.pc
6d1b46c8 244%{_libdir}/cmake/Proton
6d1b46c8 245
6af9bd58
JB
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
6d1b46c8 253%defattr(644,root,root,755)
6af9bd58
JB
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}
6d1b46c8
ER
272
273%if %{with python}
274%files -n python-%{name}
275%defattr(644,root,root,755)
6af9bd58
JB
276%attr(755,root,root) %{py_sitedir}/_cproton.so
277%{py_sitedir}/cproton.py[co]
278%{py_sitedir}/proton
6d1b46c8 279
6af9bd58 280%files -n python-%{name}-apidocs
6d1b46c8 281%defattr(644,root,root,755)
6af9bd58
JB
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}
6d1b46c8 316%endif
This page took 0.177897 seconds and 4 git commands to generate.