diff --git a/README.md b/README.md index d410891..587aa0f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # protobuf28 +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. + diff --git a/protobuf-24.3-upstream-fix-Protobuf_PROTOC_EXECUTABLE.patch b/protobuf-24.3-upstream-fix-Protobuf_PROTOC_EXECUTABLE.patch new file mode 100644 index 0000000..b632039 --- /dev/null +++ b/protobuf-24.3-upstream-fix-Protobuf_PROTOC_EXECUTABLE.patch @@ -0,0 +1,25 @@ +From 2e62ef1eaa2e712afc5f87aa2c55d478fe96230d Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Wed, 5 Jul 2023 13:03:11 +0200 +Subject: [PATCH] Handle BUILD_TYPE=None in protobuf-module.cmake + +Fixes Protobuf_PROTOC_EXECUTABLE being undefined in that case. +--- + cmake/protobuf-module.cmake.in | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/cmake/protobuf-module.cmake.in b/cmake/protobuf-module.cmake.in +index 0bb05e38fad..e5b2b2e4b3a 100644 +--- a/cmake/protobuf-module.cmake.in ++++ b/cmake/protobuf-module.cmake.in +@@ -153,6 +153,10 @@ if(NOT Protobuf_PROTOC_EXECUTABLE AND TARGET protobuf::protoc) + get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc + IMPORTED_LOCATION_NOCONFIG) + endif() ++ if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}") ++ get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc ++ IMPORTED_LOCATION_NONE) ++ endif() + endif() + + # Version info variable diff --git a/protobuf-25.3-soversion.patch b/protobuf-25.3-soversion.patch new file mode 100644 index 0000000..7e1b42d --- /dev/null +++ b/protobuf-25.3-soversion.patch @@ -0,0 +1,36 @@ +diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake +index 9b1de677b4f..276c99c489e 100644 +--- a/cmake/libprotobuf-lite.cmake ++++ b/cmake/libprotobuf-lite.cmake +@@ -30,6 +30,7 @@ if(protobuf_BUILD_SHARED_LIBS) + endif() + set_target_properties(libprotobuf-lite PROPERTIES + VERSION ${protobuf_VERSION} ++ SOVERSION ${protobuf_VERSION_MINOR} + 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 aa3efc9a68a..0f34d20b97d 100644 +--- a/cmake/libprotobuf.cmake ++++ b/cmake/libprotobuf.cmake +@@ -33,6 +33,7 @@ if(protobuf_BUILD_SHARED_LIBS) + endif() + set_target_properties(libprotobuf PROPERTIES + VERSION ${protobuf_VERSION} ++ SOVERSION ${protobuf_VERSION_MINOR} + 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 72b4a1abb92..91e8bbeb04e 100644 +--- a/cmake/libprotoc.cmake ++++ b/cmake/libprotoc.cmake +@@ -24,6 +24,7 @@ endif() + set_target_properties(libprotoc PROPERTIES + COMPILE_DEFINITIONS LIBPROTOC_EXPORTS + VERSION ${protobuf_VERSION} ++ SOVERSION ${protobuf_VERSION_MINOR} + OUTPUT_NAME ${LIB_PREFIX}protoc + DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") + add_library(protobuf::libprotoc ALIAS libprotoc) diff --git a/protobuf28.spec b/protobuf28.spec new file mode 100644 index 0000000..4c3e29b --- /dev/null +++ b/protobuf28.spec @@ -0,0 +1,332 @@ +Name: protobuf28 +Version: 28.3 +Release: 2mamba +Summary: A way of encoding structured data in an efficient yet extensible format +Group: Development/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://protobuf.dev/ +Source: https://github.com/protocolbuffers/protobuf.git/v%{version}/protobuf-%{version}.tar.bz2 +Patch1: protobuf-24.3-upstream-fix-Protobuf_PROTOC_EXECUTABLE.patch +Patch2: protobuf-25.3-soversion.patch +License: BSD +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libabseil-cpp-devel +BuildRequires: libgcc +BuildRequires: libprotobuf-devel +BuildRequires: libstdc++6-devel +BuildRequires: libz-devel +## AUTOBUILDREQ-END +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} + +%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. + +%package -n lib%{name} +Group: System/Libraries +Summary: Shared libraries for %{name} + +%description -n lib%{name} +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. +This package contains shared libraries for %{name}. + +%package -n lib%{name}-devel +Summary: Devel package for %{name} +Group: Development/Libraries +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description -n lib%{name}-devel +This package contains static libraries and header files needed for development of Protocol Buffer + +%global _lto_cflags %{nil} + +%prep +%setup -q -n protobuf-%{version} +#-D -T +#:<< _EOF + +%patch 1 -p1 -F2 -b .upstream-fix-Protobuf_PROTOC_EXECUTABLE +%patch 2 -p1 -F2 -b .soversion + +%build +%cmake \ + -Dprotobuf_BUILD_SHARED_LIBS=ON \ + -Dprotobuf_USE_EXTERNAL_GTEST=ON \ + -Dprotobuf_ABSL_PROVIDER=package + +%cmake_build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%cmake_install + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + + +%files +%defattr(-,root,root) +%{_bindir}/protoc* + +%files -n lib%{name} +%defattr(-,root,root) +%{_libdir}/libprotobuf*.so.* +%{_libdir}/libprotoc.so.* +%exclude %{_libdir}/libutf8_range.so +%exclude %{_libdir}/libutf8_validity.so +%doc LICENSE + +%files -n lib%{name}-devel +%defattr(-,root,root) +%dir %{_includedir}/google/protobuf +%{_includedir}/google/protobuf/* +%{_includedir}/java/core/src/main/resources/google/protobuf/java_features.proto +%{_includedir}/upb_generator/mangle.h +%dir %{_includedir}/upb +%{_includedir}/upb/* +%{_includedir}/utf8_range.h +%{_includedir}/utf8_validity.h +%{_libdir}/libupb.a +%{_libdir}/libprotobuf*.so +%{_libdir}/libprotoc.so +%dir %{_libdir}/cmake/protobuf +%{_libdir}/cmake/protobuf/protobuf-*.cmake +%dir %{_libdir}/cmake/utf8_range +%{_libdir}/cmake/utf8_range/utf8_range-*.cmake +%{_libdir}/pkgconfig/protobuf*.pc +%{_libdir}/pkgconfig/utf8_range.pc + +%changelog +* Wed Feb 12 2025 Silvan Calarco 28.3-2mamba +- regacy package + +* Wed Oct 23 2024 Automatic Build System 28.3-1mamba +- automatic version update by autodist + +* Tue Oct 15 2024 Silvan Calarco 28.2-2mamba +- move libutf8_range.so and libutf8_validity.so from devel to lib package + +* Thu Sep 19 2024 Automatic Build System 28.2-1mamba +- automatic version update by autodist + +* Mon Sep 16 2024 Silvan Calarco 28.1-2mamba +- obsolete legacy packages + +* Thu Sep 12 2024 Automatic Build System 28.1-1mamba +- automatic version update by autodist + +* Sun Sep 01 2024 Automatic Build System 28.0-1mamba +- automatic version update by autodist + +* Wed Aug 28 2024 Automatic Build System 27.4-1mamba +- automatic version update by autodist + +* Thu Aug 01 2024 Automatic Build System 27.3-1mamba +- automatic version update by autodist + +* Wed Jun 26 2024 Automatic Build System 27.2-1mamba +- automatic version update by autodist + +* Thu Jun 06 2024 Automatic Build System 27.1-1mamba +- automatic version update by autodist + +* Sun May 26 2024 Automatic Build System 27.0-1mamba +- automatic version update by autodist + +* Fri Apr 05 2024 Automatic Build System 26.1-1mamba +- automatic version update by autodist + +* Mon Feb 19 2024 Automatic Build System 25.3-1mamba +- automatic version update by autodist + +* 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 + +* Fri Dec 09 2022 Automatic Build System 21.11-1mamba +- automatic version update by autodist + +* Thu Dec 01 2022 Automatic Build System 21.10-1mamba +- automatic version update by autodist + +* Thu Oct 27 2022 Automatic Build System 21.9-1mamba +- automatic version update by autodist + +* Thu Oct 20 2022 Automatic Build System 21.8-1mamba +- automatic version update by autodist + +* Fri Sep 30 2022 Automatic Build System 21.7-1mamba +- automatic version update by autodist + +* Sat Sep 17 2022 Automatic Build System 21.6-1mamba +- automatic version update by autodist + +* Wed Aug 10 2022 Automatic Build System 21.5-1mamba +- automatic version update by autodist + +* Tue Jul 26 2022 Automatic Build System 21.4-1mamba +- automatic version update by autodist + +* Thu Jul 21 2022 Automatic Build System 21.3-1mamba +- automatic version update by autodist + +* Tue Jun 28 2022 Automatic Build System 21.2-1mamba +- automatic version update by autodist + +* Sun May 29 2022 Automatic Build System 21.1-1mamba +- automatic version update by autodist + +* Sat Apr 23 2022 Automatic Build System 3.20.1-1mamba +- automatic version update by autodist + +* Sat Jan 29 2022 Automatic Build System 3.19.4-1mamba +- automatic version update by autodist + +* Thu Jan 13 2022 Automatic Build System 3.19.3-1mamba +- automatic version update by autodist + +* Thu Jan 06 2022 Automatic Build System 3.19.2-1mamba +- automatic version update by autodist + +* Fri Oct 29 2021 Automatic Build System 3.19.1-1mamba +- automatic version update by autodist + +* Thu Oct 21 2021 Automatic Build System 3.19.0-1mamba +- automatic version update by autodist + +* Sat Oct 09 2021 Automatic Build System 3.18.1-1mamba +- automatic version update by autodist + +* Thu Sep 16 2021 Automatic Build System 3.18.0-1mamba +- automatic version update by autodist + +* Wed Jun 09 2021 Automatic Build System 3.17.3-1mamba +- automatic version update by autodist + +* Thu Jun 03 2021 Automatic Build System 3.17.2-1mamba +- automatic version update by autodist + +* Tue May 25 2021 Automatic Build System 3.17.1-1mamba +- automatic version update by autodist + +* Sat May 15 2021 Silvan Calarco 3.17.0-2mamba +- libprotobuf-devel: require protobuf; python-protobuf: use distdeps; fixed url + +* Fri May 14 2021 Automatic Build System 3.17.0-1mamba +- automatic version update by autodist + +* Sun May 09 2021 Automatic Build System 3.16.0-1mamba +- automatic version update by autodist + +* Fri Apr 09 2021 Automatic Build System 3.15.8-1mamba +- automatic version update by autodist + +* Sat Apr 03 2021 Automatic Build System 3.15.7-1mamba +- automatic version update by autodist + +* Fri Mar 12 2021 Automatic Build System 3.15.6-1mamba +- automatic version update by autodist + +* Sat Mar 06 2021 Automatic Build System 3.15.5-1mamba +- automatic version update by autodist + +* Fri Mar 05 2021 Automatic Build System 3.15.4-1mamba +- automatic version update by autodist + +* Fri Feb 26 2021 Automatic Build System 3.15.3-1mamba +- automatic version update by autodist + +* Thu Feb 25 2021 Automatic Build System 3.15.2-1mamba +- automatic version update by autodist + +* Sun Feb 21 2021 Automatic Build System 3.15.1-1mamba +- automatic version update by autodist + +* 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 + +* Wed Jul 01 2020 Automatic Build System 3.12.3-1mamba +- automatic version update by autodist + +* Wed Jun 03 2020 Automatic Build System 3.12.0-1mamba +- automatic version update by autodist + +* Tue Mar 03 2020 Silvan Calarco 3.11.4-2mamba +- rebuilt with debug package + +* Wed Feb 19 2020 Automatic Build System 3.11.4-1mamba +- automatic version update by autodist + +* Thu Feb 06 2020 Automatic Build System 3.11.3-1mamba +- automatic version update by autodist + +* Wed Jan 15 2020 Automatic Build System 3.11.2-1mamba +- automatic version update by autodist + +* Sat Dec 28 2019 Automatic Build System 3.11.1-1mamba +- automatic version update by autodist + +* Thu Nov 14 2019 Automatic Build System 3.10.1-1mamba +- automatic version update by autodist + +* Mon Oct 28 2019 Automatic Build System 3.10.0-1mamba +- automatic version update by autodist + +* Wed Mar 13 2019 Automatic Build System 3.7.0-1mamba +- automatic version update by autodist + +* Sat Jan 05 2019 Automatic Build System 3.6.1.3-1mamba +- automatic version update by autodist + +* Tue Sep 04 2018 Silvan Calarco 3.6.1-1mamba +- update to 3.6.1 + +* Mon Aug 06 2018 Automatic Build System 3.6.0.1-1mamba +- automatic version update by autodist + +* Sun Mar 25 2018 Automatic Build System 3.5.2-1mamba +- automatic version update by autodist + +* Sun Jan 07 2018 Automatic Build System 3.5.1.1-1mamba +- automatic version update by autodist + +* Tue Jan 02 2018 Automatic Build System 3.5.0.1-1mamba +- automatic version update by autodist + +* Fri Oct 27 2017 Automatic Build System 3.4.1-1mamba +- automatic version update by autodist + +* Tue Aug 08 2017 Automatic Build System 3.3.2-1mamba +- automatic version update by autodist + +* Fri Apr 14 2017 Automatic Build System 3.2.1-1mamba +- automatic version update by autodist + +* Sun Feb 12 2017 Automatic Build System 3.2.0-1mamba +- automatic version update by autodist + +* Mon Oct 17 2016 Silvan Calarco 3.1.0-1mamba +- update to 3.1.0 + +* Wed Dec 30 2015 Silvan Calarco 2.5.0-2mamba +- rebuilt with gcc 5.3.0 + +* Mon Apr 01 2013 Automatic Build System 2.5.0-1mamba +- automatic version update by autodist + +* Wed Jul 11 2012 Automatic Build System 2.4.1-1mamba +- automatic version update by autodist + +* Thu Nov 11 2010 Silvan Calarco 2.3.0-2mamba +- specfile fixes + +* Fri Jan 29 2010 Ercole 'ercolinux' Carpanetto 2.3.0-1mamba +- package created by autospec