6 Commits

Author SHA256 Message Date
3cf490f18a Accepting request 1228295 from devel:tools:building
OBS-URL: https://build.opensuse.org/request/show/1228295
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/protobuf21?expand=0&rev=4
2024-12-05 16:08:42 +00:00
c35141962f Accepting request 1227266 from Java:packages
Fix for sle15 builds

OBS-URL: https://build.opensuse.org/request/show/1227266
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf21?expand=0&rev=10
2024-12-04 12:20:05 +00:00
a9cd56a2ef Accepting request 1219868 from devel:tools:building
- switch to cmake buidling to that cmake projects can consume it

OBS-URL: https://build.opensuse.org/request/show/1219868
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/protobuf21?expand=0&rev=3
2024-11-01 20:04:04 +00:00
73df80d3b4 Accepting request 1194736 from science:machinelearning:milvus
- switch to cmake buidling to that cmake projects can consume it

OBS-URL: https://build.opensuse.org/request/show/1194736
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf21?expand=0&rev=8
2024-10-31 13:46:20 +00:00
ae76235a36 Accepting request 1157177 from devel:tools:building
OBS-URL: https://build.opensuse.org/request/show/1157177
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/protobuf21?expand=0&rev=2
2024-03-13 21:16:47 +00:00
cd68d5fdf3 Accepting request 1146818 from home:dimstar:Factory
- No longer ship protobuf21-source package: there is no consumer of
  it and for regular use, we still have the .src.rpm available.
  This happens to fix boo#1219564.

OBS-URL: https://build.opensuse.org/request/show/1146818
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf21?expand=0&rev=6
2024-03-12 12:24:38 +00:00
2 changed files with 40 additions and 46 deletions

View File

@@ -1,3 +1,21 @@
-------------------------------------------------------------------
Fri Nov 29 06:56:17 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Fix build on some architectures in SLE15 where the default
compiler gives internal compiler error
-------------------------------------------------------------------
Fri Aug 9 09:02:58 UTC 2024 - Christian Goll <cgoll@suse.com>
- switch to cmake buidling to that cmake projects can consume it
-------------------------------------------------------------------
Thu Feb 15 12:11:20 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- No longer ship protobuf21-source package: there is no consumer of
it and for regular use, we still have the .src.rpm available.
This happens to fix boo#1219564.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jun 12 19:48:16 UTC 2023 - Dirk Müller <dmueller@suse.com> Mon Jun 12 19:48:16 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package protobuf # spec file for package protobuf21
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -20,12 +20,14 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define sover 3_21_12 %define sover 3_21_12
%define tarname protobuf %define tarname protobuf
%define src_install_dir %{_prefix}/src/%{name}
%define extra_java_flags -source 7 -target 7 %define extra_java_flags -source 7 -target 7
# requires gmock, which is not yet in the distribution # requires gmock, which is not yet in the distribution
%bcond_with check %bcond_with check
%bcond_with java %bcond_with java
%bcond_with python3 %bcond_with python3
%if 0%{?gcc_version} < 11
%define with_gcc 11
%endif
Name: protobuf21 Name: protobuf21
Version: 21.12 Version: 21.12
Release: 0 Release: 0
@@ -44,10 +46,9 @@ Provides: protobuf = %{version}
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: autoconf BuildRequires: cmake
BuildRequires: automake
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc%{?with_gcc}-c++
BuildRequires: libtool BuildRequires: libtool
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
@@ -119,18 +120,6 @@ 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 extensible format. Google uses Protocol Buffers for almost all of its internal
RPC protocols and file formats. RPC protocols and file formats.
%package source
Summary: Source code of protobuf
Group: Development/Sources
BuildArch: noarch
%description source
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 source code for Protocol Buffers.
%package -n %{name}-java %package -n %{name}-java
Summary: Java Bindings for Google Protocol Buffers Summary: Java Bindings for Google Protocol Buffers
Group: Development/Libraries/Java Group: Development/Libraries/Java
@@ -176,11 +165,16 @@ sed -i '/google_test_dir/d' python/setup.py
sed -i -e '/env python/d' python/google/protobuf/internal/*.py sed -i -e '/env python/d' python/google/protobuf/internal/*.py
%build %build
autoreconf -fvi %global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%configure \
--disable-static
%make_build %if 0%{?with_gcc}
export CXX=g++-%{with_gcc}
export CC=gcc-%{with_gcc}
%endif
%cmake \
-Dprotobuf_BUILD_TESTS=OFF \
%{nil}
%cmake_build
%if %{with java} %if %{with java}
pushd java pushd java
@@ -204,7 +198,7 @@ popd
%endif %endif
%install %install
%make_install %cmake_install
install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim
# no need for that # no need for that
find %{buildroot} -type f -name "*.la" -delete -print find %{buildroot} -type f -name "*.la" -delete -print
@@ -229,23 +223,6 @@ popd
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif %endif
mkdir -p %{buildroot}%{src_install_dir}
tar -xzf %{SOURCE0} --strip-components=1 -C %{buildroot}%{src_install_dir}
%fdupes %{buildroot}%{src_install_dir}
# Fix env-script-interpreter rpmlint error
find %{buildroot}%{src_install_dir} -type f -name "*.js" -exec sed -i 's|#!.*%{_bindir}/env node|#!%{_bindir}/node|' "{}" +
find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*%{_bindir}/env python2.7|#!%{_bindir}/python2.7|' "{}" +
find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*%{_bindir}/env python|#!%{_bindir}/python|' "{}" +
find %{buildroot}%{src_install_dir} -type f -name "*.rb" -exec sed -i 's|#!.*%{_bindir}/env ruby|#!%{_bindir}/ruby|' "{}" +
find %{buildroot}%{src_install_dir} -type f -name "*.sh" -exec sed -i 's|#!.*%{_bindir}/env bash|#!/bin/bash|' "{}" +
# And stop requiring ridiculously old Python version
find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!%{_bindir}/python2.4|#!%{_bindir}/python2.7|' "{}" +
# Fix spurious-executable-perm rpmlint error
chmod -x %{buildroot}%{src_install_dir}/src/google/protobuf/arenastring.h
chmod -x %{buildroot}%{src_install_dir}/src/google/protobuf/reflection.h
# Fix version-control-internal-file rpmlint warning
find %{buildroot}%{src_install_dir} -type f -name ".gitignore" -exec rm -f "{}" +
%fdupes %{buildroot}%{_prefix} %fdupes %{buildroot}%{_prefix}
%post -n libprotobuf%{sover} -p /sbin/ldconfig %post -n libprotobuf%{sover} -p /sbin/ldconfig
@@ -257,27 +234,26 @@ find %{buildroot}%{src_install_dir} -type f -name ".gitignore" -exec rm -f "{}"
%files -n libprotobuf%{sover} %files -n libprotobuf%{sover}
%license LICENSE %license LICENSE
%{_libdir}/libprotobuf-3.%{version}.so %{_libdir}/libprotobuf.so.3.%{version}*
%files -n libprotoc%{sover} %files -n libprotoc%{sover}
%{_libdir}/libprotoc-3.%{version}.so %{_libdir}/libprotoc.so.3.%{version}*
%files -n libprotobuf-lite%{sover} %files -n libprotobuf-lite%{sover}
%{_libdir}/libprotobuf-lite-3.%{version}.so %{_libdir}/libprotobuf-lite.so.3.%{version}*
%files devel %files devel
%doc CHANGES.txt CONTRIBUTORS.txt README.md %doc CHANGES.txt CONTRIBUTORS.txt README.md
%{_bindir}/protoc %{_bindir}/protoc
%{_bindir}/protoc-3.%{version}*
%{_includedir}/google %{_includedir}/google
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%{_libdir}/libprotobuf-lite.so %{_libdir}/libprotobuf-lite.so
%{_libdir}/libprotobuf.so %{_libdir}/libprotobuf.so
%{_libdir}/libprotoc.so %{_libdir}/libprotoc.so
%{_libdir}/cmake/protobuf
%{_datadir}/vim %{_datadir}/vim
%files source
%{src_install_dir}
%if %{with java} %if %{with java}
%files -n %{name}-java -f java/.mfiles %files -n %{name}-java -f java/.mfiles
%{_javadir}/%{name}.jar %{_javadir}/%{name}.jar