From b750ab6d668fff2ed5242e57733e3f3213614993 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 10:33:06 +0100 Subject: [PATCH] added python subpackage [release 3.12.4-2mamba;Sun Jan 31 2021] --- protobuf.spec | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/protobuf.spec b/protobuf.spec index 4eec76d..95468b0 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -1,6 +1,6 @@ Name: protobuf Version: 3.12.4 -Release: 1mamba +Release: 2mamba Summary: A way of encoding structured data in an efficient yet extensible format Group: Development/Tools Vendor: openmamba @@ -8,7 +8,6 @@ Distribution: openmamba Packager: Ercole 'ercolinux' Carpanetto URL: http://code.google.com/p/protobuf/ Source: https://github.com/google/protobuf.git/v%{version}/protobuf-%{version}.tar.bz2 -#Source: http://protobuf.googlecode.com/files/protobuf-%{version}.tar.bz2 License: BSD BuildRoot: %{_tmppath}/%{name}-%{version}-root ## AUTOBUILDREQ-BEGIN @@ -16,6 +15,7 @@ BuildRequires: glibc-devel BuildRequires: libgcc BuildRequires: libstdc++6-devel BuildRequires: libz-devel +BuildRequires: python3 ## AUTOBUILDREQ-END Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} @@ -38,15 +38,23 @@ Provides: protobuf-devel Obsoletes: protobuf-devel %description -n lib%{name}-devel -This package contains static libraries and header files need for development of Protocol Buffer +This package contains static libraries and header files needed for development of Protocol Buffer + +%package -n python-%{name} +Summary: Python bindings for %{name} +Group: System/Libraries/Python +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description -n python-%{name} +This package contains the python bindings to %{protobuf} library. %debug_package %prep %setup -q +./autogen.sh %build -./autogen.sh %configure %make \ @@ -54,10 +62,23 @@ This package contains static libraries and header files need for development of LDFLAGS="-latomic" %endif +cd python +CFLAGS="%{optflags}" %{__python3} setup.py build + %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall +cd python +%{__python3} setup.py install \ + -O1 --skip-build \ + --root="%{buildroot}" \ + --install-headers=%{python3_inc} \ + --install-lib=%{python3_sitearch} \ + --record=%{name}.filelist + +sed -i "s,.*/man/.*,&.gz," %{name}.filelist + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -86,7 +107,13 @@ LDFLAGS="-latomic" %{_libdir}/libprotoc.so %{_libdir}/pkgconfig/protobuf*.pc +%files -n python-%{name} -f python/%{name}.filelist +%defattr(-,root,root) + %changelog +* Sun Jan 31 2021 Silvan Calarco 3.12.4-2mamba +- added python subpackage + * Thu Aug 06 2020 Automatic Build System 3.12.4-1mamba - automatic version update by autodist