File iozone.spec of Package iozone
#
# spec file for package iozone
#
# Copyright (c) 2023 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 http://bugs.opensuse.org/
#
%define src_version 3
%define src_release 506
Name: iozone
Version: %{src_version}.%{src_release}
Release: 0
Summary: Filesystem Benchmark
License: SUSE-Freeware AND SUSE-Public-Domain AND GPL-2.0-or-later
URL: http://www.iozone.org
Source0: http://www.iozone.org/src/current/iozone%{src_version}_%{src_release}.tgz
Source1: http://www.iozone.org/docs/Iozone_License.txt
Source2: http://www.gnu.org/licenses/gpl-2.0.txt
BuildRequires: dos2unix
%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
BuildArch: noarch
%description doc
This package contains the documentation for using and interpreting results of Iozone
%prep
%autosetup -n %{name}%{src_version}_%{src_release}
%build
%make_build -C src/current clean
%make_build CFLAGS="%{optflags} -DHAVE_PREADV -DHAVE_PWRITEV -fPIE" -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
%license Iozone_License.txt
%doc src/current/Gnuplot.txt src/current/Changes.txt gpl-2.0.txt
%{_bindir}/fileop
%{_bindir}/iozone
%{_datadir}/%{name}/
%{_mandir}/man1/iozone.1%{?ext_man}
%files doc
%license Iozone_License.txt
%doc docs/*.pdf src/current/Changes.txt gpl-2.0.txt
%changelog