2008-02-22 21:54:44 +00:00
|
|
|
#!/bin/sh
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
OSNAME=$(uname)
|
2008-11-20 17:08:23 +00:00
|
|
|
VER="2.1.1"
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
if [ "$OSNAME" = "AIX" ]
|
|
|
|
then
|
2008-01-17 20:33:12 +00:00
|
|
|
|
2008-06-03 19:34:04 +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
|
2007-10-26 22:44:33 +00:00
|
|
|
else
|
|
|
|
if [ -f /etc/redhat-release ]
|
|
|
|
then
|
|
|
|
pkg="redhat"
|
|
|
|
else
|
|
|
|
pkg="packages"
|
|
|
|
fi
|
2008-06-03 19:34:04 +00:00
|
|
|
source=$PWD
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2008-06-03 19:34:04 +00:00
|
|
|
# Trying to avoid having the version on the perl-xCAT dir name in svn
|
|
|
|
set -x
|
|
|
|
cd /usr/src/$pkg/SOURCES
|
|
|
|
rm -f perl-xCAT-$VER; ln -s $source/perl-xCAT perl-xCAT-$VER # have to make tar think it is in perl-xCAT-2.1
|
|
|
|
rm -f perl-xCAT-$VER.tar.gz
|
|
|
|
tar -czhf perl-xCAT-$VER.tar.gz --exclude=.svn --exclude=.project perl-xCAT-$VER
|
2008-06-03 15:03:32 +00:00
|
|
|
rm -f /usr/src/$pkg/SRPMS/perl-xCAT-$VER*rpm /usr/src/$pkg/RPMS/noarch/perl-xCAT-$VER*rpm
|
2008-07-09 12:53:09 +00:00
|
|
|
rpmbuild -ta perl-xCAT-$VER.tar.gz
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|