xcat-core/makeperlxcatrpm
2008-01-17 20:33:12 +00:00

29 lines
856 B
Bash
Executable File

#!/bin/ksh
OSNAME=$(uname)
if [ "$OSNAME" = "AIX" ]
then
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cvf /opt/freeware/src/packages/SOURCES/perl-xCAT-2.0.tar perl-xCAT-2.0
gzip /opt/freeware/src/packages/SOURCES/perl-xCAT-2.0.tar
cd ./perl-xCAT-2.0
rm -f /opt/freeware/src/packages/SRPMS/perl-xCAT-2.0*rpm /opt/freeware/src/packages/RPMS/ppc/perl-xCAT-2.0*rpm
rpm -ba perl-xCAT.spec
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/perl-xCAT-2.0*rpm
else
if [ -f /etc/redhat-release ]
then
pkg="redhat"
else
pkg="packages"
fi
tar --exclude .svn -czvf /usr/src/$pkg/SOURCES/perl-xCAT-2.0.tar.gz perl-xCAT-2.0/;
rm -f /usr/src/$pkg/SRPMS/perl-xCAT-2.0*rpm /usr/src/$pkg/RPMS/noarch/perl-xCAT-2.0*rpm
rpmbuild -ta /usr/src/$pkg/SOURCES/perl-xCAT-2.0.tar.gz ;
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/perl-xCAT-2.0*rpm
fi