Dominique Leuenberger 2020-11-02 08:39:42 +00:00 committed by Git OBS Bridge
parent 2bdfb82cfe
commit 0430c322fb
2 changed files with 33 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Oct 27 09:16:46 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Build shared libraries of abseil for use by grpc
(related to https://github.com/grpc/grpc/issues/24476)
-------------------------------------------------------------------
Sat Sep 5 20:03:38 UTC 2020 - Jan Engelhardt <jengelh@inai.de>

View File

@ -25,14 +25,24 @@ License: Apache-2.0
URL: https://abseil.io/
Source0: https://github.com/abseil/abseil-cpp/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
BuildRequires: c++_compiler
BuildRequires: cmake
BuildRequires: fdupes
BuildArch: noarch
%description
Abseil is a collection of C++11 libraries which augment the C++
standard library. It also provides features incorporated into C++14
and C++17 standards.
%package devel
Summary: Header files for Abseil
Requires: %{name} = %{version}
%description devel
Abseil is a collection of C++11 libraries which augment the C++
standard library.
This package contains headers and build system files for it.
%package source
Summary: Source code of Abseil
@ -42,14 +52,28 @@ which augment the C++ standard library. It also provides
features incorporated into C++14 and C++17 standards.
%prep
%setup -q
%autosetup -p1
%build
# let rpm/OBS have some versioning to work with when it comes to upgrades and rebuilds
cat >"%_builddir/abslx.sym" <<-EOF
ABSL_%version { global: *; };
EOF
%define build_ldflags -Wl,--version-script=%_builddir/abslx.sym
%cmake -DBUILD_SHARED_LIBS:BOOL=ON
%install
%cmake_install
mkdir -p %{buildroot}%{src_install_dir}
cp -r * %{buildroot}%{src_install_dir}
%fdupes %{buildroot}%{src_install_dir}
%fdupes %{buildroot}/%{_prefix}
%files
%{_libdir}/libabsl_*.so
%files devel
%{_includedir}/absl/
%{_libdir}/cmake/
%files source
%license LICENSE