3 %bcond_with python # Python 3 module (requires Bazel to build, fails)
5 Summary: Library to benchmark code snippets
6 Summary(pl.UTF-8): Biblioteka do testowania wydajności fragmentów kodu
12 #Source0Download: https://github.com/google/benchmark/releases
13 Source0: https://github.com/google/benchmark/archive/v%{version}/benchmark-%{version}.tar.gz
14 # Source0-md5: 0459a6c530df9851bee6504c3e37c2e7
15 URL: https://github.com/google/benchmark
16 BuildRequires: cmake >= 3.16.3
17 BuildRequires: libstdc++-devel >= 6:4.8
20 BuildRequires: python3-modules >= 1:3.7
21 BuildRequires: python3-pybind11
22 BuildRequires: python3-setuptools
23 BuildRequires: rpm-pythonprov
24 BuildRequires: rpmbuild(macros) >= 1.714
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 A library to benchmark code snippets, similar to unit tests.
31 %description -l pl.UTF-8
32 Biblioteka do testowania wydajności fragmentów kodu, podobnie do
36 Summary: Header files for Google Benchmark library
37 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Google Benchmark
38 Group: Development/Libraries
39 Requires: %{name} = %{version}-%{release}
42 Header files for Google Benchmark library.
44 %description devel -l pl.UTF-8
45 Pliki nagłówkowe biblioteki Google Benchmark.
47 %package -n python3-benchmark
48 Summary: Python binding for Google Benchmark library
49 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki Google Benchmark
50 Group: Libraries/Python
51 Requires: %{name} = %{version}-%{release}
53 %description -n python3-benchmark
54 Python binding for Google Benchmark library.
56 %description -n python3-benchmark -l pl.UTF-8
57 Wiązanie Pythona do biblioteki Google Benchmark.
60 %setup -q -n benchmark-%{version}
64 -DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF \
65 -DBENCHMARK_ENABLE_LTO=ON \
66 -DBENCHMARK_ENABLE_TESTING=OFF
75 rm -rf $RPM_BUILD_ROOT
77 %{__make} -C build install \
78 DESTDIR=$RPM_BUILD_ROOT
85 rm -rf $RPM_BUILD_ROOT
87 %post -p /sbin/ldconfig
88 %postun -p /sbin/ldconfig
91 %defattr(644,root,root,755)
92 %doc AUTHORS CONTRIBUTORS README.md docs/{AssemblyTests.md,tools.md}
93 %attr(755,root,root) %{_libdir}/libbenchmark.so.*.*.*
94 %attr(755,root,root) %ghost %{_libdir}/libbenchmark.so.1
95 %attr(755,root,root) %{_libdir}/libbenchmark_main.so.*.*.*
96 %attr(755,root,root) %ghost %{_libdir}/libbenchmark_main.so.1
99 %defattr(644,root,root,755)
100 %attr(755,root,root) %{_libdir}/libbenchmark.so
101 %attr(755,root,root) %{_libdir}/libbenchmark_main.so
102 %{_includedir}/benchmark
103 %{_pkgconfigdir}/benchmark.pc
104 %{_libdir}/cmake/benchmark
107 %files -n python3-benchmark
108 %defattr(644,root,root,755)
109 %dir %{py3_sitedir}/benchmark
110 %attr(755,root,root) %{py3_sitedir}/benchmark/_benchmark.cpython-*.so
111 %{py3_sitedir}/benchmark/__init__.py
112 %{py3_sitedir}/benchmark/__pycache__