From: Victor H. <xca...@so...> - 2015-05-21 18:33:30
|
The branch, 2.9 has been updated via c091942154badadc2a1659eef3b701bf4ce86adf (commit) from af0061be9e4c86547bfcdb89082c8e88c1fde9b6 (commit) ----------------------------------------------------------------------- commit c091942154badadc2a1659eef3b701bf4ce86adf Author: Victor Hu <vh...@us...> Date: Thu May 21 14:32:46 2015 -0400 Update the 2.9 xCAT makerpm file to also be aware of the new build machines storing the compiler.jar file in a different place. Sync up with the code in 2.10 release ----------------------------------------------------------------------- diff --git a/makerpm b/makerpm index 2266e78..a1ebbaf 100755 --- a/makerpm +++ b/makerpm @@ -23,6 +23,26 @@ 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 + else + # using the old build structure + echo $DIRNAME + COMPILER_JAR=`echo "${DIRNAME%%old/*}xcat2/tools/compiler.jar"` + echo $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 + 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 |