File iozone.spec of Package iozone

# spec file for package iozone
# 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

%define src_version 3
%define src_release 483
Name:           iozone
Version:        %{src_version}.%{src_release}
Release:        0
Summary:        Filesystem Benchmark
License:        SUSE-Freeware AND SUSE-Public-Domain AND GPL-2.0+
Group:          System/Benchmark
BuildRequires:  dos2unix
BuildRequires:  gcc

Filesystem benchmark tool. The benchmark tests file I/O performance for the following
operations: Read, write, re-read, re-write, read backwards, read strided,
fread, fwrite, random read, pread ,mmap, aio_read, aio_write.

%package doc
Summary:        Documentation how to use Iozone
Group:          Documentation/Man
BuildArch:      noarch

%description doc
This package contains the documentation for using and interpreting results of Iozone

%setup -q -n %{name}%{src_version}_%{src_release}

make %{?_smp_mflags} CFLAGS="%{optflags} -DHAVE_PREADV -DHAVE_PWRITEV" -C src/current linux

install -D -p -m 0755 src/current/iozone %{buildroot}%{_bindir}/iozone
install -D -p -m 0755 src/current/fileop %{buildroot}%{_bindir}/fileop
install -D -p -m 0644 src/current/client_list %{buildroot}%{_datadir}/%{name}/client_list
install -D -p -m 0644 src/current/Generate_Graphs %{buildroot}%{_datadir}/%{name}/Generate_Graphs
install -D -p -m 0755 src/current/ %{buildroot}%{_datadir}/%{name}/
install -D -p -m 0644 src/current/gnu3d.dem %{buildroot}%{_datadir}/%{name}/gnu3d.dem
install -D -p -m 0644 src/current/gnuplot.dem %{buildroot}%{_datadir}/%{name}/gnuplot.dem
install -D -p -m 0644 src/current/gnuplotps.dem %{buildroot}%{_datadir}/%{name}/gnuplotps.dem
install -D -p -m 0755 src/current/ %{buildroot}%{_datadir}/%{name}/
install -D -p -m 0644 src/current/write_telemetry %{buildroot}%{_datadir}/%{name}/write_telemetry
install -D -p -m 0644 docs/iozone.1 %{buildroot}%{_mandir}/man1/iozone.1

chmod 644 src/current/Gnuplot.txt src/current/Changes.txt
dos2unix src/current/Gnuplot.txt
dos2unix %{buildroot}%{_datadir}/%{name}/
cp %{SOURCE1} Iozone_License.txt
cp %{SOURCE2} gpl-2.0.txt

%doc src/current/Gnuplot.txt src/current/Changes.txt Iozone_License.txt gpl-2.0.txt

%files doc
%doc docs/*.pdf src/current/Changes.txt Iozone_License.txt gpl-2.0.txt

openSUSE Build Service is sponsored by