From d75e092961d0f42fb0d491023dce5d6dfd2863b8 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 10:33:07 +0100 Subject: [PATCH] added python 3.10 subpackage [release 21.12-2mamba;Tue Jul 04 2023] --- protobuf.spec | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/protobuf.spec b/protobuf.spec index c6c4db5..c2f970b 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -1,6 +1,6 @@ Name: protobuf Version: 21.12 -Release: 1mamba +Release: 2mamba Summary: A way of encoding structured data in an efficient yet extensible format Group: Development/Tools Vendor: openmamba @@ -13,6 +13,7 @@ License: BSD BuildRequires: glibc-devel BuildRequires: libgcc BuildRequires: libpython3-devel +BuildRequires: libpython310-devel BuildRequires: libstdc++6-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END @@ -40,20 +41,34 @@ Obsoletes: protobuf-devel < 3.17.0 %description -n lib%{name}-devel This package contains static libraries and header files needed for development of Protocol Buffer -%package -n python-%{name} +%package -n python-%{name}-py3 +Summary: Python bindings for %{name} +Group: System/Libraries/Python +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} +Provides: python-protobuf +Obsoletes: python-protobuf <= 21.12-1mamba + +%description -n python-%{name}-py3 +This package contains the python bindings to %{protobuf} library. + +%package -n python-%{name}-py310 Summary: Python bindings for %{name} Group: System/Libraries/Python Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} -%description -n python-%{name} +%description -n python-%{name}-py310 This package contains the python bindings to %{protobuf} library. %debug_package %prep %setup -q +#-D -T +#:<< _EOF ./autogen.sh +cp -a python python310 + %build %configure @@ -65,6 +80,9 @@ LDFLAGS="-latomic" cd python CFLAGS="%{optflags}" %{__python3} setup.py build +cd ../python310 +CFLAGS="%{optflags}" %{__python310} setup.py build + %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall @@ -79,6 +97,16 @@ cd python sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist +cd ../python310 +%{__python310} setup.py install \ + -O1 --skip-build \ + --root="%{buildroot}" \ + --install-headers=%{python310_inc} \ + --install-lib=%{python310_sitearch} \ + --record=%{name}.filelist + +sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -105,12 +133,20 @@ sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist %{_libdir}/libprotoc.so %{_libdir}/pkgconfig/protobuf*.pc -%files -n python-%{name} -f python/%{name}.filelist +%files -n python-%{name}-py3 -f python/%{name}.filelist %defattr(-,root,root) %dir %{python3_sitearch}/protobuf-*-py*.egg-info %{python3_sitearch}/protobuf-*-py*.egg-info/* +%files -n python-%{name}-py310 -f python310/%{name}.filelist +%defattr(-,root,root) +%dir %{python310_sitearch}/protobuf-*-py*.egg-info +%{python310_sitearch}/protobuf-*-py*.egg-info/* + %changelog +* Tue Jul 04 2023 Silvan Calarco 21.12-2mamba +- added python 3.10 subpackage + * Sat Dec 17 2022 Automatic Build System 21.12-1mamba - automatic version update by autodist