forked from pool/benchmark
* ArgNames support * Fixes for OSX and Cygwin and MSVC builds * PauseTiming and ResumeTiming are per thread (#286) * Better Range and Arg specifications * Complexity reporting OBS-URL: https://build.opensuse.org/package/show/devel:tools/benchmark?expand=0&rev=8
90 lines
2.6 KiB
RPMSpec
90 lines
2.6 KiB
RPMSpec
#
|
|
# spec file for package benchmark
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define soname lib%{name}
|
|
%define sover 0
|
|
Name: benchmark
|
|
Version: 1.1.0
|
|
Release: 0
|
|
Summary: A microbenchmark support library
|
|
License: Apache-2.0
|
|
Group: Development/Libraries/C and C++
|
|
Url: https://github.com/google/benchmark
|
|
Source: https://github.com/google/benchmark/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
# PATCH-FEATURE-UPSTREAM benchmark-s390.patch
|
|
Patch: benchmark-s390.patch
|
|
BuildRequires: cmake
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: git-core
|
|
ExclusiveArch: %ix86 x86_64 s390x
|
|
|
|
%description
|
|
A library to support the benchmarking of functions, similar to unit-tests.
|
|
|
|
%package -n %{soname}%{sover}
|
|
Summary: Shared library for google benchmark
|
|
Group: System/Libraries
|
|
|
|
%description -n %{soname}%{sover}
|
|
A library to support the benchmarking of functions, similar to unit-tests.
|
|
|
|
%package devel
|
|
Summary: Development files for google benchmark
|
|
Group: Development/Languages/C and C++
|
|
Requires: %{soname}%{sover} = %{version}
|
|
|
|
%description devel
|
|
Development files for google benchmark library
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch
|
|
|
|
%build
|
|
%if %{__isa_bits} == 64
|
|
sed -i "s|LIBRARY DESTINATION lib|LIBRARY DESTINATION lib64|g" src/CMakeLists.txt
|
|
%endif
|
|
%cmake \
|
|
-DBENCHMARK_ENABLE_LTO=off \
|
|
-DBENCHMARK_ENABLE_TESTING=true
|
|
%make_jobs
|
|
|
|
%install
|
|
%cmake_install
|
|
|
|
%check
|
|
# path needs to be exported otherwise unit tests will fail
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/build/src/
|
|
make -C build test
|
|
|
|
%post -n %{soname}%{sover} -p /sbin/ldconfig
|
|
%postun -n %{soname}%{sover} -p /sbin/ldconfig
|
|
|
|
%files -n %{soname}%{sover}
|
|
%defattr(-,root,root)
|
|
%doc LICENSE README.md AUTHORS
|
|
%{_libdir}/%{soname}.so.%{sover}*
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%doc LICENSE README.md AUTHORS
|
|
%{_libdir}/%{soname}.so
|
|
%{_includedir}/%{name}
|
|
|
|
%changelog
|