]> git.pld-linux.org Git - packages/google-benchmark.git/blob - google-benchmark.spec
- new; python not built yet because of bazel
[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.5.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:  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
19 %if %{with python}
20 BuildRequires:  bazel
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
26 %endif
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 A library to benchmark code snippets, similar to unit tests.
31
32 %description -l pl.UTF-8
33 Biblioteka do testowania wydajności fragmentów kodu, podobnie do
34 testów jednostkowych.
35
36 %package devel
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}
41
42 %description devel
43 Header files for Google Benchmark library.
44
45 %description devel -l pl.UTF-8
46 Pliki nagłówkowe biblioteki Google Benchmark.
47
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}
53
54 %description -n python3-benchmark
55 Python binding for Google Benchmark library.
56
57 %description -n python3-benchmark -l pl.UTF-8
58 Wiązanie Pythona do biblioteki Google Benchmark.
59
60 %prep
61 %setup -q -n benchmark-%{version}
62
63 %build
64 install -d build
65 cd build
66 %cmake .. \
67         -DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF \
68         -DBENCHMARK_ENABLE_LTO=ON \
69         -DBENCHMARK_ENABLE_TESTING=OFF
70
71 %{__make}
72 cd ..
73
74 %if %{with python}
75 %py3_build
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %{__make} -C build install \
82         DESTDIR=$RPM_BUILD_ROOT
83
84 %if %{with python}
85 %py3_install
86 %endif
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %post   -p /sbin/ldconfig
92 %postun -p /sbin/ldconfig
93
94 %files
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
101
102 %files devel
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
109
110 %if %{with python}
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__
117 %endif
This page took 0.134717 seconds and 3 git commands to generate.