From 861bf0ecd76723fc2627cb03a46a68456065b9d6 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Tue, 8 Jul 2014 21:50:58 -0700 Subject: [PATCH] to support ppc64el for ipmitool-xcat Former-commit-id: 60ac6a4d54f582ec77487be1a8facf56976be00e --- ipmitool/debian/control | 2 +- ipmitool/debian/rules | 15 +++++++++++++-- ipmitool/make_deb.sh | 10 +++++++++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/ipmitool/debian/control b/ipmitool/debian/control index eb5890e..8812b6c 100644 --- a/ipmitool/debian/control +++ b/ipmitool/debian/control @@ -6,7 +6,7 @@ Build-Depends: debhelper (>> 4.0.0), libreadline-dev, libssl-dev, quilt, autotoo Standards-Version: 3.6.2.1 Package: ipmitool-xcat -Architecture: i386 amd64 ia64 +Architecture: i386 amd64 ia64 ppc64el Depends: ${shlibs:Depends}, lsb-base Suggests: openipmi Description: utility for IPMI control with kernel driver or LAN interface diff --git a/ipmitool/debian/rules b/ipmitool/debian/rules index 6d9fa64..f47454f 100755 --- a/ipmitool/debian/rules +++ b/ipmitool/debian/rules @@ -3,6 +3,9 @@ #export DH_VERBOSE=1 export DH_COMPAT=4 export DH_OPTIONS +ifndef TARGET_ARCH + TARGET_ARCH=amd64 +endif CFLAGS = -Wall -g @@ -20,9 +23,17 @@ configure-stamp: dh_testdir dh --with quilt build +ifneq ($(TARGET_ARCH),ppc64el) ./configure --prefix=/usr \ - --with-kerneldir \ - --mandir=/usr/share/man + --with-kerneldir \ + --mandir=/usr/share/man + +else + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --build=powerpc64le-linux-gnu + +endif touch configure-stamp #Architecture diff --git a/ipmitool/make_deb.sh b/ipmitool/make_deb.sh index 390e5c6..d1b5993 100755 --- a/ipmitool/make_deb.sh +++ b/ipmitool/make_deb.sh @@ -3,6 +3,14 @@ tar xvfz ipmitool-1.8.11.tar.gz cd ipmitool-1.8.11 cp -rL ../debian . -dpkg-buildpackage -uc -us +HOST_ARCH=`uname -m` +if [ "$HOST_ARCH" = "ppc64le" ]; then + HOST_ARCH="ppc64el" +elif [ "$HOST_ARCH" = "x86_64" ]; then + HOST_ARCH="amd64" +else + HOST_ARCH="amd64" +fi +TARGET_ARCH=$HOST_ARCH dpkg-buildpackage -uc -us cd - rm -rf ipmitool-1.8.11