File sysbench.spec of Package sysbench
#
# spec file for package sysbench
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: sysbench
Version: 1.0.20
Release: 0
Summary: Scriptable database and system performance benchmark
License: GPL-2.0-or-later
Group: System/Benchmark
URL: https://github.com/akopytov/sysbench/
Source0: https://github.com/akopytov/sysbench/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: automake
BuildRequires: libaio-devel
BuildRequires: libtool
BuildRequires: make
BuildRequires: libmariadb-devel
BuildRequires: pkgconfig
BuildRequires: postgresql-devel
BuildRequires: postgresql-server-devel
# Use bundled cram for tests
BuildRequires: python
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64
%description
sysbench is a scriptable multi-threaded benchmark tool based on
LuaJIT. It is most frequently used for database benchmarks, but can also
be used to create arbitrarily complex workloads that do not involve a
database server.
sysbench comes with the following bundled benchmarks:
- oltp_*.lua: a collection of OLTP-like database benchmarks
- fileio: a filesystem-level benchmark
- cpu: a simple CPU benchmark
- memory: a memory access benchmark
- threads: a thread-based scheduler benchmark
- mutex: a POSIX mutex benchmark
%prep
%setup -q
find -type f -exec sed -i -e 's|\/usr\/bin\/env bash|\/bin\/bash|g' {} \;
find -type f -exec sed -i -e 's|\/usr\/bin\/env sysbench|\/usr\/bin\/sysbench|g' {} \;
%build
export CFLAGS="%{optflags}"
autoreconf -vif
%configure --with-mysql \
--with-pgsql \
--without-gcc-arch
%make_build
%install
%make_install
rm -f %{buildroot}%{_datadir}/doc/sysbench/manual.html
chmod +x %{buildroot}%{_datadir}/%{name}/tests/include/config.sh \
%{buildroot}%{_datadir}/%{name}/tests/include/drv_common.sh \
%{buildroot}%{_datadir}/%{name}/tests/include/script*.sh
%check
%make_build test
%files
%license COPYING
%doc ChangeLog README.md
%{_bindir}/*
%{_datadir}/%{name}
%changelog