2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Merge pull request #4793 from whowutwut/makerpm-scripts

Sync up the naming for the 'makerpm*' helper scripts
This commit is contained in:
Bin Xu 2018-02-06 11:08:41 +08:00 committed by GitHub
commit 64773c84ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,9 @@
function makepythonrpm {
RPMNAME="$1"
SPEC_FILE="$RPMNAME.spec"
SPEC_FILE="$RPMNAME/$RPMNAME.spec"
RPMROOT=`rpmbuild --eval '%_topdir' ${SPEC_FILE}`
mkdir -p $RPMROOT/SOURCES
tar --exclude .svn -czvf $RPMROOT/SOURCES/$RPMNAME-${VER}.tar.gz $RPMNAME
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm
echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm $EMBEDTXT..."
@ -15,14 +17,12 @@ function makepythonrpm {
exit 1
fi
}
# Main code....
OSNAME=$(uname)
VER=`cat Version`
REL="--define"
EASE='usedate 1'
RPMROOT=/root/rpmbuild
mkdir -p $RPMROOT/SOURCES
rpmbuild --version > /dev/null
if [ $? -gt 0 ]; then
echo "Error: rpmbuild does not appear to be installed or working."