summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--google-benchmark.spec66
-rw-r--r--sources1
3 files changed, 68 insertions, 0 deletions
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