File google-cloud-cpp25.spec of Package google-cloud-cpp25
#
# spec file for package google-cloud-cpp25
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: google-cloud-cpp25
Version: 2.25.1
Release: 0
Summary: C++ client libraries for the following Google Cloud Platform services
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License: Apache-2.0
URL: https://github.com/googleapis/google-cloud-cpp
Source0: google-cloud-cpp-%{version}.tar
Source1: https://github.com/googleapis/googleapis/archive/30717c0b0c9966906880703208a4c820411565c4.tar.gz#/googleapis.tar.gz
Patch0: add-iomanip.patch
BuildRequires: abseil-cpp-devel
BuildRequires: benchmark-devel
BuildRequires: cmake
BuildRequires: fdupes
%if 0%{?sle_version} == 150600
BuildRequires: gcc12
BuildRequires: gcc12-c++
%else
BuildRequires: gcc-c++
%endif
BuildRequires: gmock
BuildRequires: grpc-devel
BuildRequires: gtest
BuildRequires: libcrc32c-devel
BuildRequires: libcurl-devel
BuildRequires: nlohmann_json-devel
BuildRequires: opentelemetry-cpp_19-devel
BuildRequires: protobuf-devel >= 3.17
BuildRequires: re2-devel
BuildRequires: zlib-devel
BuildRequires: cmake(protobuf)
%description
Idiomatic C++ client libraries for the following Google Cloud Platform services.
%package devel
Summary: C++ client libraries for the following Google Cloud Platform services
Requires: %{name} = %{version}
%description devel
Idiomatic C++ client libraries for the following Google Cloud Platform services.
%package -n libgoogle_cloud_cpp252
Summary: C++ client libraries for the following Google Cloud Platform services
Requires: %{name} = %{version}
%description -n libgoogle_cloud_cpp252
Idiomatic C++ client libraries for the following Google Cloud Platform services.
%prep
%setup -n google-cloud-cpp-%{version}
%autopatch -p1
%build
%if 0%{?sle_version} == 150600
export CC=gcc-12
export CXX=g++-12
export CXXFLAGS="-g"
%endif
%cmake \
-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
-DGOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL=%{S:1} \
-DGOOGLE_CLOUD_CPP_ENABLE=grpc,experimental-storage_grpc,bigquery,bigtable,dialogflow_es,iam,logging,pubsub,speech,storage,texttospeech,tracei,spanner \
%if 0%{?sle_version} == 150600
-DBUILD_TESTING=OFF \
%endif
%{nil}
%cmake_build
%install
%cmake_install
%fdupes %{_buildroot}%{_libdir}/cmake
%post -n libgoogle_cloud_cpp252 -p /sbin/ldconfig
%postun -n libgoogle_cloud_cpp252 -p /sbin/ldconfig
%files
%license LICENSE
%doc CHANGELOG.md README.md
%files -n libgoogle_cloud_cpp252
%{_libdir}/libgoogle*
%exclude %{_libdir}/libgoogle*.so
%files devel
%{_libdir}/pkgconfig/google*
%{_libdir}/cmake/google*
%{_libdir}/libgoogle*.so
%{_includedir}/google/type
%{_includedir}/google/spanner
%{_includedir}/google/iam
%{_includedir}/google/cloud
%{_includedir}/google/bigtable
%{_includedir}/google/api
%{_includedir}/google/rpc
%{_includedir}/google/pubsub
%{_includedir}/google/longrunning
%{_includedir}/google/logging
%{_includedir}/google/storage
%changelog