benchmark/benchmark.spec

103 lines
3.0 KiB
RPMSpec
Raw Normal View History

- Update to version 1.8.5: * preparing for v1.8.5 * clang format yet again * update actions/checkout to v4 * another reversal of something that breaks on wasm * clang format header fixes * clang-format fixes * roll back fatal error that breaks some platform (wasm) expectations * revert perf counters change until we can do the full version * remove old travis config * [FR] Add API to provide custom profilers #1807 (#1809) * Clarify the difference between `BENCHMARK_TEMPLATE_F` and `BENCHMARK_TEMPLATE_DEFINE_F` + `BENCHMARK_REGISTER_F` (#1815) * add PERF_FORMAT_TOTAL_TIME_{ENABLED,RUNNING} to support multiplexing (#1814) * Add -lkstat to the .pc for Solaris (#1801) * Find libpfm dependency in installed CMake configs (#1806) * [bazel] Use `includes` instead of `strip_include_prefix` (#1803) * cycleclock: Fix type conversion to match function return type on riscv64 (#1802) * Bump minimum required C++ version from C++11 to C++14 (#1800) * bump standard to C++14 (#1799) * cycleclock: Fix type conversion to match function return type (#1794) * CMake: unbreak version handling for tarballs (#1793) * hotfix: Correct pypi-publishing action tag to v1.8.14 (#1791) * Improve compatibility with Hexagon hardware (#1785) * preparing for v1.8.4 (#1788) * Modernize wheel building job config (#1783) * Switch git override to stable BCR tag for nanobind_bazel (#1778) * Add `benchmark_main.pc` to link `main()` containing library (#1779) * Refactor: Return frequency as double (#1782) * Remove COMPILER_IBMXL macro for z/OS (#1777) * Fix OpenBSD build (#1772) OBS-URL: https://build.opensuse.org/package/show/devel:tools/benchmark?expand=0&rev=49
2024-07-30 11:28:45 +02:00
#
# spec file for package benchmark
#
# 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
# 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/
#
%define soname lib%{name}
%define sover 1
Name: benchmark
Version: 1.8.5
Release: 0
Summary: A microbenchmark support library
License: Apache-2.0
URL: https://github.com/google/benchmark
Source: %{name}-%{version}.tar.gz
#Patch0: gcc12-disable-Werror=maybe-uninitialized.patch
BuildRequires: cmake >= 3.5.1
BuildRequires: gcc-c++
BuildRequires: git-core
BuildRequires: gmock
BuildRequires: gtest
BuildRequires: pkgconfig
%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
%autosetup
%build
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
sed -e 's|libdir=${prefix}/lib|libdir=${prefix}/%{_lib}|' \
-i cmake/benchmark.pc.in
%cmake \
-DBENCHMARK_ENABLE_LTO=on \
-DBENCHMARK_ENABLE_GTEST_TESTS=false \
-DBENCHMARK_ENABLE_TESTING=true
%cmake_build
%install
%cmake_install
# dont ship debug stuff
rm -rf %{buildroot}%{_libexecdir}/debug
# doc will be installed in different location
# Location differs between TW and SLE/Leap, clear both
rm -rf %{buildroot}%{_datadir}/doc/benchmark
rm -rf %{buildroot}%{_datadir}/doc/packages/benchmark
%check
# path needs to be exported otherwise unit tests will fail
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/build/src/
%ctest
%ldconfig_scriptlets -n %{soname}%{sover}
%files -n %{soname}%{sover}
%license LICENSE
%doc README.md AUTHORS
%{_libdir}/%{soname}.so.%{sover}*
%{_libdir}/%{soname}_main.so.%{sover}*
%files devel
%license LICENSE
%doc README.md AUTHORS docs/*
%dir %{_libdir}/cmake/%{name}
%{_libdir}/cmake/%{name}/*.cmake
%{_libdir}/pkgconfig/%{name}.pc
/usr/lib64/pkgconfig/%{name}_main.pc
%{_libdir}/%{soname}.so
%{_libdir}/%{soname}_main.so
%{_includedir}/%{name}
%changelog