2007-12-12 15:24:27 +00:00
|
|
|
#!/bin/sh
|
2008-01-17 20:29:37 +00:00
|
|
|
|
|
|
|
OSNAME=$(uname)
|
2009-01-08 19:09:44 +00:00
|
|
|
VER=2.2
|
2008-01-17 20:29:37 +00:00
|
|
|
|
|
|
|
if [ "$OSNAME" = "AIX" ]
|
2007-12-12 15:24:27 +00:00
|
|
|
then
|
2008-01-17 20:29:37 +00:00
|
|
|
|
2008-01-23 18:02:17 +00:00
|
|
|
cd `dirname $0`
|
|
|
|
echo '.svn' > /tmp/xcat-excludes
|
2008-09-08 21:03:38 +00:00
|
|
|
echo 'upflag' >> /tmp/xcat-excludes
|
2008-01-23 18:02:17 +00:00
|
|
|
|
2008-04-05 14:53:35 +00:00
|
|
|
tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/postscripts.tar postscripts LICENSE.html
|
|
|
|
gzip -f /opt/freeware/src/packages/SOURCES/postscripts.tar
|
2008-01-23 18:02:17 +00:00
|
|
|
|
2008-04-05 14:53:35 +00:00
|
|
|
tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/templates.tar templates
|
|
|
|
gzip -f /opt/freeware/src/packages/SOURCES/templates.tar
|
2008-01-23 18:02:17 +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/xCAT-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER*rpm
|
2008-01-23 18:02:17 +00:00
|
|
|
|
2008-01-17 20:29:37 +00:00
|
|
|
rpm -ba xCAT.spec
|
2008-01-23 18:02:17 +00:00
|
|
|
|
|
|
|
# don't install
|
2008-06-03 19:34:04 +00:00
|
|
|
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER*rpm
|
2008-01-23 18:02:17 +00:00
|
|
|
cd -
|
2008-01-17 20:29:37 +00:00
|
|
|
|
2007-12-12 15:24:27 +00:00
|
|
|
else
|
2007-10-29 19:36:20 +00:00
|
|
|
|
2008-01-17 20:29:37 +00:00
|
|
|
if [ -f /etc/redhat-release ]
|
|
|
|
then
|
|
|
|
pkg="redhat"
|
|
|
|
else
|
|
|
|
pkg="packages"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd `dirname $0`
|
2008-04-05 14:53:35 +00:00
|
|
|
tar --exclude .svn -czf /usr/src/$pkg/SOURCES/postscripts.tar.gz postscripts LICENSE.html
|
|
|
|
tar --exclude .svn -czf /usr/src/$pkg/SOURCES/templates.tar.gz templates
|
2008-01-17 20:29:37 +00:00
|
|
|
cp xcat.conf /usr/src/$pkg/SOURCES
|
2008-06-03 19:34:04 +00:00
|
|
|
rm -f /usr/src/$pkg/SRPMS/xCAT-$VER*rpm /usr/src/$pkg/RPMS/*/xCAT-$VER*rpm
|
2008-03-25 01:37:51 +00:00
|
|
|
if [ ! -z "$1" ]; then
|
|
|
|
rpmbuild -ba xCAT.spec --target $1
|
2008-04-05 14:53:35 +00:00
|
|
|
else
|
|
|
|
rpmbuild -ba xCAT.spec
|
2008-03-25 01:37:51 +00:00
|
|
|
fi
|
2008-01-17 20:29:37 +00:00
|
|
|
cd -
|
|
|
|
fi
|