From 3eaf67aa2cf9077adbce976f3cd0318b903be113 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Wed, 7 Sep 2022 17:53:58 +0800 Subject: [PATCH] alvistack/v3.21.5 git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See https://github.com/protocolbuffers/protobuf/issues/5144#issuecomment-688723405 See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison --- .gitignore | 9 + cmake/libprotobuf-lite.cmake | 1 - cmake/libprotobuf.cmake | 1 - cmake/libprotoc.cmake | 1 - debian/.gitignore | 13 + debian/changelog | 5 + debian/control | 107 ++++++++ debian/copyright | 0 debian/libprotobuf-dev.install | 5 + debian/libprotobuf-dev.lintian-overrides | 3 + debian/libprotobuf-lite32.install | 1 + debian/libprotobuf-lite32.lintian-overrides | 4 + debian/libprotobuf32.install | 1 + debian/libprotobuf32.lintian-overrides | 4 + debian/libprotoc-dev.install | 2 + debian/libprotoc-dev.lintian-overrides | 3 + debian/libprotoc32.install | 1 + debian/libprotoc32.lintian-overrides | 4 + debian/protobuf-compiler.install | 1 + debian/protobuf-compiler.lintian-overrides | 4 + debian/python3-protobuf.install | 1 + debian/python3-protobuf.lintian-overrides | 4 + debian/rules | 66 +++++ debian/source/format | 1 + debian/source/lintian-overrides | 6 + protobuf.spec | 278 ++++++++++++++++++++ src/Makefile.am | 8 +- src/libprotobuf-lite.map | 2 + src/libprotobuf.map | 2 + src/libprotoc.map | 2 + 30 files changed, 533 insertions(+), 7 deletions(-) create mode 100644 debian/.gitignore create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/libprotobuf-dev.install create mode 100644 debian/libprotobuf-dev.lintian-overrides create mode 100644 debian/libprotobuf-lite32.install create mode 100644 debian/libprotobuf-lite32.lintian-overrides create mode 100644 debian/libprotobuf32.install create mode 100644 debian/libprotobuf32.lintian-overrides create mode 100644 debian/libprotoc-dev.install create mode 100644 debian/libprotoc-dev.lintian-overrides create mode 100644 debian/libprotoc32.install create mode 100644 debian/libprotoc32.lintian-overrides create mode 100644 debian/protobuf-compiler.install create mode 100644 debian/protobuf-compiler.lintian-overrides create mode 100644 debian/python3-protobuf.install create mode 100644 debian/python3-protobuf.lintian-overrides create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/lintian-overrides create mode 100644 protobuf.spec diff --git a/.gitignore b/.gitignore index 62de6f1bf9fb..19a67cebd19e 100644 --- a/.gitignore +++ b/.gitignore @@ -215,3 +215,12 @@ BenchmarkDotNet.Artifacts/ # Clangd uses these common ephemeral files .cache compile_commands.json + +src/*.a +src/*.so* +src/CMakeCache.txt +src/CMakeFiles/ +src/cmake_install.cmake +src/install_manifest.txt +src/lib/ +src/protoc-* diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake index 83e970312c40..05e13c1fe956 100644 --- a/cmake/libprotobuf-lite.cmake +++ b/cmake/libprotobuf-lite.cmake @@ -112,7 +112,6 @@ if(protobuf_BUILD_SHARED_LIBS) endif() set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} - SOVERSION 32 OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite) diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake index 07e4bcf57fac..d37c1ccad747 100644 --- a/cmake/libprotobuf.cmake +++ b/cmake/libprotobuf.cmake @@ -128,7 +128,6 @@ if(protobuf_BUILD_SHARED_LIBS) endif() set_target_properties(libprotobuf PROPERTIES VERSION ${protobuf_VERSION} - SOVERSION 32 OUTPUT_NAME ${LIB_PREFIX}protobuf DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") add_library(protobuf::libprotobuf ALIAS libprotobuf) diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake index 15a47e53fa18..d43b5dffab49 100644 --- a/cmake/libprotoc.cmake +++ b/cmake/libprotoc.cmake @@ -130,7 +130,6 @@ endif() set_target_properties(libprotoc PROPERTIES COMPILE_DEFINITIONS LIBPROTOC_EXPORTS VERSION ${protobuf_VERSION} - SOVERSION 32 OUTPUT_NAME ${LIB_PREFIX}protoc DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") add_library(protobuf::libprotoc ALIAS libprotoc) diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 000000000000..cefb2ec10cae --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,13 @@ +*.substvars +*debhelper* +.debhelper +autoreconf.* +files +libprotobuf-dev +libprotobuf-lite32 +libprotobuf32 +libprotoc-dev +libprotoc32 +protobuf-compiler +python3-protobuf +tmp diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000000..961d8073c4dc --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +protobuf (100:3.21.5-1) UNRELEASED; urgency=medium + + * https://github.com/protocolbuffers/protobuf/releases/tag/v3.21.5 + + -- Wong Hoi Sing Edison Sat, 03 Sep 2022 18:01:15 +0800 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000000..08a57a52007e --- /dev/null +++ b/debian/control @@ -0,0 +1,107 @@ +Source: protobuf +Section: devel +Priority: optional +Standards-Version: 4.5.0 +Maintainer: Wong Hoi Sing Edison +Homepage: https://github.com/protocolbuffers/protobuf/tags +Vcs-Browser: https://github.com/alvistack/protocolbuffers-protobuf +Vcs-Git: https://github.com/alvistack/protocolbuffers-protobuf.git +Build-Depends: + debhelper, + debhelper-compat (= 10), + dh-python, + fdupes, + cmake, + python3-dev, + python3-setuptools, + zlib1g-dev, + +Package: libprotobuf32 +Architecture: any +Section: libs +Description: protocol buffers C++ library + This package contains the runtime library needed for C++ applications. +Depends: + ${misc:Depends}, + ${shlibs:Depends}, +Breaks: + cura-engine (<< 1:3.3.0-2.1+b1), + libarcus3 (<< 3.3.0-2), + +Package: libprotobuf-lite32 +Architecture: any +Section: libs +Description: protocol buffers C++ library (lite version) + This package contains the runtime library needed for C++ applications whose + message definitions have the "lite runtime" optimization setting. +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + +Package: libprotobuf-dev +Architecture: any +Section: libdevel +Description: protocol buffers C++ library (development files) and proto files + This package contains the development headers and static libraries needed for + writing C++ applications. Includes well known proto type files. +Depends: + ${misc:Depends}, + zlib1g-dev, + libprotobuf32 (= ${source:Version}), + libprotobuf-lite32 (= ${source:Version}), +Breaks: + protobuf-compiler (<< ${source:Version}), + protobuf-compiler (>> ${source:Version}), +Provides: + protobuf-api-32-0, + +Package: libprotoc32 +Architecture: any +Multi-Arch: same +Section: libs +Description: protocol buffers compiler library + This package contains the runtime library needed for the protocol buffer + compiler. +Depends: + ${shlibs:Depends}, + ${misc:Depends}, + +Package: libprotoc-dev +Architecture: any +Section: libdevel +Description: protocol buffers compiler library (development files) + This package contains the development headers and static library needed for + writing protobuf compilers. +Depends: + ${misc:Depends}, + libprotobuf-dev (= ${source:Version}), + libprotoc32 (= ${source:Version}), +Replaces: + libprotobuf-dev (<< 2.1.0), +Breaks: + libprotobuf-dev (<< 2.1.0), + +Package: protobuf-compiler +Architecture: any +Description: compiler for protocol buffer definition files + This package contains the protocol buffer compiler that is used for + translating from .proto files (containing the definitions) to the language + binding for the supported languages. +Depends: + ${shlibs:Depends}, + ${misc:Depends}, + libprotoc32 (= ${binary:Version}), + +Package: python3-protobuf +Architecture: any +Section: python +Description: Python 3 bindings for protocol buffers + This package contains the Python 3 bindings for the protocol buffers. You will + need the protoc tool (in the protobuf-compiler package) to compile your + definition to Python classes, and then the modules in this package will allow + you to use those classes in your programs. +Depends: + ${misc:Depends}, + ${python3:Depends}, + ${shlibs:Depends}, + python3, diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/debian/libprotobuf-dev.install b/debian/libprotobuf-dev.install new file mode 100644 index 000000000000..5b5f43fb60b3 --- /dev/null +++ b/debian/libprotobuf-dev.install @@ -0,0 +1,5 @@ +usr/include +usr/lib/*/cmake +usr/lib/*/libprotobuf-lite.so +usr/lib/*/libprotobuf.so +usr/lib/*/pkgconfig/* diff --git a/debian/libprotobuf-dev.lintian-overrides b/debian/libprotobuf-dev.lintian-overrides new file mode 100644 index 000000000000..30fd66a144cf --- /dev/null +++ b/debian/libprotobuf-dev.lintian-overrides @@ -0,0 +1,3 @@ +libprotobuf-dev: copyright-without-copyright-notice +libprotobuf-dev: initial-upload-closes-no-bugs +libprotobuf-dev: zero-byte-file-in-doc-directory diff --git a/debian/libprotobuf-lite32.install b/debian/libprotobuf-lite32.install new file mode 100644 index 000000000000..45e00546a30a --- /dev/null +++ b/debian/libprotobuf-lite32.install @@ -0,0 +1 @@ +usr/lib/*/libprotobuf-lite.so.* diff --git a/debian/libprotobuf-lite32.lintian-overrides b/debian/libprotobuf-lite32.lintian-overrides new file mode 100644 index 000000000000..499fad073392 --- /dev/null +++ b/debian/libprotobuf-lite32.lintian-overrides @@ -0,0 +1,4 @@ +libprotobuf-lite32: copyright-without-copyright-notice +libprotobuf-lite32: initial-upload-closes-no-bugs +libprotobuf-lite32: package-name-doesnt-match-sonames +libprotobuf-lite32: zero-byte-file-in-doc-directory diff --git a/debian/libprotobuf32.install b/debian/libprotobuf32.install new file mode 100644 index 000000000000..9ac8d247dccb --- /dev/null +++ b/debian/libprotobuf32.install @@ -0,0 +1 @@ +usr/lib/*/libprotobuf.so.* diff --git a/debian/libprotobuf32.lintian-overrides b/debian/libprotobuf32.lintian-overrides new file mode 100644 index 000000000000..eb338d3a4c48 --- /dev/null +++ b/debian/libprotobuf32.lintian-overrides @@ -0,0 +1,4 @@ +libprotobuf32: copyright-without-copyright-notice +libprotobuf32: initial-upload-closes-no-bugs +libprotobuf32: package-name-doesnt-match-sonames +libprotobuf32: zero-byte-file-in-doc-directory diff --git a/debian/libprotoc-dev.install b/debian/libprotoc-dev.install new file mode 100644 index 000000000000..899bb85fe3b0 --- /dev/null +++ b/debian/libprotoc-dev.install @@ -0,0 +1,2 @@ +usr/include/google/protobuf/compiler +usr/lib/*/libprotoc.so diff --git a/debian/libprotoc-dev.lintian-overrides b/debian/libprotoc-dev.lintian-overrides new file mode 100644 index 000000000000..f90c4d60db90 --- /dev/null +++ b/debian/libprotoc-dev.lintian-overrides @@ -0,0 +1,3 @@ +libprotoc-dev: copyright-without-copyright-notice +libprotoc-dev: initial-upload-closes-no-bugs +libprotoc-dev: zero-byte-file-in-doc-directory diff --git a/debian/libprotoc32.install b/debian/libprotoc32.install new file mode 100644 index 000000000000..a28013348f3f --- /dev/null +++ b/debian/libprotoc32.install @@ -0,0 +1 @@ +usr/lib/*/libprotoc*.so.* diff --git a/debian/libprotoc32.lintian-overrides b/debian/libprotoc32.lintian-overrides new file mode 100644 index 000000000000..19933fd80ca8 --- /dev/null +++ b/debian/libprotoc32.lintian-overrides @@ -0,0 +1,4 @@ +libprotoc32: copyright-without-copyright-notice +libprotoc32: initial-upload-closes-no-bugs +libprotoc32: package-name-doesnt-match-sonames +libprotoc32: zero-byte-file-in-doc-directory diff --git a/debian/protobuf-compiler.install b/debian/protobuf-compiler.install new file mode 100644 index 000000000000..1df36c612fb7 --- /dev/null +++ b/debian/protobuf-compiler.install @@ -0,0 +1 @@ +usr/bin/* diff --git a/debian/protobuf-compiler.lintian-overrides b/debian/protobuf-compiler.lintian-overrides new file mode 100644 index 000000000000..6f8cc4457901 --- /dev/null +++ b/debian/protobuf-compiler.lintian-overrides @@ -0,0 +1,4 @@ +protobuf-compiler: copyright-without-copyright-notice +protobuf-compiler: initial-upload-closes-no-bugs +protobuf-compiler: no-manual-page +protobuf-compiler: zero-byte-file-in-doc-directory diff --git a/debian/python3-protobuf.install b/debian/python3-protobuf.install new file mode 100644 index 000000000000..e3da3e75536a --- /dev/null +++ b/debian/python3-protobuf.install @@ -0,0 +1 @@ +usr/lib/python*/*-packages/* diff --git a/debian/python3-protobuf.lintian-overrides b/debian/python3-protobuf.lintian-overrides new file mode 100644 index 000000000000..83767c0cd5bc --- /dev/null +++ b/debian/python3-protobuf.lintian-overrides @@ -0,0 +1,4 @@ +python3-protobuf: copyright-without-copyright-notice +python3-protobuf: initial-upload-closes-no-bugs +python3-protobuf: shared-library-lacks-prerequisites +python3-protobuf: zero-byte-file-in-doc-directory diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000000..dd2f9ad73c99 --- /dev/null +++ b/debian/rules @@ -0,0 +1,66 @@ +#!/usr/bin/make -f + +SHELL := /bin/bash + +PYTHON3_PROTOBUF_VERSION = 100:4.21.5-1 + +override_dh_autoreconf: + +override_dh_auto_configure: + pushd src && \ + cmake \ + ../cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -Dprotobuf_BUILD_LIBPROTOC=ON \ + -Dprotobuf_BUILD_PROTOC_BINARIES=ON \ + -Dprotobuf_BUILD_SHARED_LIBS=ON \ + -Dprotobuf_BUILD_TESTS=OFF && \ + popd + +override_dh_auto_build: + pushd src && \ + cmake \ + --build . \ + --parallel 10 \ + --config Release && \ + popd + mkdir -p src/.libs + pushd src/.libs && \ + ln -fs ../*.so* . && \ + popd + pushd python && \ + python3 setup.py build \ + --cpp_implementation && \ + popd + +override_dh_auto_install: + pushd src && \ + export DESTDIR=../debian/tmp && \ + cmake \ + --install . && \ + popd + pushd python && \ + python3 setup.py install \ + --cpp_implementation \ + --no-compile \ + --install-layout=deb \ + --root=../debian/tmp && \ + popd + find debian/tmp/usr/lib/python*/*-packages -type f -name '*.pyc' -exec rm -rf {} \; + fdupes -qnrps debian/tmp/usr/lib/python*/*-packages + +override_dh_install: + dh_install + rm -rf debian/libprotobuf-dev/usr/include/google/protobuf/compiler + +override_dh_gencontrol: + dh_gencontrol + dh_gencontrol -ppython3-protobuf -- -v$(PYTHON3_PROTOBUF_VERSION) + +override_dh_auto_test: + +override_dh_auto_clean: + +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000000..163aaf8d82b6 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 000000000000..e3178ff6c4d8 --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,6 @@ +protobuf source: configure-generated-file-in-source +protobuf source: dependency-is-not-multi-archified +protobuf source: no-debian-changes +protobuf source: not-binnmuable-any-depends-any +protobuf source: python3-depends-but-no-python3-helper +protobuf source: weak-library-dev-dependency diff --git a/protobuf.spec b/protobuf.spec new file mode 100644 index 000000000000..8820e9e90b95 --- /dev/null +++ b/protobuf.spec @@ -0,0 +1,278 @@ +%global debug_package %{nil} + +Name: protobuf +Epoch: 100 +Version: 3.21.5 +Release: 1%{?dist} +Summary: Protocol Buffers - Google's data interchange format +License: BSD-3-Clause +URL: https://github.com/protocolbuffers/protobuf/tags +Source0: %{name}_%{version}.orig.tar.gz +BuildRequires: cmake +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: python-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: zlib-devel + +%description +Protocol Buffers are a way of encoding structured data in an efficient yet +extensible format. Google uses Protocol Buffers for almost all of its internal +RPC protocols and file formats. + +%prep +%autosetup -T -c -n %{name}_%{version}-%{release} +tar -zx -f %{S:0} --strip-components=1 -C . + +%build +pushd src && \ + cmake \ + ../cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -Dprotobuf_BUILD_LIBPROTOC=ON \ + -Dprotobuf_BUILD_PROTOC_BINARIES=ON \ + -Dprotobuf_BUILD_SHARED_LIBS=ON \ + -Dprotobuf_BUILD_TESTS=OFF && \ +popd +pushd src && \ + cmake \ + --build . \ + --parallel 10 \ + --config Release && \ +popd +mkdir -p src/.libs +pushd src/.libs && \ + ln -fs ../*.so* . && \ +popd +pushd python && \ + python3 setup.py build \ + --cpp_implementation && \ +popd + +%install +pushd src && \ + export DESTDIR=%{buildroot} && \ + cmake \ + --install . && \ +popd +pushd python && \ + python3 setup.py install \ + --cpp_implementation \ + --no-compile \ + --root=%{buildroot} && \ +popd +find %{buildroot}%{python3_sitearch} -type f -name '*.pyc' -exec rm -rf {} \; +fdupes -qnrps %{buildroot}%{python3_sitearch} + +%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150000 +%package -n libprotobuf3_21_5_0 +Summary: Protocol Buffers - Google's data interchange format + +%description -n libprotobuf3_21_5_0 +Protocol Buffers are a way of encoding structured data in an efficient +yet extensible format. Google uses Protocol Buffers for almost all of +its internal RPC protocols and file formats. + +%package -n libprotoc3_21_5_0 +Summary: Protocol Buffers - Google's data interchange format + +%description -n libprotoc3_21_5_0 +Protocol Buffers are a way of encoding structured data in an efficient +yet extensible format. Google uses Protocol Buffers for almost all of +its internal RPC protocols and file formats. + +%package -n libprotobuf-lite3_21_5_0 +Summary: Protocol Buffers - Google's data interchange format + +%description -n libprotobuf-lite3_21_5_0 +Protocol Buffers are a way of encoding structured data in an efficient +yet extensible format. Google uses Protocol Buffers for almost all of +its internal RPC protocols and file formats. + +%package -n protobuf-devel +Summary: Header files, libraries and development documentation for %{name} +Requires: gcc-c++ +Requires: libprotobuf-lite3_21_5_0 = %{epoch}:%{version}-%{release} +Requires: libprotobuf3_21_5_0 = %{epoch}:%{version}-%{release} +Requires: pkgconfig(zlib) +Provides: libprotobuf-devel = %{epoch}:%{version}-%{release} +Conflicts: protobuf2-devel + +%description -n protobuf-devel +Protocol Buffers are a way of encoding structured data in an efficient yet +extensible format. Google uses Protocol Buffers for almost all of its internal +RPC protocols and file formats. + +%if 0%{?suse_version} > 1500 +%package -n python%{python3_version_nodots}-protobuf +Epoch: 100 +Version: 4.21.5 +Release: 1%{?dist} +Summary: Python3 Bindings for Google Protocol Buffers +Requires: python3 +Provides: python3-protobuf = %{epoch}:%{version}-%{release} +Provides: python3dist(protobuf) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-protobuf = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(protobuf) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-protobuf = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(protobuf) = %{epoch}:%{version}-%{release} + +%description -n python%{python3_version_nodots}-protobuf +This package contains the Python bindings for Google Protocol Buffers. +%endif + +%if 0%{?sle_version} > 150000 +%package -n python3-protobuf +Epoch: 100 +Version: 4.21.5 +Release: 1%{?dist} +Summary: Python3 Bindings for Google Protocol Buffers +Requires: python3 +Provides: python3-protobuf = %{epoch}:%{version}-%{release} +Provides: python3dist(protobuf) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-protobuf = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(protobuf) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-protobuf = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(protobuf) = %{epoch}:%{version}-%{release} + +%description -n python3-protobuf +This package contains the Python bindings for Google Protocol Buffers. +%endif + +%post -n libprotobuf3_21_5_0 -p /sbin/ldconfig +%postun -n libprotobuf3_21_5_0 -p /sbin/ldconfig +%post -n libprotoc3_21_5_0 -p /sbin/ldconfig +%postun -n libprotoc3_21_5_0 -p /sbin/ldconfig +%post -n libprotobuf-lite3_21_5_0 -p /sbin/ldconfig +%postun -n libprotobuf-lite3_21_5_0 -p /sbin/ldconfig + +%files -n libprotobuf3_21_5_0 +%license LICENSE +%{_libdir}/libprotobuf.so.* + +%files -n libprotoc3_21_5_0 +%{_libdir}/libprotoc.so.* + +%files -n libprotobuf-lite3_21_5_0 +%{_libdir}/libprotobuf-lite.so.* + +%files -n protobuf-devel +%dir %{_includedir}/google +%dir %{_libdir}/cmake +%dir %{_libdir}/cmake/protobuf +%{_bindir}/* +%{_includedir}/google/protobuf/ +%{_libdir}/cmake/protobuf/*.cmake +%{_libdir}/libprotobuf-lite.so +%{_libdir}/libprotobuf.so +%{_libdir}/libprotoc.so +%{_libdir}/pkgconfig/protobuf-lite.pc +%{_libdir}/pkgconfig/protobuf.pc + +%if 0%{?suse_version} > 1500 +%files -n python%{python3_version_nodots}-protobuf +%license LICENSE +%{python3_sitearch}/* +%endif + +%if 0%{?sle_version} > 150000 +%files -n python3-protobuf +%license LICENSE +%{python3_sitearch}/* +%endif +%endif + +%if !(0%{?suse_version} > 1500) && !(0%{?sle_version} > 150000) +%package -n protobuf-compiler +Summary: Protocol Buffers compiler +Requires: protobuf = %{epoch}:%{version}-%{release} + +%description -n protobuf-compiler +This package contains Protocol Buffers compiler for all programming +languages + +%package -n protobuf-devel +Summary: Protocol Buffers C++ headers and libraries +Requires: protobuf = %{epoch}:%{version}-%{release} +Requires: protobuf-compiler = %{epoch}:%{version}-%{release} +Requires: zlib-devel +Requires: pkgconfig + +%description -n protobuf-devel +This package contains Protocol Buffers compiler for all languages and +C++ headers and libraries + +%package -n protobuf-lite +Summary: Protocol Buffers LITE_RUNTIME libraries + +%description -n protobuf-lite +Protocol Buffers built with optimize_for = LITE_RUNTIME. + +%package -n protobuf-lite-devel +Summary: Protocol Buffers LITE_RUNTIME development libraries +Requires: protobuf-devel = %{epoch}:%{version}-%{release} +Requires: protobuf-lite = %{epoch}:%{version}-%{release} + +%description -n protobuf-lite-devel +This package contains development libraries built with optimize_for = +LITE_RUNTIME. + +%package -n python3-protobuf +Epoch: 100 +Version: 4.21.5 +Release: 1%{?dist} +Summary: Python 3 bindings for Google Protocol Buffers +Requires: python3-six >= 1.9 +Requires: protobuf = %{epoch}:%{version}-%{release} +Provides: python3-protobuf = %{epoch}:%{version}-%{release} +Provides: python3dist(protobuf) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-protobuf = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(protobuf) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-protobuf = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(protobuf) = %{epoch}:%{version}-%{release} +Conflicts: protobuf-compiler > %{version} +Conflicts: protobuf-compiler < %{version} + +%description -n python3-protobuf +This package contains Python 3 libraries for Google Protocol Buffers + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig +%post -n protobuf-compiler -p /sbin/ldconfig +%postun -n protobuf-compiler -p /sbin/ldconfig +%post -n protobuf-lite -p /sbin/ldconfig +%postun -n protobuf-lite -p /sbin/ldconfig + +%files +%license LICENSE +%{_libdir}/libprotobuf.so.* + +%files -n protobuf-compiler +%{_bindir}/* +%{_libdir}/libprotoc.so.* + +%files -n protobuf-devel +%dir %{_includedir}/google +%dir %{_libdir}/cmake +%dir %{_libdir}/cmake/protobuf +%{_includedir}/google/protobuf/ +%{_libdir}/cmake/protobuf/*.cmake +%{_libdir}/libprotobuf.so +%{_libdir}/libprotoc.so +%{_libdir}/pkgconfig/protobuf.pc + +%files -n protobuf-lite +%{_libdir}/libprotobuf-lite.so.* + +%files -n protobuf-lite-devel +%{_libdir}/libprotobuf-lite.so +%{_libdir}/pkgconfig/protobuf-lite.pc + +%files -n python3-protobuf +%{python3_sitearch}/* +%endif + +%changelog diff --git a/src/Makefile.am b/src/Makefile.am index e6a7dc7fdddb..06cdc3b30426 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,7 +18,7 @@ else PTHREAD_DEF = endif -PROTOBUF_VERSION = 32:5:0 +PROTOBUF_VERSION = 3.21.5 if GCC # Turn on all warnings except for sign comparison (we ignore sign comparison @@ -188,7 +188,7 @@ nobase_include_HEADERS = \ lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) -libprotobuf_lite_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined +libprotobuf_lite_la_LDFLAGS = -release $(PROTOBUF_VERSION) -export-dynamic -no-undefined if HAVE_LD_VERSION_SCRIPT libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map @@ -235,7 +235,7 @@ libprotobuf_lite_la_SOURCES = \ google/protobuf/wire_format_lite.cc libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) -libprotobuf_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined +libprotobuf_la_LDFLAGS = -release $(PROTOBUF_VERSION) -export-dynamic -no-undefined if HAVE_LD_VERSION_SCRIPT libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map @@ -320,7 +320,7 @@ libprotobuf_la_SOURCES = \ nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES) libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la -libprotoc_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined +libprotoc_la_LDFLAGS = -release $(PROTOBUF_VERSION) -export-dynamic -no-undefined if HAVE_LD_VERSION_SCRIPT libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map diff --git a/src/libprotobuf-lite.map b/src/libprotobuf-lite.map index 391554669481..a1853ca6cbf2 100644 --- a/src/libprotobuf-lite.map +++ b/src/libprotobuf-lite.map @@ -3,6 +3,8 @@ extern "C++" { *google*; }; + scc_info_*; + descriptor_table_*; local: *; diff --git a/src/libprotobuf.map b/src/libprotobuf.map index 391554669481..a1853ca6cbf2 100644 --- a/src/libprotobuf.map +++ b/src/libprotobuf.map @@ -3,6 +3,8 @@ extern "C++" { *google*; }; + scc_info_*; + descriptor_table_*; local: *; diff --git a/src/libprotoc.map b/src/libprotoc.map index 391554669481..a1853ca6cbf2 100644 --- a/src/libprotoc.map +++ b/src/libprotoc.map @@ -3,6 +3,8 @@ extern "C++" { *google*; }; + scc_info_*; + descriptor_table_*; local: *;