From c13f4f7b358d88b8ac529e3ae249ed4f0bd8f796 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 13 Sep 2023 10:38:37 +0000 Subject: automatic import of google-benchmark --- .gitignore | 1 + google-benchmark.spec | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 68 insertions(+) create mode 100644 google-benchmark.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..ddf4829 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/google-benchmark-1.7.1.tar.gz diff --git a/google-benchmark.spec b/google-benchmark.spec new file mode 100644 index 0000000..d2d891f --- /dev/null +++ b/google-benchmark.spec @@ -0,0 +1,66 @@ +%global intname benchmark +%global lbname lib%{intname} + +Name: google-benchmark +Version: 1.7.1 +Release: 1 + +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: gtest-devel gmock-devel ninja-build gcc-c++ cmake doxygen gcc + +%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_help + +%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 +%ninja_build + +%check +%ninja_test + +%install +%ninja_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 help +%{_docdir}/%{intname}/ + +%changelog +* Wed Sep 06 2023 Darssin <2020303249@mail.nwpu.edu.cn> - 1.7.1-1 +- Package init diff --git a/sources b/sources new file mode 100644 index 0000000..67e28a0 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +0459a6c530df9851bee6504c3e37c2e7 google-benchmark-1.7.1.tar.gz -- cgit v1.2.3