From b5cc2f389f1199b7ba793251081c2472fd500c0c Mon Sep 17 00:00:00 2001 From: Mike Dubman Date: Tue, 6 Jan 2009 13:15:40 +0000 Subject: [PATCH] fix: pass custom $topdir to rpmbuild command if defined by user This commit was SVN r20207. --- contrib/dist/linux/buildrpm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/dist/linux/buildrpm.sh b/contrib/dist/linux/buildrpm.sh index cf0b010134..89372766dc 100755 --- a/contrib/dist/linux/buildrpm.sh +++ b/contrib/dist/linux/buildrpm.sh @@ -92,6 +92,7 @@ echo "--> Found specfile: $specfile" rpmtopdir="`grep %_topdir $HOME/.rpmmacros | awk '{ print $2 }'`" if test "$rpmtopdir" != ""; then + rpmbuild_options="$rpmbuild_options --define '_topdir $rpmtopdir'" if test ! -d "$rpmtopdir"; then mkdir -p "$rpmtopdir" mkdir -p "$rpmtopdir/BUILD" @@ -208,7 +209,7 @@ fi if test "$build_srpm" = "yes"; then echo "--> Building the Open MPI SRPM" - cmd="$rpm_cmd -bs $specdest" + cmd="$rpm_cmd $rpmbuild_options -bs $specdest" echo "--> $cmd" eval $cmd