Patched the make-rpm script to work when rpmbuild exists.

I am somewhat unhappy about the fact that this patch relies (at the
top) on finding rpmbuild in /usr/bin/. A better patch would search the
user's path properly, or perhaps be generated via configure to know
the correct rpmbuild path.
This commit is contained in:
Jonathan S. Shapiro 2002-11-07 16:00:14 +00:00
parent 7b394f037e
commit 5d46a86614

View File

@ -1,6 +1,6 @@
#!/bin/bash -x
#########################################################################
# $Id: make-rpm,v 1.3 2002-09-22 23:41:50 bdenney Exp $
# $Id: make-rpm,v 1.4 2002-11-07 16:00:14 shap Exp $
#########################################################################
# build/redhat/make-rpm
#
@ -19,6 +19,7 @@ MKDIR=mkdir
GREP=grep
ECHO=echo
RPM=rpm
RPMBUILD=/usr/bin/rpmbuild
SED=sed
TAR=tar
RPMSRCPATH=_rpm_top
@ -75,7 +76,12 @@ ${CAT} ${RPMSPEC} | ${SED} "s/@SEDVERSION@/${VERSION}/g" > ${SPECS}/bochs.spec
test $? = 0 || exit 1
# finally, start the rpm build.
${RPM} -ba --define "_topdir `pwd`/${RPMSRCPATH}" ${SPECS}/bochs.spec
if [ -x ${RPMBUILD} ]
then
${RPMBUILD} -ba --define "_topdir `pwd`/${RPMSRCPATH}" ${SPECS}/bochs.spec
else
${RPM} -ba --define "_topdir `pwd`/${RPMSRCPATH}" ${SPECS}/bochs.spec
fi
# test status
if test $? = 0; then