xcat-core/makeperlxcatrpm
lissav 4d7e428a2c fix pointer to doc
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1851 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-07-09 12:51:50 +00:00

36 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
OSNAME=$(uname)
VER="2.1"
if [ "$OSNAME" = "AIX" ]
then
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
else
if [ -f /etc/redhat-release ]
then
pkg="redhat"
else
pkg="packages"
fi
source=$PWD
# 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
rm -f /usr/src/$pkg/SRPMS/perl-xCAT-$VER*rpm /usr/src/$pkg/RPMS/noarch/perl-xCAT-$VER*rpm
rpmbuild -ta -vv perl-xCAT-$VER.tar.gz
fi