Blob Blame History Raw
%global intname benchmark
%global lbname lib%{intname}

Name: google-benchmark
Version: 1.9.1
Release: 1%{?dist}

License: Apache-2.0
Summary: A microbenchmark support library
URL: https://github.com/google/%{intname}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires: gmock-devel
BuildRequires: gtest-devel

BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: ninja-build

%description
A library to support the benchmarking of functions, similar to unit-tests.

%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description devel
%{summary}.

%package doc
Summary: Documentation for %{name}
BuildArch: noarch
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}

%description doc
%{summary}.

%prep
%autosetup -n %{intname}-%{version} -p1
sed -e '/get_git_version/d' -e '/-Werror/d' -i CMakeLists.txt

%build
%cmake -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DGIT_VERSION=%{version} \
    -DBENCHMARK_ENABLE_DOXYGEN:BOOL=ON \
    -DBENCHMARK_ENABLE_TESTING:BOOL=ON \
    -DBENCHMARK_USE_BUNDLED_GTEST:BOOL=OFF \
    -DBENCHMARK_ENABLE_GTEST_TESTS:BOOL=ON \
    -DBENCHMARK_ENABLE_INSTALL:BOOL=ON \
    -DBENCHMARK_INSTALL_DOCS:BOOL=ON \
    -DBENCHMARK_DOWNLOAD_DEPENDENCIES:BOOL=OFF
%cmake_build

%check
%ctest

%install
%cmake_install

%files
%doc CONTRIBUTING.md README.md
%license AUTHORS CONTRIBUTORS LICENSE
%{_libdir}/%{lbname}*.so.1*

%files devel
%{_libdir}/%{lbname}*.so
%{_includedir}/%{intname}/
%{_libdir}/cmake/%{intname}/
%{_libdir}/pkgconfig/%{intname}*.pc

%files doc
%{_docdir}/%{intname}/

%changelog
* Fri Nov 29 2024 Vitaly <vitaly@easycoding.org> - 1.9.1-1
- Updated to version 1.9.1.

* Sat Aug 17 2024 Vitaly <vitaly@easycoding.org> - 1.9.0-1
- Updated to version 1.9.0.

* Tue Jul 23 2024 Vitaly <vitaly@easycoding.org> - 1.8.5-1
- Updated to version 1.8.5.

* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Thu May 23 2024 Vitaly <vitaly@easycoding.org> - 1.8.4-1
- Updated to version 1.8.4.

* Mon Mar 25 2024 Vitaly <vitaly@easycoding.org> - 1.8.3-1
- Updated to version 1.8.3.

* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild