2016-05-14 20:31:50 +02:00
|
|
|
#
|
|
|
|
# spec file for package benchmark
|
|
|
|
#
|
2022-01-17 13:07:48 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2016-05-14 20:31:50 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-02-18 11:56:07 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-05-14 20:31:50 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define soname lib%{name}
|
2021-09-13 10:44:39 +02:00
|
|
|
%define sover 1
|
2016-05-14 20:31:50 +02:00
|
|
|
Name: benchmark
|
2022-01-17 13:07:48 +01:00
|
|
|
Version: 1.6.1
|
2016-05-14 20:31:50 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: A microbenchmark support library
|
|
|
|
License: Apache-2.0
|
2018-05-29 09:05:25 +02:00
|
|
|
URL: https://github.com/google/benchmark
|
2021-04-28 08:58:07 +02:00
|
|
|
Source: %{name}-%{version}.tar.gz
|
2022-03-14 11:40:47 +01:00
|
|
|
Patch0: gcc12-disable-Werror=maybe-uninitialized.patch
|
2019-06-24 09:30:35 +02:00
|
|
|
BuildRequires: cmake >= 3.5.1
|
2016-05-14 20:31:50 +02:00
|
|
|
BuildRequires: gcc-c++
|
2016-07-04 11:25:28 +02:00
|
|
|
BuildRequires: git-core
|
2018-04-05 09:58:10 +02:00
|
|
|
BuildRequires: gmock
|
|
|
|
BuildRequires: gtest
|
2018-06-25 14:02:02 +02:00
|
|
|
BuildRequires: pkgconfig
|
2016-05-14 20:31:50 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
A library to support the benchmarking of functions, similar to unit-tests.
|
|
|
|
|
|
|
|
%package -n %{soname}%{sover}
|
|
|
|
Summary: Shared library for google benchmark
|
|
|
|
|
|
|
|
%description -n %{soname}%{sover}
|
|
|
|
A library to support the benchmarking of functions, similar to unit-tests.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for google benchmark
|
|
|
|
Requires: %{soname}%{sover} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Development files for google benchmark library
|
|
|
|
|
|
|
|
%prep
|
2021-04-28 08:51:05 +02:00
|
|
|
%autosetup
|
2016-05-14 20:31:50 +02:00
|
|
|
|
|
|
|
%build
|
2019-02-18 11:56:07 +01:00
|
|
|
sed -e 's|lib_install_dir "lib/"|lib_install_dir "%{_libdir}/"|g' \
|
|
|
|
-e 's|config_install_dir "lib/cmake|config_install_dir "%{_libdir}/cmake|g' \
|
|
|
|
-e 's|pkgconfig_install_dir "lib/pkgconfig"|pkgconfig_install_dir "%{_libdir}/pkgconfig"|g' \
|
|
|
|
-i src/CMakeLists.txt
|
2019-02-25 08:59:04 +01:00
|
|
|
sed -e 's|libdir=${prefix}/lib|libdir=${prefix}/%{_lib}|' \
|
|
|
|
-i cmake/benchmark.pc.in
|
|
|
|
|
2016-05-14 20:31:50 +02:00
|
|
|
%cmake \
|
2018-06-25 14:02:02 +02:00
|
|
|
-DBENCHMARK_ENABLE_LTO=on \
|
2019-06-24 09:30:35 +02:00
|
|
|
-DBENCHMARK_ENABLE_GTEST_TESTS=false \
|
2017-01-27 15:50:46 +01:00
|
|
|
-DBENCHMARK_ENABLE_TESTING=true
|
2019-11-18 14:48:41 +01:00
|
|
|
%cmake_build
|
2016-05-14 20:31:50 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
2018-05-29 09:05:25 +02:00
|
|
|
# dont ship debug stuff
|
2018-06-25 14:02:02 +02:00
|
|
|
rm -rf %{buildroot}%{_libexecdir}/debug
|
2022-01-17 13:07:48 +01:00
|
|
|
# doc will be installed in different location
|
|
|
|
rm -rf %{buildroot}%{_datadir}/doc/benchmark
|
2016-05-14 20:31:50 +02:00
|
|
|
|
|
|
|
%check
|
|
|
|
# path needs to be exported otherwise unit tests will fail
|
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/build/src/
|
2018-03-17 09:57:15 +01:00
|
|
|
%ctest
|
2016-05-14 20:31:50 +02:00
|
|
|
|
|
|
|
%post -n %{soname}%{sover} -p /sbin/ldconfig
|
|
|
|
%postun -n %{soname}%{sover} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n %{soname}%{sover}
|
2018-03-17 09:57:15 +01:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.md AUTHORS
|
2016-05-14 20:31:50 +02:00
|
|
|
%{_libdir}/%{soname}.so.%{sover}*
|
2018-05-29 09:05:25 +02:00
|
|
|
%{_libdir}/%{soname}_main.so.%{sover}*
|
2016-05-14 20:31:50 +02:00
|
|
|
|
|
|
|
%files devel
|
2018-03-17 09:57:15 +01:00
|
|
|
%license LICENSE
|
2022-01-17 13:07:48 +01:00
|
|
|
%doc README.md AUTHORS docs/*
|
2019-02-18 11:56:07 +01:00
|
|
|
%dir %{_libdir}/cmake/%{name}
|
|
|
|
%{_libdir}/cmake/%{name}/*.cmake
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
2016-05-14 20:31:50 +02:00
|
|
|
%{_libdir}/%{soname}.so
|
2018-05-29 09:05:25 +02:00
|
|
|
%{_libdir}/%{soname}_main.so
|
2016-05-14 20:31:50 +02:00
|
|
|
%{_includedir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|