From 254f7b7b4333a177e055173dec434625a9796128 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Wed, 18 Mar 2015 16:51:49 -0400 Subject: [PATCH] This is really a hack. The xCAT-UI spec file should not have a hard coded location for compiler.jar file. However, I don't feel we should check in that compiler.jar file, so I've put it into a tools directory under the new build environment structure in c910 so we can more easily re-create build machines. The file path is automatically generated if it's not found to exists so we don't break the current build scripts. --- makerpm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/makerpm b/makerpm index 2266e78b5..d6fbc9f75 100755 --- a/makerpm +++ b/makerpm @@ -23,6 +23,18 @@ function makenoarch { RC=$? else # linux echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm $EMBEDTXT..." + # TODO: should fix this up, this is a hack for the new build machine + if [ $RPMNAME = "xCAT-UI" ]; then + # Only if the old compiler.jar file does not exist..... + if [ ! -e /xcat2/build/tools/compiler.jar ]; then + # look for the dynamic location of the compiler.jar file + DIRNAME=`dirname $(readlink -f $0)` + COMPILER_JAR=`echo "${DIRNAME%%linux_rpm/*}tools/compiler.jar"` + if [ -f $COMPILER_JAR ]; then + sed -i "s#/xcat2/build/tools/compiler.jar#${COMPILER_JAR}#g" xCAT-UI/xCAT-UI.spec + fi + fi + fi tar --exclude .svn -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm rpmbuild $QUIET -ta $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz