6 Commits

Author SHA256 Message Date
004174b9ea 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
326455bec0 Fix for sle15 builds
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf21?expand=0&rev=10
2024-12-04 12:20:05 +00:00
3a387fcc7d 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
020f93cb78 - switch to cmake buidling to that cmake projects can consume it
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>

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
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,12 +20,14 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define sover 3_21_12
%define tarname protobuf
%define src_install_dir %{_prefix}/src/%{name}
%define extra_java_flags -source 7 -target 7
# requires gmock, which is not yet in the distribution
%bcond_with check
%bcond_with java
%bcond_with python3
%if 0%{?gcc_version} < 11
%define with_gcc 11
%endif
Name: protobuf21
Version: 21.12
Release: 0
@@ -44,10 +46,9 @@ Provides: protobuf = %{version}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module setuptools}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gcc%{?with_gcc}-c++
BuildRequires: libtool
BuildRequires: pkgconfig
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
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
Summary: Java Bindings for Google Protocol Buffers
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
%build
autoreconf -fvi
%configure \
--disable-static
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%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}
pushd java
@@ -204,7 +198,7 @@ popd
%endif
%install
%make_install
%cmake_install
install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim
# no need for that
find %{buildroot} -type f -name "*.la" -delete -print
@@ -229,23 +223,6 @@ popd
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%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}
%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}
%license LICENSE
%{_libdir}/libprotobuf-3.%{version}.so
%{_libdir}/libprotobuf.so.3.%{version}*
%files -n libprotoc%{sover}
%{_libdir}/libprotoc-3.%{version}.so
%{_libdir}/libprotoc.so.3.%{version}*
%files -n libprotobuf-lite%{sover}
%{_libdir}/libprotobuf-lite-3.%{version}.so
%{_libdir}/libprotobuf-lite.so.3.%{version}*
%files devel
%doc CHANGES.txt CONTRIBUTORS.txt README.md
%{_bindir}/protoc
%{_bindir}/protoc-3.%{version}*
%{_includedir}/google
%{_libdir}/pkgconfig/*
%{_libdir}/libprotobuf-lite.so
%{_libdir}/libprotobuf.so
%{_libdir}/libprotoc.so
%{_libdir}/cmake/protobuf
%{_datadir}/vim
%files source
%{src_install_dir}
%if %{with java}
%files -n %{name}-java -f java/.mfiles
%{_javadir}/%{name}.jar