made changes to the make files to be able build rpms properly

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1573 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
linggao 2008-06-03 19:34:04 +00:00
parent 25fae0de19
commit 88cc547659
7 changed files with 63 additions and 42 deletions

View File

@ -1,30 +1,35 @@
#!/bin/sh
OSNAME=$(uname)
VER=2.1
VER="2.1"
if [ "$OSNAME" = "AIX" ]
then
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/xCAT-client-$VER.tar xCAT-client
gzip -f /opt/freeware/src/packages/SOURCES/xCAT-client-$VER.tar
cd ./xCAT-client
rm -f /opt/freeware/src/packages/SRPMS/xCAT-client-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-client-$VER*rpm
rpm -ba xCAT-client.spec
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-client-$VER*rpm
source=$PWD
cd /opt/freeware/src/packages/SOURCES
rm -f xCAT-client-$VER; ln -s $source/xCAT-client xCAT-client-$VER
rm -f /opt/freeware/src/packages/SRPMS/xCAT-client*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-client*rpm
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cf xCAT-client-$VER.tar xCAT-client-$VER
gzip -f /opt/freeware/src/packages/SOURCES/xCAT-client-$VER.tar
cd $source/xCAT-client
rpm -ba xCAT-client.spec
else
if [ -f /etc/redhat-release ]
then
pkg="redhat"
else
pkg="packages"
fi
source=$PWD
tar --exclude .svn -czf /usr/src/$pkg/SOURCES/xCAT-client-$VER.tar.gz xCAT-client;
# Trying to avoid having the version on the xCAT-client dir name in svn
set -x
cd /usr/src/$pkg/SOURCES
rm -f xCAT-client-$VER; ln -s $source/xCAT-client xCAT-client-$VER # have to make tar think it is in xCAT-client-2.1
rm -f xCAT-client-$VER.tar.gz
tar -czhf xCAT-client-$VER.tar.gz --exclude=.svn --exclude=.project xCAT-client-$VER
rm -f /usr/src/$pkg/SRPMS/xCAT-client-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-client-$VER*rpm
rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-client-$VER.tar.gz ;
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-client-$VER*rpm
rpmbuild -ta xCAT-client-$VER.tar.gz
fi

View File

@ -6,12 +6,15 @@ VER="2.1"
if [ "$OSNAME" = "AIX" ]
then
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/perl-xCAT-$VER.tar perl-xCAT
gzip -f /opt/freeware/src/packages/SOURCES/perl-xCAT-$VER.tar
cd ./perl-xCAT
rm -f /opt/freeware/src/packages/SRPMS/perl-xCAT-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/perl-xCAT-$VER*rpm
rpm -ba perl-xCAT.spec
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
@ -19,8 +22,14 @@ else
else
pkg="packages"
fi
source=$PWD
tar --exclude .svn -czf /usr/src/$pkg/SOURCES/perl-xCAT-$VER.tar.gz perl-xCAT/;
# 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 /usr/src/$pkg/SOURCES/perl-xCAT-$VER.tar.gz ;
rpmbuild -ta perl-xCAT-$VER.tar.gz
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh
OSNAME=$(uname)
version='2.0'
version='2.1'
if [ "$OSNAME" = "AIX" ]
then
@ -24,7 +24,7 @@ else
fi
source=$PWD
# Trying to avoid having the version # (2.0) on the xCAT-rmc dir name in svn
# Trying to avoid having the version on the xCAT-rmc dir name in svn
set -x
cd /usr/src/$pkg/SOURCES
rm -f xCAT-rmc-$version; ln -s $source/xCAT-rmc xCAT-rmc-$version # have to make tar think it is in xCAT-rmc-2.0

View File

@ -1,30 +1,35 @@
#!/bin/sh
OSNAME=$(uname)
VER=2.1
VER="2.1"
if [ "$OSNAME" = "AIX" ]
then
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cf /opt/freeware/src/packages/SOURCES/xCAT-server-$VER.tar xCAT-server
gzip -f /opt/freeware/src/packages/SOURCES/xCAT-server-$VER.tar
cd ./xCAT-server
rm -f /opt/freeware/src/packages/SRPMS/xCAT-server-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-server-$VER*rpm
rpm -ba xCAT-server.spec
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-server-$VER*rpm
source=$PWD
cd /opt/freeware/src/packages/SOURCES
rm -f xCAT-server-$VER; ln -s $source/xCAT-server xCAT-server-$VER
rm -f /opt/freeware/src/packages/SRPMS/xCAT-server*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-server*rpm
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cf xCAT-server-$VER.tar xCAT-server-$VER
gzip -f /opt/freeware/src/packages/SOURCES/xCAT-server-$VER.tar
cd $source/xCAT-server
rpm -ba xCAT-server.spec
else
if [ -f /etc/redhat-release ]
then
pkg="redhat"
else
pkg="packages"
fi
source=$PWD
tar --exclude .svn -czf /usr/src/$pkg/SOURCES/xCAT-server-$VER.tar.gz xCAT-server;
# Trying to avoid having the version on the xCAT-server dir name in svn
set -x
cd /usr/src/$pkg/SOURCES
rm -f xCAT-server-$VER; ln -s $source/xCAT-server xCAT-server-$VER # have to make tar think it is in xCAT-server-2.1
rm -f xCAT-server-$VER.tar.gz
tar -czhf xCAT-server-$VER.tar.gz --exclude=.svn --exclude=.project xCAT-server-$VER
rm -f /usr/src/$pkg/SRPMS/xCAT-server-$VER*rpm /usr/src/$pkg/RPMS/noarch/xCAT-server-$VER*rpm
rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-server-$VER.tar.gz ;
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-server-$VER*rpm
rpmbuild -ta xCAT-server-$VER.tar.gz
fi

0
makewebrpm Normal file → Executable file
View File

View File

@ -1,6 +1,7 @@
#!/bin/sh
OSNAME=$(uname)
VER=2.1
if [ "$OSNAME" = "AIX" ]
then
@ -16,12 +17,12 @@ then
cp xcat.conf /opt/freeware/src/packages/SOURCES
rm -f /opt/freeware/src/packages/SRPMS/xCAT-2.0*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-2.0*rpm
rm -f /opt/freeware/src/packages/SRPMS/xCAT-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER*rpm
rpm -ba xCAT.spec
# don't install
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-2.0*rpm
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-$VER*rpm
cd -
else
@ -37,7 +38,7 @@ else
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
cp xcat.conf /usr/src/$pkg/SOURCES
rm -f /usr/src/$pkg/SRPMS/xCAT-2.0*rpm /usr/src/$pkg/RPMS/*/xCAT-2.0*rpm
rm -f /usr/src/$pkg/SRPMS/xCAT-$VER*rpm /usr/src/$pkg/RPMS/*/xCAT-$VER*rpm
if [ ! -z "$1" ]; then
rpmbuild -ba xCAT.spec --target $1
else

View File

@ -1,6 +1,7 @@
#!/bin/sh
OSNAME=$(uname)
VER=2.1
if [ "$OSNAME" = "AIX" ]
then
@ -11,12 +12,12 @@ then
gzip -f /opt/freeware/src/packages/SOURCES/license.tar
cp xcat.conf /opt/freeware/src/packages/SOURCES
rm -f /opt/freeware/src/packages/SRPMS/xCATsn-2.0*rpm /opt/freeware/src/packages/RPMS/ppc/xCATsn-2.0*rpm
rm -f /opt/freeware/src/packages/SRPMS/xCATsn-$VER*rpm /opt/freeware/src/packages/RPMS/ppc/xCATsn-$VER*rpm
rpm -ba xCATsn.spec
# don't install
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCATsn-2.0*rpm
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCATsn-$VER*rpm
cd -
else
@ -31,7 +32,7 @@ else
cd `dirname $0`
tar --exclude .svn -czf /usr/src/$pkg/SOURCES/license.tar.gz LICENSE.html
cp xcat.conf /usr/src/$pkg/SOURCES
rm -f /usr/src/$pkg/SRPMS/xCATsn-2.0*rpm /usr/src/$pkg/RPMS/*/xCATsn-2.0*rpm
rm -f /usr/src/$pkg/SRPMS/xCATsn-$VER*rpm /usr/src/$pkg/RPMS/*/xCATsn-$VER*rpm
rpmbuild -ba xCATsn.spec
cd -
fi