added python 3.10 subpackage [release 21.12-2mamba;Tue Jul 04 2023]

This commit is contained in:
Silvan Calarco 2024-01-06 10:33:07 +01:00
parent 684ce7a1c7
commit d75e092961

View File

@ -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 <silvan.calarco@mambasoft.it> 21.12-2mamba
- added python 3.10 subpackage
* Sat Dec 17 2022 Automatic Build System <autodist@mambasoft.it> 21.12-1mamba
- automatic version update by autodist