[Cbe-oss-dev] [PATCH] libspe2: remove bogus arch with an option

stenzel at de.ibm.com stenzel at de.ibm.com
Tue May 8 21:44:24 EST 2007


This patch replaces the bogus ppcnone arch with an option
to build the libspe wrapper conditionally.

Signed-off-by: Gerhard Stenzel <stenzel at de.ibm.com>

===================================================================
Index: libspe2/libspe2.spec
===================================================================
--- libspe2/libspe2.spec	(revision 38)
+++ libspe2/libspe2.spec	(working copy)
@@ -10,6 +10,9 @@ Buildroot: %{_tmppath}/libspe
 Exclusivearch: ppc ppc64 noarch
 Summary: SPE Runtime Management Library
 
+# to build the wrapper, call rpmbuild with --define="with_wrapper 1" 
+%define WITH_WRAPPER  %{?with_wrapper:%with_wrapper}%{!?with_wrapper:0}
+
 %ifarch noarch
 %define sysroot %{nil}
 %define set_optflags %{nil}
@@ -18,6 +21,9 @@ Summary: SPE Runtime Management Library
 %define set_optflags OPTFLAGS="%{optflags}"
 %endif
 
+%define sysroot %{nil}
+%define set_optflags OPTFLAGS="%{optflags}"
+
 %ifarch ppc
 %define _libdir /usr/lib
 %endif
@@ -29,7 +35,7 @@ Summary: SPE Runtime Management Library
 %define _initdir /etc/init.d
 %define _unpackaged_files_terminate_build 0
 
-%ifarch ppcnone
+%if %{WITH_WRAPPER}
 %package -n libspe
 Summary: SPE Runtime Management Wrapper Library
 Group: Development/Libraries
@@ -41,7 +47,7 @@ Summary: SPE Runtime Management Library
 Group: Development/Libraries
 Requires: %{name} = %{version}
 
-%ifarch ppcnone
+%if %{WITH_WRAPPER}
 %package -n libspe-devel
 Summary: SPE Runtime Management Library
 Group: Development/Libraries
@@ -59,7 +65,7 @@ Requires: %{name} = %{version}
 SPE Runtime Management Library for the
 Cell Broadband Engine Architecture.
 
-%ifarch ppcnone
+%if %{WITH_WRAPPER}
 %description -n libspe
 Header and object files for SPE Runtime
 Management Wrapoer Library.
@@ -69,7 +75,7 @@ Management Wrapoer Library.
 Header and object files for SPE Runtime
 Management Library.
 
-%ifarch ppcnone
+%if %{WITH_WRAPPER}
 %description -n libspe-devel
 Header and object files for SPE Runtime
 Management Library.
@@ -172,7 +178,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root)
 %{sysroot}%{_libdir}/*2.so.*
 
-%ifarch ppcnone
+%if %{WITH_WRAPPER}
 %files -n libspe
 %defattr(-,root,root)
 %{sysroot}%{_libdir}/libspe.so.*
@@ -186,7 +192,7 @@ rm -rf $RPM_BUILD_ROOT
 %{sysroot}%{_includedir}/cbea_map.h
 %{sysroot}%{_includedir2}/*.h
 
-%ifarch ppcnone
+%if %{WITH_WRAPPER}
 %files -n libspe-devel
 %defattr(-,root,root)
 %{sysroot}%{_libdir}/libspe.so

===================================================================

Best regards, 

Gerhard Stenzel, Linux on Cell Development, LTC
-------------------------------------------------------------------------------------
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen | Geschaeftsfuehrung: Herbert Kircher
Sitz der Gesellschaft: Boeblingen | Registergericht: Amtsgericht Stuttgart, HRB 243294




More information about the cbe-oss-dev mailing list