[packages/qpid-proton] - updated to 0.31.0 - removed obsolete PROTON-731 Installing-Python-requires-Proton-be-inst patch -

qboosh qboosh at pld-linux.org
Thu May 28 18:38:54 CEST 2020


commit 6af9bd5856db2cb4695a9219d848a40af0c1ada0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu May 28 18:39:29 2020 +0200

    - updated to 0.31.0
    - removed obsolete PROTON-731 Installing-Python-requires-Proton-be-inst patch
    - added format patch (-Werror=format-security conflicts with -Wno-format)
    - package cpp,python,ruby bindings; also golang is available

 ...Installing-Python-requires-Proton-be-inst.patch |  40 ---
 qpid-proton-format.patch                           |  11 +
 qpid-proton.spec                                   | 314 ++++++++++++++++-----
 3 files changed, 252 insertions(+), 113 deletions(-)
---
diff --git a/qpid-proton.spec b/qpid-proton.spec
index 10e4198..e1eeb58 100644
--- a/qpid-proton.spec
+++ b/qpid-proton.spec
@@ -1,115 +1,221 @@
-# TODO
-# - bindings and bconds for them
-Summary:	A high performance, lightweight messaging library
+# TODO: package go files (where?)
+#
+# Conditional build:
+%bcond_with	static_libs	# static libraries
+%bcond_with	golang		# Go binding
+%bcond_without	python		# Python binding
+%bcond_without	ruby		# Ruby binding
+
+Summary:	Qpid Proton - AMQP messaging toolkit
+Summary(pl.UTF-8):	Qpid Proton - narzędzia do komunikacji AMQP
 Name:		qpid-proton
-Version:	0.8
-Release:	0.1
+Version:	0.31.0
+Release:	1
 License:	Apache v2.0
 Group:		Libraries
-Source0:	http://www.apache.org/dist/qpid/proton/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	48bfbd7ba5a639760bb28380f4d68208
-Patch0001:	0001-PROTON-731-Installing-Python-requires-Proton-be-inst.patch
+Source0:	https://downloads.apache.org/qpid/proton/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	568bb8459e54ce94fc216de2b9e2b038
+Patch0:		%{name}-format.patch
 URL:		http://qpid.apache.org/proton/
-BuildRequires:	cmake >= 2.6
+BuildRequires:	cmake >= 2.8.12
+BuildRequires:	cyrus-sasl-devel
 BuildRequires:	doxygen
-BuildRequires:	epydoc
+%{?with_golang:BuildRequires:	golang >= 1.11}
+BuildRequires:	libstdc++-devel
 BuildRequires:	libuuid-devel
 BuildRequires:	openssl-devel
 BuildRequires:	pkgconfig
-BuildRequires:	python
-BuildRequires:	python-devel
-BuildRequires:	swig
+BuildRequires:	python >= 2
+%{?with_python:BuildRequires:	python-devel}
+%{?with_ruby:BuildRequires:	ruby-devel}
+%{?with_python:BuildRequires:	swig-python}
+%{?with_ruby:BuildRequires:	swig-ruby}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define	proton_datadir %{_datadir}/proton-%{version}
-
 %description
 Proton is a high performance, lightweight messaging library. It can be
 used in the widest range of messaging applications including brokers,
-client libraries, routers, bridges, proxies, and more. Proton is based
-on the AMQP 1.0 messaging standard. Using Proton it is trivial to
-integrate with the AMQP 1.0 ecosystem from any platform, environment,
-or language.
+client libraries, routers, bridges, proxies, and more. Proton makes it
+trivial to integrate with the AMQP 1.0 ecosystem from any platform,
+environment, or language.
+
+%description -l pl.UTF-8
+Proton to wydajna, lekka biblioteka do komunikacji. Może być używana w
+szerokiej gamie aplikacji komunikacyjnych, w tym brokerów, bibliotek
+klienckich, routerów, mostków, proxy itp. Proton powoduje, że
+integrowanie z ekosystemem AMQP 1.0 z woeolnej platformy, środowiska
+czy języka staje się trywialne.
 
 %package c
 Summary:	C libraries for Qpid Proton
+Summary(pl.UTF-8):	Biblioteki C Qpid Proton
 Group:		Libraries
 
 %description c
-%{summary}.
+C libraries for Qpid Proton.
+
+%description c -l pl.UTF-8
+Biblioteki C Qpid Proton.
 
 %package c-devel
-Summary:	Development libraries for writing messaging apps with Qpid Proton
+Summary:	Development files for Qpid Proton C libraries
+Summary(pl.UTF-8):	Pliki programistyczne bibliotek Qpid Proton dla C
 Group:		Development/Libraries
-Requires:	qpid-proton-c = %{version}-%{release}
+Requires:	%{name}-c = %{version}-%{release}
 
 %description c-devel
-%{summary}.
+Development files for writing messaging apps with Qpid Proton C
+libraries.
+
+%description c-devel -l pl.UTF-8
+Pliki programistyczne do tworzenia aplikacji z wykorzystaniem
+bibliotek C Qpid Proton.
+
+%package c-apidocs
+Summary:	Documentation for Qpid Proton C API
+Summary(pl.UTF-8):	Dokumentacja API bibliotek C Qpid Proton
+Group:		Documentation
+Obsoletes:	qpid-proton-c-devel-doc < 0.31.0
+%if "%{_rpmversion}" >= "4.6"
+BuildArch:	noarch
+%endif
+
+%description c-apidocs
+Documentation for Qpid Proton C API.
+
+%description c-apidocs -l pl.UTF-8
+Dokumentacja API bibliotek C Qpid Proton.
 
-%package c-devel-doc
-Summary:	Documentation for the C development libraries for Qpid Proton
+%package cpp
+Summary:	C++ libraries for Qpid Proton
+Summary(pl.UTF-8):	Biblioteki C++ Qpid Proton
+Group:		Libraries
+Requires:	%{name}-c = %{version}-%{release}
+Requires:	libstdc++-devel
+
+%description cpp
+C++ libraries for Qpid Proton.
+
+%description cpp -l pl.UTF-8
+Biblioteki C++ Qpid Proton.
+
+%package cpp-devel
+Summary:	Development files for Qpid Proton C++ library
+Summary(pl.UTF-8):	Pliki programistyczne biblioteki Qpid Proton dla C++
+Group:		Development/Libraries
+Requires:	%{name}-c-devel = %{version}-%{release}
+Requires:	%{name}-cpp = %{version}-%{release}
+
+%description cpp-devel
+Development files for writing messaging apps with Qpid Proton C++
+library.
+
+%description cpp-devel -l pl.UTF-8
+Pliki programistyczne do tworzenia aplikacji z wykorzystaniem
+biblioteki C++ Qpid Proton.
+
+%package cpp-apidocs
+Summary:	Documentation for Qpid Proton C++ API
+Summary(pl.UTF-8):	Dokumentacja API biblioteki C++ Qpid Proton
 Group:		Documentation
-%if "%{_rpmversion}" >= "5"
+%if "%{_rpmversion}" >= "4.6"
 BuildArch:	noarch
 %endif
 
-%description c-devel-doc
-%{summary}.
+%description cpp-apidocs
+Documentation for Qpid Proton C++ API.
+
+%description c-apidocs -l pl.UTF-8
+Dokumentacja API biblioteki C++ Qpid Proton.
+
 
 %package -n python-%{name}
 Summary:	Python language bindings for the Qpid Proton messaging framework
+Summary(pl.UTF-8):	Wiązania Pythona do szkieletu komunikacji Qpid Proton
 Group:		Libraries/Python
 Requires:	%{name}-c = %{version}-%{release}
 
 %description -n python-%{name}
-%{summary}.
+Python language bindings for the Qpid Proton messaging framework.
+
+%description -n python-%{name} -l pl.UTF-8
+Wiązania Pythona do szkieletu komunikacji Qpid Proton.
 
-%package -n python-%{name}-doc
+%package -n python-%{name}-apidocs
 Summary:	Documentation for the Python language bindings for Qpid Proton
+Summary(pl.UTF-8):	Dokumentacja wiązań Pythona do biblioteki Qpid Proton
 Group:		Documentation
-%if "%{_rpmversion}" >= "5"
+Obsoletes:	python-qpid-proton-doc < 0.31.0
+%if "%{_rpmversion}" >= "4.6"
 BuildArch:	noarch
 %endif
 
-%description -n python-%{name}-doc
-%{summary}.
+%description -n python-%{name}-apidocs
+Documentation for the Python language bindings for Qpid Proton.
+
+%description -n python-%{name}-apidocs -l pl.UTF-8
+Dokumentacja wiązań Pythona do biblioteki Qpid Proton.
+
+%package -n ruby-%{name}
+Summary:	Ruby language bindings for the Qpid Proton messaging framework
+Summary(pl.UTF-8):	Wiązania języka Ruby do szkieletu komunikacji Qpid Proton
+Group:		Development/Languages
+Requires:	%{name}-c = %{version}-%{release}
+Requires:	ruby-modules
+
+%description -n ruby-%{name}
+Ruby language bindings for the Qpid Proton messaging framework.
+
+%description -n ruby-%{name} -l pl.UTF-8
+Wiązania języka Ruby do szkieletu komunikacji Qpid Proton.
 
 %prep
 %setup -q
-%patch0001 -p1
+%patch0 -p1
+
+%{__sed} -i -e '1s,/usr/bin/python$,%{__python},' \
+	c/examples/testme \
+	cpp/examples/testme
+
+%{__sed} -i -e '1s,/usr/bin/env python$,%{__python},' \
+	python/examples/*.py
 
 %build
-%cmake \
-	-DPROTON_DISABLE_RPATH=true \
-	-DPYTHON_SITEARCH_PACKAGES=%{python_sitearch} \
-	-DBINDING_LANGS="%{?with_perl:PERL} %{?with_php:PHP} %{?with_python:PYTHON} %{?with_ruby:RUBY}" \
-	-DNOBUILD_RUBY=1 \
-	-DNOBUILD_PHP=1 \
-	-DNOBUILD_JAVA=1 \
-	-DBUILD_PYTHON=0 \
-	-DBUILD_PERL=0 \
-	-DSYSINSTALL_PYTHON=1 \
-	-DSYSINSTALL_PERL=0 \
-	-DCHECK_SYSINSTALL_PYTHON=0 \
-	.
+install -d build
+cd build
+%cmake .. \
+	-DBUILD_BINDINGS="cpp;go%{?with_python:;python}%{?with_ruby:;ruby}" \
+	%{?with_golang:-DBUILD_GO=ON} \
+	%{?with_static_libs:-DBUILD_STATIC_LIBS=ON} \
+	-DPYTHON_SITEARCH_PACKAGES=%{py_sitedir} \
+	-DSYSINSTALL_PYTHON=ON
 
 %{__make} all docs
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/proton/{CMakeLists.txt,LICENSE.txt,README.md,examples/README.md,tests}
+
+install -d $RPM_BUILD_ROOT{%{_examplesdir},%{_docdir}/%{name}}
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/examples/c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-c-%{version}
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/examples/cpp $RPM_BUILD_ROOT%{_examplesdir}/%{name}-cpp-%{version}
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/docs/api-c $RPM_BUILD_ROOT%{_docdir}/%{name}
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/docs/api-cpp $RPM_BUILD_ROOT%{_docdir}/%{name}
+
 %if %{with python}
-chmod +x $RPM_BUILD_ROOT%{py_sitedir}/_cproton.so
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/docs/api-py $RPM_BUILD_ROOT%{_docdir}/%{name}
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/examples/python $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
+
+%py_postclean
 %endif
 
-# clean up files that are not shipped
-rm -rf $RPM_BUILD_ROOT%{_exec_prefix}/bindings
-rm -rf $RPM_BUILD_ROOT%{_libdir}/java
-rm -rf $RPM_BUILD_ROOT%{_libdir}/libproton-jni.so
-rm -rf $RPM_BUILD_ROOT%{_datarootdir}/java
-rm -rf $RPM_BUILD_ROOT%{_libdir}/proton.cmake
+%if %{with ruby}
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/proton/examples/ruby $RPM_BUILD_ROOT%{_examplesdir}/ruby-%{name}-%{version}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -117,39 +223,101 @@ rm -rf $RPM_BUILD_ROOT
 %post	c -p /sbin/ldconfig
 %postun	c -p /sbin/ldconfig
 
+%post	cpp -p /sbin/ldconfig
+%postun	cpp -p /sbin/ldconfig
+
 %files c
 %defattr(644,root,root,755)
-%dir %{proton_datadir}
-%doc %{proton_datadir}/LICENSE
-%doc %{proton_datadir}/README
-%doc %{proton_datadir}/TODO
+%doc NOTICE.txt README.md
 %attr(755,root,root) %{_libdir}/libqpid-proton.so.*.*.*
-%ghost %{_libdir}/libqpid-proton.so.2
-%attr(755,root,root) %{_bindir}/proton
-%attr(755,root,root) %{_bindir}/proton-dump
-%{_mandir}/man1/proton-dump.1*
-%{_mandir}/man1/proton.1*
+%attr(755,root,root) %ghost %{_libdir}/libqpid-proton.so.11
+%attr(755,root,root) %{_libdir}/libqpid-proton-core.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libqpid-proton-core.so.10
+%attr(755,root,root) %{_libdir}/libqpid-proton-proactor.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libqpid-proton-proactor.so.1
 
 %files c-devel
 %defattr(644,root,root,755)
-%{_includedir}/proton
-%{_libdir}/libqpid-proton.so
+%attr(755,root,root) %{_libdir}/libqpid-proton.so
+%attr(755,root,root) %{_libdir}/libqpid-proton-core.so
+%attr(755,root,root) %{_libdir}/libqpid-proton-proactor.so
+%dir %{_includedir}/proton
+%{_includedir}/proton/*.h
+%{_includedir}/proton/cproton.i
 %{_pkgconfigdir}/libqpid-proton.pc
+%{_pkgconfigdir}/libqpid-proton-core.pc
+%{_pkgconfigdir}/libqpid-proton-proactor.pc
 %{_libdir}/cmake/Proton
 %{_datadir}/proton/examples
 
-%files c-devel-doc
+%files c-apidocs
+%defattr(644,root,root,755)
+%dir %{_docdir}/%{name}
+%{_docdir}/%{name}/api-c
+%{_examplesdir}/%{name}-c-%{version}
+
+%files cpp
 %defattr(644,root,root,755)
-%doc %{proton_datadir}/docs/api-c
+%attr(755,root,root) %{_libdir}/libqpid-proton-cpp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libqpid-proton-cpp.so.12
+
+%files cpp-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libqpid-proton-cpp.so
+%{_includedir}/proton/*.hpp
+%{_includedir}/proton/codec
+%{_includedir}/proton/internal
+%{_includedir}/proton/io
+%{_pkgconfigdir}/libqpid-proton-cpp.pc
+%{_libdir}/cmake/ProtonCpp
+
+%files cpp-apidocs
+%defattr(644,root,root,755)
+%dir %{_docdir}/%{name}
+%{_docdir}/%{name}/api-cpp
+%{_examplesdir}/%{name}-cpp-%{version}
 
 %if %{with python}
 %files -n python-%{name}
 %defattr(644,root,root,755)
-%{py_sitedir}/_cproton.so
-%{py_sitedir}/cproton.*
-%{py_sitedir}/proton.*
+%attr(755,root,root) %{py_sitedir}/_cproton.so
+%{py_sitedir}/cproton.py[co]
+%{py_sitedir}/proton
 
-%files -n python-%{name}-doc
+%files -n python-%{name}-apidocs
 %defattr(644,root,root,755)
-%doc %{proton_datadir}/docs/api-py
+%dir %{_docdir}/%{name}
+%{_docdir}/%{name}/api-py
+%{_examplesdir}/python-%{name}-%{version}
+%endif
+
+%if %{with ruby}
+%files -n ruby-%{name}
+%defattr(644,root,root,755)
+%if 0
+# cannot use SYSINSTALL_RUBY for now because...
+%attr(755,root,root) %{ruby_vendorarchdir}/cproton.so
+%{ruby_vendorarchdir}/qpid_proton.rb
+# the files below are likely to conflict with other ruby packages
+%{ruby_vendorarchdir}/codec
+%{ruby_vendorarchdir}/core
+%{ruby_vendorarchdir}/handler
+%{ruby_vendorarchdir}/reactor
+%{ruby_vendorarchdir}/types
+%{ruby_vendorarchdir}/util
+%else
+# ...so use private install
+%dir %{_libdir}/proton
+%dir %{_libdir}/proton/bindings
+%dir %{_libdir}/proton/bindings/ruby
+%attr(755,root,root) %{_libdir}/proton/bindings/ruby/cproton.so
+%{_libdir}/proton/bindings/ruby/qpid_proton.rb
+%{_libdir}/proton/bindings/ruby/codec
+%{_libdir}/proton/bindings/ruby/core
+%{_libdir}/proton/bindings/ruby/handler
+%{_libdir}/proton/bindings/ruby/reactor
+%{_libdir}/proton/bindings/ruby/types
+%{_libdir}/proton/bindings/ruby/util
+%endif
+%{_examplesdir}/ruby-%{name}-%{version}
 %endif
diff --git a/0001-PROTON-731-Installing-Python-requires-Proton-be-inst.patch b/0001-PROTON-731-Installing-Python-requires-Proton-be-inst.patch
deleted file mode 100644
index 26de0c0..0000000
--- a/0001-PROTON-731-Installing-Python-requires-Proton-be-inst.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a0670dd53c9d3b444656917e0b663364f6f20aa5 Mon Sep 17 00:00:00 2001
-From: "Darryl L. Pierce" <mcpierce at gmail.com>
-Date: Mon, 27 Oct 2014 15:01:52 -0400
-Subject: [PATCH] PROTON-731: Installing Python requires Proton be installed
- already.
-
-The CHECK_SYSINSTALL_PYTHON variable was not being set, so it's now
-being set by default but can be overridden from the command line.
-
-Also changed the PYTHON_SITEARCH_PACKAGES variable a cache done that can
-also be overridden from the command line as well.
----
- proton-c/bindings/python/CMakeLists.txt | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/proton-c/bindings/python/CMakeLists.txt b/proton-c/bindings/python/CMakeLists.txt
-index b8cdb57..ff8c706 100644
---- a/proton-c/bindings/python/CMakeLists.txt
-+++ b/proton-c/bindings/python/CMakeLists.txt
-@@ -22,6 +22,8 @@
- 
- set(CMAKE_SWIG_FLAGS "-threads")
- 
-+set(CHECK_SYSINSTALL_PYTHON ON CACHE INTERNAL "")
-+
- include_directories (${PYTHON_INCLUDE_PATH})
- if (BUILD_WITH_CXX)
-    SET_SOURCE_FILES_PROPERTIES(cproton.i PROPERTIES CPLUSPLUS ON)
-@@ -74,7 +76,7 @@ if (CHECK_SYSINSTALL_PYTHON)
- 
- else ()
-   # install the bindings using the CMAKE path variables:
--  set (PYTHON_SITEARCH_PACKAGES ${BINDINGS_DIR}/python)
-+  set (PYTHON_SITEARCH_PACKAGES ${BINDINGS_DIR}/python CACHE INTERNAL "")
- 
-   install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile cproton.py
-                                 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
--- 
-1.9.3
-
diff --git a/qpid-proton-format.patch b/qpid-proton-format.patch
new file mode 100644
index 0000000..a3a894d
--- /dev/null
+++ b/qpid-proton-format.patch
@@ -0,0 +1,11 @@
+--- qpid-proton-0.31.0/CMakeLists.txt.orig	2020-05-07 16:57:23.000000000 +0200
++++ qpid-proton-0.31.0/CMakeLists.txt	2020-05-26 22:29:21.525675340 +0200
+@@ -140,7 +140,7 @@
+   endif (ENABLE_WARNING_ERROR)
+   set (COMPILE_WARNING_FLAGS "${WERROR} -Wall -pedantic-errors")
+   # C++ allow "%z" format specifier and variadic macros
+-  set (CXX_WARNING_FLAGS "${COMPILE_WARNING_FLAGS} -Wno-format -Wno-variadic-macros")
++  set (CXX_WARNING_FLAGS "${COMPILE_WARNING_FLAGS} -Wno-variadic-macros")
+   if (NOT BUILD_WITH_CXX)
+     set (COMPILE_WARNING_FLAGS "${COMPILE_WARNING_FLAGS} -Wstrict-prototypes -Wc++-compat -Wvla -Wsign-compare -Wwrite-strings")
+     set (COMPILE_LANGUAGE_FLAGS "-std=c99")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qpid-proton.git/commitdiff/6af9bd5856db2cb4695a9219d848a40af0c1ada0



More information about the pld-cvs-commit mailing list