[packages/iozone] simplify target setup, fixes also bug that CC/CFLAGS were not passed

glen glen at pld-linux.org
Thu Apr 4 15:25:45 CEST 2013


commit 3493db5ecad35c2a07b647299f54ddfd43841988
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Apr 4 16:25:08 2013 +0300

    simplify target setup, fixes also bug that CC/CFLAGS were not passed

 iozone.spec | 55 +++++++++++++++++++++++++------------------------------
 1 file changed, 25 insertions(+), 30 deletions(-)
---
diff --git a/iozone.spec b/iozone.spec
index 3277069..d71fa07 100644
--- a/iozone.spec
+++ b/iozone.spec
@@ -13,6 +13,26 @@ Patch0:		%{name}-make.patch
 URL:		http://www.iozone.org/
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define	target linux
+%ifarch arm
+%define	target linux-arm
+%endif
+%ifarch %{x8664}
+%define	target linux-AMD64
+%endif
+%ifarch ia64
+%define	target linux-ia64
+%endif
+%ifarch ppc
+%define	target linux-powerpc
+%endif
+%ifarch ppc64
+%define	target linux-powerpc64
+%endif
+%ifarch sparc sparc64 sparcv9
+%define	target linux-sparc
+%endif
+
 %description
 Iozone benchmarks IO performance. By default it benchmarks the speed
 of sequential I/O to files, but it also supports a raw mode that
@@ -40,33 +60,8 @@ mv -f docs/Iozone_ps docs/IOzone.ps
 mv -f docs/IOzone_msword_98.pdf docs/IOzone.pdf
 
 %build
-cd src/current
-%{__make} \
-%ifarch arm
-	linux-arm
-%else
-%ifarch %{x8664}
-	linux-AMD64
-%else
-%ifarch ia64
-	linux-ia64
-%else
-%ifarch ppc
-	linux-powerpc \
-%else
-%ifarch ppc64
-	linux-powerpc64 \
-%else
-%ifarch sparc sparc64 sparcv9
-	linux-sparc \
-%else
-	linux \
-%endif
-%endif
-%endif
-%endif
-%endif
-%endif
+%{__make} -C src/current \
+	%{target} \
 	LDFLAGS="%{rpmldflags}" \
 	CFLAGS="%{rpmcflags}" \
 	CC="%{__cc}" \
@@ -76,9 +71,9 @@ cd src/current
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/iozone,%{_mandir}/man1}
 
-install src/current/iozone $RPM_BUILD_ROOT%{_bindir}
-install docs/iozone.1 $RPM_BUILD_ROOT%{_mandir}/man1
-install src/current/*.dem $RPM_BUILD_ROOT%{_datadir}/iozone
+install -p src/current/iozone $RPM_BUILD_ROOT%{_bindir}
+cp -p docs/iozone.1 $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p src/current/*.dem $RPM_BUILD_ROOT%{_datadir}/iozone
 
 %clean
 rm -rf $RPM_BUILD_ROOT
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/iozone.git/commitdiff/3493db5ecad35c2a07b647299f54ddfd43841988



More information about the pld-cvs-commit mailing list