2008-02-22 21:54:44 +00:00
|
|
|
#!/bin/sh
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
OSNAME=$(uname)
|
2009-01-28 15:42:14 +00:00
|
|
|
VER=`cat Version`
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
if [ "$OSNAME" = "AIX" ]
|
|
|
|
then
|
2008-01-17 20:33:12 +00:00
|
|
|
|
2009-01-28 15:42:14 +00:00
|
|
|
#source=$PWD
|
|
|
|
#cd /opt/freeware/src/packages/SOURCES
|
|
|
|
#rm -f perl-xCAT-$VER; ln -s $source/perl-xCAT perl-xCAT-$VER
|
|
|
|
#rm -f /opt/freeware/src/packages/SRPMS/perl-xCAT*rpm /opt/freeware/src/packages/RPMS/ppc/perl-xCAT*rpm
|
|
|
|
#echo '.svn' > /tmp/xcat-excludes
|
|
|
|
#tar -X /tmp/xcat-excludes -cf perl-xCAT-$VER.tar perl-xCAT-$VER
|
|
|
|
#gzip -f /opt/freeware/src/packages/SOURCES/perl-xCAT-$VER.tar
|
|
|
|
#cd $source/perl-xCAT
|
|
|
|
#rpm -ba perl-xCAT.spec
|
|
|
|
|
2011-01-18 08:13:59 +00:00
|
|
|
svn info > perl-xCAT/.svninfo
|
2009-01-28 15:42:14 +00:00
|
|
|
source=/opt/freeware/src/packages
|
2008-06-03 19:34:04 +00:00
|
|
|
echo '.svn' > /tmp/xcat-excludes
|
2009-01-28 20:26:03 +00:00
|
|
|
tar -X /tmp/xcat-excludes -cf $source/SOURCES/perl-xCAT-$VER.tar perl-xCAT
|
2009-01-28 15:42:14 +00:00
|
|
|
gzip -f $source/SOURCES/perl-xCAT-$VER.tar
|
2011-01-18 08:13:59 +00:00
|
|
|
rm perl-xCAT/.svninfo
|
2009-01-28 20:26:03 +00:00
|
|
|
rm -f $source/SRPMS/perl-xCAT*rpm $source/RPMS/ppc/perl-xCAT*rpm
|
2009-01-28 15:42:14 +00:00
|
|
|
rpm -ba perl-xCAT/perl-xCAT.spec
|
|
|
|
#rpm -ta $source/SOURCES/perl-xCAT-$VER.tar.gz
|
2007-10-26 22:44:33 +00:00
|
|
|
else
|
2011-04-29 21:29:56 +00:00
|
|
|
|
|
|
|
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 ]
|
2007-10-26 22:44:33 +00:00
|
|
|
then
|
2011-04-29 21:29:56 +00:00
|
|
|
echo "Could not determine rpmbuild's root"
|
|
|
|
exit 1
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|
2011-04-29 21:29:56 +00:00
|
|
|
echo "The location for rpm building is ${RPMROOT}"
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2008-06-03 19:34:04 +00:00
|
|
|
set -x
|
2009-01-28 15:42:14 +00:00
|
|
|
|
2011-04-29 21:29:56 +00:00
|
|
|
svn info > perl-xCAT/.svninfo
|
|
|
|
tar --exclude .svn -czhf $RPMROOT/SOURCES/perl-xCAT-$VER.tar.gz perl-xCAT;
|
|
|
|
rm perl-xCAT/.svninfo
|
|
|
|
rm -f $RPMROOT/SRPMS/perl-xCAT-$VER*rpm $RPMROOT/RPMS/noarch/perl-xCAT-$VER*rpm
|
|
|
|
rpmbuild -ta $RPMROOT/SOURCES/perl-xCAT-$VER.tar.gz
|
2009-01-28 15:42:14 +00:00
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|