]> git.pld-linux.org Git - packages/google-benchmark.git/blob - google-benchmark.spec
- updated to 1.7.1
[packages/google-benchmark.git] / google-benchmark.spec
1 #
2 # Conditional build:
3 %bcond_with     python  # Python 3 module (requires Bazel to build, fails)
4 #
5 Summary:        Library to benchmark code snippets
6 Summary(pl.UTF-8):      Biblioteka do testowania wydajności fragmentów kodu
7 Name:           google-benchmark
8 Version:        1.7.1
9 Release:        1
10 License:        Apache v2.0
11 Group:          Libraries
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
18 %if %{with python}
19 BuildRequires:  bazel
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
25 %endif
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 A library to benchmark code snippets, similar to unit tests.
30
31 %description -l pl.UTF-8
32 Biblioteka do testowania wydajności fragmentów kodu, podobnie do
33 testów jednostkowych.
34
35 %package devel
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}
40
41 %description devel
42 Header files for Google Benchmark library.
43
44 %description devel -l pl.UTF-8
45 Pliki nagłówkowe biblioteki Google Benchmark.
46
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}
52
53 %description -n python3-benchmark
54 Python binding for Google Benchmark library.
55
56 %description -n python3-benchmark -l pl.UTF-8
57 Wiązanie Pythona do biblioteki Google Benchmark.
58
59 %prep
60 %setup -q -n benchmark-%{version}
61
62 %build
63 %cmake -B build \
64         -DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF \
65         -DBENCHMARK_ENABLE_LTO=ON \
66         -DBENCHMARK_ENABLE_TESTING=OFF
67
68 %{__make} -C build
69
70 %if %{with python}
71 %py3_build
72 %endif
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 %{__make} -C build install \
78         DESTDIR=$RPM_BUILD_ROOT
79
80 %if %{with python}
81 %py3_install
82 %endif
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %post   -p /sbin/ldconfig
88 %postun -p /sbin/ldconfig
89
90 %files
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
97
98 %files devel
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
105
106 %if %{with python}
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__
113 %endif
This page took 0.077346 seconds and 3 git commands to generate.