[openfabrics-ewg] [PATCH OFED-1.1-rc7] openib.spec: solve rpm packaging issue with 64/32 bit binaries and libraries on ppc64
Hoang-Nam Nguyen
hnguyen at de.ibm.com
Tue Oct 17 04:42:00 PDT 2006
Hello,
here is the patch to solve the reported issue with 64/32 bit binaries and libraries on ppc64
in openib.spec.
Note that this patch considers ppc64 only!
Thanks!
Nam
Signed-off-by: Hoang-Nam Nguyen <hnguyen at de.ibm.com>
---
openib.spec | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff -Nurp openib-1.1/openib.spec openib-1.1_patched/openib.spec
--- openib-1.1/openib.spec 2006-10-05 06:11:33.000000000 -0700
+++ openib-1.1_patched/openib.spec 2006-10-17 03:53:13.000000000 -0700
@@ -38,6 +38,10 @@
%{!?_libdir: %define _libdir %{_prefix}/lib64}
%endif
+%ifarch ppc64
+%define _libdir %{_prefix}/lib64
+%endif
+
%{!?build_32bit: %define build_32bit 0}
%{!?_libdir32: %define _libdir32 %{_prefix}/lib}
@@ -562,6 +566,16 @@ make DESTDIR=$RPM_BUILD_ROOT install_use
if [ -d $RPM_BUILD_ROOT%{_prefix}/bin ]; then
mv $RPM_BUILD_ROOT%{_prefix}/bin $RPM_BUILD_ROOT%{_prefix}/bin64
fi
+%ifarch ppc64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_ud_pingpong $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_ud_pingpong64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_rc_pingpong $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_rc_pingpong64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_asyncwatch $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_asyncwatch64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devices $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devices64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devinfo $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devinfo64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_srq_pingpong $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_srq_pingpong64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_uc_pingpong $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_uc_pingpong64
+%endif
+
if [ -d $RPM_BUILD_ROOT%{_prefix}/sbin ]; then
mv $RPM_BUILD_ROOT%{_prefix}/sbin $RPM_BUILD_ROOT%{_prefix}/sbin64
fi
@@ -586,6 +600,14 @@ make DESTDIR=$RPM_BUILD_ROOT install_use
if [ -d $RPM_BUILD_ROOT%{_prefix}/sbin64 ]; then
mv $RPM_BUILD_ROOT%{_prefix}/sbin64 $RPM_BUILD_ROOT%{_prefix}/sbin
fi
+%ifarch ppc64
+ if [ -d $RPM_BUILD_ROOT%{_prefix}/bin32 ]; then
+ cp $RPM_BUILD_ROOT%{_prefix}/bin32/* $RPM_BUILD_ROOT%{_prefix}/bin
+ fi
+ if [ -d $RPM_BUILD_ROOT%{_prefix}/sbin32 ]; then
+ cp $RPM_BUILD_ROOT%{_prefix}/sbin32/* $RPM_BUILD_ROOT%{_prefix}/sbin
+ fi
+%endif
if [ -f $RPM_BUILD_ROOT%{_prefix}/sbin32/tvflash ] && [ ! -f $RPM_BUILD_ROOT%{_prefix}/sbin/tvflash ]; then
mkdir -p $RPM_BUILD_ROOT%{_prefix}/sbin
install -m 0755 $RPM_BUILD_ROOT%{_prefix}/sbin32/tvflash $RPM_BUILD_ROOT%{_prefix}/sbin/tvflash
-------------- next part --------------
diff -Nurp openib-1.1/openib.spec openib-1.1_patched/openib.spec
--- openib-1.1/openib.spec 2006-10-05 06:11:33.000000000 -0700
+++ openib-1.1_patched/openib.spec 2006-10-17 03:53:13.000000000 -0700
@@ -38,6 +38,10 @@
%{!?_libdir: %define _libdir %{_prefix}/lib64}
%endif
+%ifarch ppc64
+%define _libdir %{_prefix}/lib64
+%endif
+
%{!?build_32bit: %define build_32bit 0}
%{!?_libdir32: %define _libdir32 %{_prefix}/lib}
@@ -562,6 +566,16 @@ make DESTDIR=$RPM_BUILD_ROOT install_use
if [ -d $RPM_BUILD_ROOT%{_prefix}/bin ]; then
mv $RPM_BUILD_ROOT%{_prefix}/bin $RPM_BUILD_ROOT%{_prefix}/bin64
fi
+%ifarch ppc64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_ud_pingpong $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_ud_pingpong64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_rc_pingpong $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_rc_pingpong64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_asyncwatch $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_asyncwatch64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devices $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devices64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devinfo $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devinfo64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_srq_pingpong $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_srq_pingpong64
+ mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_uc_pingpong $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_uc_pingpong64
+%endif
+
if [ -d $RPM_BUILD_ROOT%{_prefix}/sbin ]; then
mv $RPM_BUILD_ROOT%{_prefix}/sbin $RPM_BUILD_ROOT%{_prefix}/sbin64
fi
@@ -586,6 +600,14 @@ make DESTDIR=$RPM_BUILD_ROOT install_use
if [ -d $RPM_BUILD_ROOT%{_prefix}/sbin64 ]; then
mv $RPM_BUILD_ROOT%{_prefix}/sbin64 $RPM_BUILD_ROOT%{_prefix}/sbin
fi
+%ifarch ppc64
+ if [ -d $RPM_BUILD_ROOT%{_prefix}/bin32 ]; then
+ cp $RPM_BUILD_ROOT%{_prefix}/bin32/* $RPM_BUILD_ROOT%{_prefix}/bin
+ fi
+ if [ -d $RPM_BUILD_ROOT%{_prefix}/sbin32 ]; then
+ cp $RPM_BUILD_ROOT%{_prefix}/sbin32/* $RPM_BUILD_ROOT%{_prefix}/sbin
+ fi
+%endif
if [ -f $RPM_BUILD_ROOT%{_prefix}/sbin32/tvflash ] && [ ! -f $RPM_BUILD_ROOT%{_prefix}/sbin/tvflash ]; then
mkdir -p $RPM_BUILD_ROOT%{_prefix}/sbin
install -m 0755 $RPM_BUILD_ROOT%{_prefix}/sbin32/tvflash $RPM_BUILD_ROOT%{_prefix}/sbin/tvflash
More information about the ewg
mailing list