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: 91d2d9a824cab82c67a80ccce5b93218
15 #Patch0: %{name}-what.patch
16 URL: https://github.com/google/benchmark
17 BuildRequires: cmake >= 3.5.1
18 BuildRequires: libstdc++-devel >= 6:4.8
21 BuildRequires: python3-modules >= 1:3.6
22 BuildRequires: python3-pybind11
23 BuildRequires: python3-setuptools
24 BuildRequires: rpm-pythonprov
25 BuildRequires: rpmbuild(macros) >= 1.714
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 A library to benchmark code snippets, similar to unit tests.
32 %description -l pl.UTF-8
33 Biblioteka do testowania wydajności fragmentów kodu, podobnie do
37 Summary: Header files for Google Benchmark library
38 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Google Benchmark
39 Group: Development/Libraries
40 Requires: %{name} = %{version}-%{release}
43 Header files for Google Benchmark library.
45 %description devel -l pl.UTF-8
46 Pliki nagłówkowe biblioteki Google Benchmark.
48 %package -n python3-benchmark
49 Summary: Python binding for Google Benchmark library
50 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki Google Benchmark
51 Group: Libraries/Python
52 Requires: %{name} = %{version}-%{release}
54 %description -n python3-benchmark
55 Python binding for Google Benchmark library.
57 %description -n python3-benchmark -l pl.UTF-8
58 Wiązanie Pythona do biblioteki Google Benchmark.
61 %setup -q -n benchmark-%{version}
67 -DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF \
68 -DBENCHMARK_ENABLE_LTO=ON \
69 -DBENCHMARK_ENABLE_TESTING=OFF
79 rm -rf $RPM_BUILD_ROOT
81 %{__make} -C build install \
82 DESTDIR=$RPM_BUILD_ROOT
89 rm -rf $RPM_BUILD_ROOT
91 %post -p /sbin/ldconfig
92 %postun -p /sbin/ldconfig
95 %defattr(644,root,root,755)
96 %doc AUTHORS CONTRIBUTORS README.md docs/{AssemblyTests.md,tools.md}
97 %attr(755,root,root) %{_libdir}/libbenchmark.so.*.*.*
98 %attr(755,root,root) %ghost %{_libdir}/libbenchmark.so.0
99 %attr(755,root,root) %{_libdir}/libbenchmark_main.so.*.*.*
100 %attr(755,root,root) %ghost %{_libdir}/libbenchmark_main.so.0
103 %defattr(644,root,root,755)
104 %attr(755,root,root) %{_libdir}/libbenchmark.so
105 %attr(755,root,root) %{_libdir}/libbenchmark_main.so
106 %{_includedir}/benchmark
107 %{_pkgconfigdir}/benchmark.pc
108 %{_libdir}/cmake/benchmark
111 %files -n python3-benchmark
112 %defattr(644,root,root,755)
113 %dir %{py3_sitedir}/benchmark
114 %attr(755,root,root) %{py3_sitedir}/benchmark/_benchmark.cpython-*.so
115 %{py3_sitedir}/benchmark/__init__.py
116 %{py3_sitedir}/benchmark/__pycache__