From 69b2b419d6629c1812652822bda7c7dabd02d765 Mon Sep 17 00:00:00 2001 From: mellor Date: Wed, 26 Jun 2013 20:45:11 +0000 Subject: [PATCH] make xCAT-OpenStack arch specific rpm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16782 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- makerpm | 12 +++++++----- xCAT-OpenStack/xCAT-OpenStack.spec | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/makerpm b/makerpm index cfbed0edc..95dd2a713 100755 --- a/makerpm +++ b/makerpm @@ -10,10 +10,10 @@ # set -x -# Make one of the following rpms: perl-xCAT, xCAT-server, xCAT-client, xCAT-IBMhpc, xCAT-rmc, xCAT-UI, xCAT-test, xCAT-OpenStack +# Make one of the following rpms: perl-xCAT, xCAT-server, xCAT-client, xCAT-IBMhpc, xCAT-rmc, xCAT-UI, xCAT-test function makenoarch { RPMNAME=$1 - if [ "$OSNAME" = "AIX" -a "$RPMNAME" != "xCAT-OpenStack" ]; then + if [ "$OSNAME" = "AIX" ]; then echo '.svn' > /tmp/xcat-excludes tar -X /tmp/xcat-excludes -cf $RPMROOT/SOURCES/$RPMNAME-$VER.tar $RPMNAME gzip -f $RPMROOT/SOURCES/$RPMNAME-$VER.tar @@ -32,9 +32,9 @@ function makenoarch { -# Make one of the following rpms: xCAT, xCATsn, xCAT-buildkit +# Make one of the following rpms: xCAT, xCATsn, xCAT-buildkit, xCAT-OpenStack function makexcat { - if [ "$OSNAME" != "AIX" -a "$1" != "xCAT-buildkit" -a -z "$2" ]; then + if [ "$OSNAME" != "AIX" -a "$1" != "xCAT-buildkit" -a "$1" != "xCAT-OpenStack" -a -z "$2" ]; then echo 'Usage: makerpm []' exit 1 fi @@ -88,6 +88,8 @@ function makexcat { ARCH="noarch" TARGET="" tar --exclude .svn --exclude xCAT-buildkit.spec -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME + elif [ "$RPMNAME" = "xCAT-OpenStack" ]; then + tar --exclude .svn --exclude xCAT-OpenStack.spec -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME else # do not recognize rpm echo "Unrecognized rpm: $RPMNAME" exit 2 @@ -201,7 +203,7 @@ else # linux fi -if [ "$1" = "xCAT" -o "$1" = "xCATsn" -o "$1" = "xCAT-buildkit" ]; then +if [ "$1" = "xCAT" -o "$1" = "xCATsn" -o "$1" = "xCAT-buildkit" -o "$1" = "xCAT-OpenStack" ]; then exportEmbed $3 makexcat $1 $2 elif [ "$1" = "xCAT-nbroot" -o "$1" = "xCAT-nbroot-core" ]; then diff --git a/xCAT-OpenStack/xCAT-OpenStack.spec b/xCAT-OpenStack/xCAT-OpenStack.spec index db3882e67..62c585fd0 100644 --- a/xCAT-OpenStack/xCAT-OpenStack.spec +++ b/xCAT-OpenStack/xCAT-OpenStack.spec @@ -9,7 +9,7 @@ Packager: IBM Corp. Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} Prefix: /opt/xcat BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root -BuildArch: noarch +#BuildArch: noarch Source: xCAT-OpenStack-%(cat Version).tar.gz Provides: xCAT-OpenStack = %{version}