File iozone.spec of Package iozone
#
# spec file for package iozone
#
# Copyright (c) 2016 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 src_version 3
%define src_release 444
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
Url: http://www.iozone.org
Source0: http://www.iozone.org/src/current/%{name}%{src_version}_%{src_release}.tgz
Source1: http://www.iozone.org/docs/Iozone_License.txt
Source2: https://www.gnu.org/licenses/gpl-2.0.txt
BuildRequires: dos2unix
BuildRequires: gcc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
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
%prep
%setup -q -n %{name}%{src_version}_%{src_release}
%build
# I: Program returns random data in a function
# E: iozone no-return-in-nonvoid-function libbif.c:175, 224, 256,343, 386,
# 402
# licence however does not permit us to patch sources, thus we need to
# ignore these failures
FLAGS="`echo %{optflags} | sed -e 's/\-Wall//g'`"
make %{?_smp_mflags} CFLAGS="$FLAGS -DHAVE_PREADV -DHAVE_PWRITEV" -C src/current linux
%install
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/gengnuplot.sh %{buildroot}%{_datadir}/%{name}/gengnuplot.sh
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/report.pl %{buildroot}%{_datadir}/%{name}/report.pl
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}/report.pl
cp %{SOURCE1} Iozone_License.txt
cp %{SOURCE2} gpl-2.0.txt
%files
%defattr(-,root,root)
%doc src/current/Gnuplot.txt src/current/Changes.txt Iozone_License.txt gpl-2.0.txt
%{_bindir}/fileop
%{_bindir}/iozone
%{_datadir}/%{name}/
%{_mandir}/man1/iozone.1%{ext_man}
%files doc
%defattr(-,root,root)
%doc docs/*.pdf src/current/Changes.txt Iozone_License.txt gpl-2.0.txt
%changelog