Files
rpms/centos/SPECS/iozone.spec

126 lines
3.5 KiB
RPMSpec
Raw Permalink Normal View History

2017-07-06 09:46:08 +02:00
%define subrel 465
Summary: Iozone Filesystem Benchmark
Name: iozone
Version: 3
Release: %{subrel}%{?dist}
License: Freeware
Group: Applications/Engineering
Source: %{name}%{version}_%{subrel}.tar
Source1: %{name}.profile
Buildroot: /var/tmp/%{name}-buildroot
%define optdir /opt
%define instdir %{optdir}/%{name}
%description
IOzone is a filesystem benchmark tool. The benchmark generates and
measures a variety of file operations. Iozone has been ported to many machines and runs under many operating systems.
Iozone is useful for performing a broad filesystem analysis of a vendors
computer platform. 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.
##
## PREP
##
%prep
##
## SETUP and PATCH
##
%setup -n %{name}%{version}_%{subrel}/src/current
##
## BUILD
##
##
## BUILD
##
%build
%ifarch %{ix86}
make linux
%else
%ifarch x86_64
make linux-AMD64
%else
%ifarch ia64
make linux-ia64
%else
%ifarch ppc
make linux-powerpc
%else
%ifarch ppc64
make linux-powerpc64
%else
%ifarch s390
make linux-S390
%else
%ifarch s390x
make linux-S390X
%else
%ifarch %(arm)
make linux-arm
%else
echo "No idea how to build for your arch..."
exit 1
%endif
%endif
%endif
%endif
%endif
%endif
%endif
%endif
##
## INSTALL
##
%install
mkdir -p $RPM_BUILD_ROOT%{instdir}/bin
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/src/current/iozone $RPM_BUILD_ROOT%{instdir}/bin/
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/src/current/fileop $RPM_BUILD_ROOT%{instdir}/bin/
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/src/current/pit_server $RPM_BUILD_ROOT%{instdir}/bin/
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/src/current/Generate_Graphs $RPM_BUILD_ROOT%{instdir}/bin/
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/src/current/gengnuplot.sh $RPM_BUILD_ROOT%{instdir}/bin/
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/src/current/gnu3d.dem $RPM_BUILD_ROOT%{instdir}/bin/
mkdir -p $RPM_BUILD_ROOT%{instdir}/docs
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/docs/IOzone_msword_98.pdf $RPM_BUILD_ROOT%{instdir}/docs/
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/docs/Run_rules.doc $RPM_BUILD_ROOT%{instdir}/docs/
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/docs/IOzone_msword_98.doc $RPM_BUILD_ROOT%{instdir}/docs/
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/docs/Iozone_ps.gz $RPM_BUILD_ROOT%{instdir}/docs/
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/src/current/Gnuplot.txt $RPM_BUILD_ROOT%{instdir}/docs/
mkdir -p $RPM_BUILD_ROOT%{instdir}/man/man1
cp $RPM_BUILD_DIR/%{name}%{version}_%{subrel}/docs/iozone.1 $RPM_BUILD_ROOT%{instdir}/man/man1/
# enable path:
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
cp %{S:1} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/%{name}.sh
##
## FILES
##
%files
%attr(755,root,root) %{optdir}/
%config(noreplace) %{_sysconfdir}/profile.d/%{name}.sh
##
## CLEAN
##
%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}/*
[ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/*
##
## CHANGELOG
##
%changelog
* Tue Oct 4 2016 Daniel Steiner <dsteiner@redhat.com>
- New package for CentOS 7