[packages/google-benchmark] - new; python not built yet because of bazel

qboosh qboosh at pld-linux.org
Sun Jun 28 15:34:22 CEST 2020


commit 2c7e0662778bd428583d2d928f681d4ebcc05094
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jun 28 15:35:27 2020 +0200

    - new; python not built yet because of bazel

 google-benchmark.spec | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 117 insertions(+)
---
diff --git a/google-benchmark.spec b/google-benchmark.spec
new file mode 100644
index 0000000..1c152df
--- /dev/null
+++ b/google-benchmark.spec
@@ -0,0 +1,117 @@
+#
+# Conditional build:
+%bcond_with	python	# Python 3 module (requires Bazel to build, fails)
+#
+Summary:	Library to benchmark code snippets
+Summary(pl.UTF-8):	Biblioteka do testowania wydajności fragmentów kodu
+Name:		google-benchmark
+Version:	1.5.1
+Release:	1
+License:	Apache v2.0
+Group:		Libraries
+#Source0Download: https://github.com/google/benchmark/releases
+Source0:	https://github.com/google/benchmark/archive/v%{version}/benchmark-%{version}.tar.gz
+# Source0-md5:	91d2d9a824cab82c67a80ccce5b93218
+#Patch0:	%{name}-what.patch
+URL:		https://github.com/google/benchmark
+BuildRequires:	cmake >= 3.5.1
+BuildRequires:	libstdc++-devel >= 6:4.8
+%if %{with python}
+BuildRequires:	bazel
+BuildRequires:	python3-modules >= 1:3.6
+BuildRequires:	python3-pybind11
+BuildRequires:	python3-setuptools
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%endif
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A library to benchmark code snippets, similar to unit tests.
+
+%description -l pl.UTF-8
+Biblioteka do testowania wydajności fragmentów kodu, podobnie do
+testów jednostkowych.
+
+%package devel
+Summary:	Header files for Google Benchmark library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki Google Benchmark
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for Google Benchmark library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Google Benchmark.
+
+%package -n python3-benchmark
+Summary:	Python binding for Google Benchmark library
+Summary(pl.UTF-8):	Wiązanie Pythona do biblioteki Google Benchmark
+Group:		Libraries/Python
+Requires:	%{name} = %{version}-%{release}
+
+%description -n python3-benchmark
+Python binding for Google Benchmark library.
+
+%description -n python3-benchmark -l pl.UTF-8
+Wiązanie Pythona do biblioteki Google Benchmark.
+
+%prep
+%setup -q -n benchmark-%{version}
+
+%build
+install -d build
+cd build
+%cmake .. \
+	-DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF \
+	-DBENCHMARK_ENABLE_LTO=ON \
+	-DBENCHMARK_ENABLE_TESTING=OFF
+
+%{__make}
+cd ..
+
+%if %{with python}
+%py3_build
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%if %{with python}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CONTRIBUTORS README.md docs/{AssemblyTests.md,tools.md}
+%attr(755,root,root) %{_libdir}/libbenchmark.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libbenchmark.so.0
+%attr(755,root,root) %{_libdir}/libbenchmark_main.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libbenchmark_main.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libbenchmark.so
+%attr(755,root,root) %{_libdir}/libbenchmark_main.so
+%{_includedir}/benchmark
+%{_pkgconfigdir}/benchmark.pc
+%{_libdir}/cmake/benchmark
+
+%if %{with python}
+%files -n python3-benchmark
+%defattr(644,root,root,755)
+%dir %{py3_sitedir}/benchmark
+%attr(755,root,root) %{py3_sitedir}/benchmark/_benchmark.cpython-*.so
+%{py3_sitedir}/benchmark/__init__.py
+%{py3_sitedir}/benchmark/__pycache__
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/google-benchmark.git/commitdiff/2c7e0662778bd428583d2d928f681d4ebcc05094



More information about the pld-cvs-commit mailing list