2008-02-12 14:32:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
OSNAME=$(uname)
|
2009-01-28 15:42:14 +00:00
|
|
|
VER=`cat Version`
|
2008-02-12 14:32:03 +00:00
|
|
|
|
|
|
|
if [ "$OSNAME" = "AIX" ]
|
|
|
|
then
|
2009-01-28 15:42:14 +00:00
|
|
|
cd `dirname $0`/xCATsn
|
2008-02-12 14:32:03 +00:00
|
|
|
echo '.svn' > /tmp/xcat-excludes
|
|
|
|
|
2008-04-05 14:53:35 +00:00
|
|
|
tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/license.tar LICENSE.html
|
|
|
|
gzip -f /opt/freeware/src/packages/SOURCES/license.tar
|
2008-02-12 14:32:03 +00:00
|
|
|
|
|
|
|
cp xcat.conf /opt/freeware/src/packages/SOURCES
|
2008-06-03 19:34:04 +00:00
|
|
|
rm -f /opt/freeware/src/packages/SRPMS/xCATsn-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCATsn-$VER*rpm
|
2009-01-28 15:42:14 +00:00
|
|
|
cd -
|
2008-02-12 14:32:03 +00:00
|
|
|
|
2009-01-28 15:42:14 +00:00
|
|
|
rpm -ba xCATsn/xCATsn.spec
|
2008-06-03 19:34:04 +00:00
|
|
|
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCATsn-$VER*rpm
|
2008-02-12 14:32:03 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
if [ -f /etc/redhat-release ]
|
|
|
|
then
|
|
|
|
pkg="redhat"
|
|
|
|
else
|
|
|
|
pkg="packages"
|
|
|
|
fi
|
|
|
|
|
2009-01-28 15:42:14 +00:00
|
|
|
cd `dirname $0`/xCATsn
|
2008-04-05 14:53:35 +00:00
|
|
|
tar --exclude .svn -czf /usr/src/$pkg/SOURCES/license.tar.gz LICENSE.html
|
2008-02-12 14:32:03 +00:00
|
|
|
cp xcat.conf /usr/src/$pkg/SOURCES
|
2008-06-03 19:34:04 +00:00
|
|
|
rm -f /usr/src/$pkg/SRPMS/xCATsn-$VER*rpm /usr/src/$pkg/RPMS/*/xCATsn-$VER*rpm
|
2009-01-28 15:42:14 +00:00
|
|
|
cd -
|
2008-07-22 20:04:41 +00:00
|
|
|
if [ ! -z "$1" ]; then
|
2009-01-28 15:42:14 +00:00
|
|
|
rpmbuild -ba xCATsn/xCATsn.spec --target $1
|
2008-07-22 20:04:41 +00:00
|
|
|
else
|
2009-01-28 15:42:14 +00:00
|
|
|
rpmbuild -ba xCATsn/xCATsn.spec
|
2008-07-22 20:04:41 +00:00
|
|
|
fi
|
2008-02-12 14:32:03 +00:00
|
|
|
fi
|