2011-09-09 18:20:18 +00:00
|
|
|
#!/bin/sh
|
|
|
|
VER=`cat Version`
|
|
|
|
rpmbuild --version > /dev/null
|
|
|
|
if [ $? -gt 0 ]
|
|
|
|
then
|
|
|
|
echo "Error: Is rpmbuild installed and working?"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
RPMROOT=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec`
|
|
|
|
if [ $? -gt 0 ]
|
|
|
|
then
|
|
|
|
echo "Could not determine rpmbuild's root"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "The location for rpm building is ${RPMROOT}"
|
2012-12-06 14:42:05 +00:00
|
|
|
cd `dirname $0`/xCAT-genesis-builder
|
2011-09-09 18:20:18 +00:00
|
|
|
tar --exclude .svn -cjvf $RPMROOT/SOURCES/xCAT-genesis-builder.tar.bz2 .
|
|
|
|
#mv -f *.gz $RPMROOT/SOURCES
|
|
|
|
cp LICENSE.html $RPMROOT/BUILD
|
|
|
|
cp xCAT-genesis-builder.spec $RPMROOT/SOURCES
|
|
|
|
cd -
|
|
|
|
rm -f $RPMROOT/SRPMS/xCAT-genesis-builder-$VER*rpm $RPMROOT/RPMS/*/xCAT-genesis-builder-$VER*rpm
|
2012-12-06 14:42:05 +00:00
|
|
|
rpmbuild -ba xCAT-genesis-builder/xCAT-genesis-builder.spec
|