Blame abseil-cpp.spec

Bernhard M. Wiedemann 2adb0f
#
Bernhard M. Wiedemann 2adb0f
# spec file for package abseil-cpp
Bernhard M. Wiedemann 2adb0f
#
38628f
# Copyright (c) 2024 SUSE LLC
Bernhard M. Wiedemann 2adb0f
#
Bernhard M. Wiedemann 2adb0f
# All modifications and additions to the file contributed by third parties
Bernhard M. Wiedemann 2adb0f
# remain the property of their copyright owners, unless otherwise agreed
Bernhard M. Wiedemann 2adb0f
# upon. The license for this file, and modifications and additions to the
Bernhard M. Wiedemann 2adb0f
# file, is the same license as for the pristine package itself (unless the
Bernhard M. Wiedemann 2adb0f
# license for the pristine package is not an Open Source License, in which
Bernhard M. Wiedemann 2adb0f
# case the license is the MIT License). An "Open Source License" is a
Bernhard M. Wiedemann 2adb0f
# license that conforms to the Open Source Definition (Version 1.9)
Bernhard M. Wiedemann 2adb0f
# published by the Open Source Initiative.
Bernhard M. Wiedemann 2adb0f
Bernhard M. Wiedemann 2adb0f
# Please submit bugfixes or comments via https://bugs.opensuse.org/
Bernhard M. Wiedemann 2adb0f
#
Bernhard M. Wiedemann 2adb0f
Bernhard M. Wiedemann 2adb0f
8569ba
%define lname	libabsl2401_0_0
279cd3
%if 0%{?gcc_version} < 7
279cd3
%global with_gcc 7
279cd3
%endif
Bernhard M. Wiedemann 2adb0f
Name:           abseil-cpp
36c725
Version:        20240116.2
Bernhard M. Wiedemann 2adb0f
Release:        0
Bernhard M. Wiedemann 2adb0f
Summary:        C++11 libraries which augment the C++ stdlib
Bernhard M. Wiedemann 2adb0f
License:        Apache-2.0
Bernhard M. Wiedemann 2c54d5
URL:            https://abseil.io/
279cd3
Source0:        https://github.com/abseil/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
d8ed2d
Source1:        baselibs.conf
8569ba
BuildRequires:  cmake
8569ba
BuildRequires:  fdupes
279cd3
BuildRequires:  gcc%{?with_gcc}
279cd3
BuildRequires:  gcc%{?with_gcc}-c++
8569ba
BuildRequires:  pkgconfig
dd016b
# PATCH-FIX-OPENSUSE options-{old,cxx17}.patch Ensure ABI stability regardless of compiler options
38628f
%if 0%{?suse_version} && 0%{?suse_version} < 1550
dd016b
Patch0:         options-old.patch
f5e6b5
Patch1:         cmake.patch
dd016b
%else
dd016b
Patch0:         options-cxx17.patch
dd016b
%endif
Bernhard M. Wiedemann 2adb0f
Bernhard M. Wiedemann 2adb0f
%description
Bernhard M. Wiedemann 2adb0f
Abseil is a collection of C++11 libraries which augment the C++
Bernhard M. Wiedemann 2adb0f
standard library. It also provides features incorporated into C++14
Bernhard M. Wiedemann 2adb0f
and C++17 standards.
Bernhard M. Wiedemann 2adb0f
1e1c09
%package -n %{lname}
1e1c09
Summary:        C++11 libraries which augment the C++ stdlib
433dbd
Obsoletes:      abseil-cpp < %{version}-%{release}
433dbd
Provides:       abseil-cpp = %{version}-%{release}
1e1c09
1e1c09
%description -n %{lname}
1e1c09
Abseil is a collection of C++11 libraries which augment the C++
1e1c09
standard library. It also provides features incorporated into C++14
1e1c09
and C++17 standards.
1e1c09
241de0
%package devel
241de0
Summary:        Header files for Abseil
1e1c09
Requires:       %{lname} = %{version}
241de0
241de0
%description devel
241de0
Abseil is a collection of C++11 libraries which augment the C++
241de0
standard library.
241de0
This package contains headers and build system files for it.
241de0
Bernhard M. Wiedemann 2adb0f
%prep
241de0
%autosetup -p1
Bernhard M. Wiedemann 2adb0f
Bernhard M. Wiedemann 2adb0f
%build
279cd3
%if 0%{?with_gcc}
279cd3
export CC="gcc-%{with_gcc}"
279cd3
export CXX="g++-%{with_gcc}"
f5e6b5
%endif
387a1b
%cmake
ee27e7
%cmake_build
Bernhard M. Wiedemann 2adb0f
Bernhard M. Wiedemann 2adb0f
%install
241de0
%cmake_install
241de0
%fdupes %{buildroot}/%{_prefix}
241de0
36c725
%check
36c725
%ctest
36c725
8569ba
%ldconfig_scriptlets -n %{lname}
387a1b
1e1c09
%files -n %{lname}
bc69e6
%license LICENSE
387a1b
%{_libdir}/libabsl_*.so.*
241de0
241de0
%files devel
8569ba
%license LICENSE
387a1b
%doc README.md
387a1b
%{_includedir}/absl
387a1b
%{_libdir}/cmake/absl
387a1b
%{_libdir}/libabsl_*.so
387a1b
%{_libdir}/pkgconfig/absl_*.pc
Bernhard M. Wiedemann 662df7
Bernhard M. Wiedemann 2adb0f
%changelog