Commit bd788d99 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add RPMTOPDIR support

parent d34e16dd
...@@ -12,8 +12,10 @@ uni_rpmbuild() ...@@ -12,8 +12,10 @@ uni_rpmbuild()
{ {
local RET=0 local RET=0
local COMMAND=$1 local COMMAND=$1
# hack due quotes
# just for fill by something # just for fill by something
local ONEPARAM="-v" local ONEPARAM="-v"
local TWOPARAM="-v"
shift shift
local SPECNAME=$1 local SPECNAME=$1
local SPECDIR=`dirname $SPECNAME` local SPECDIR=`dirname $SPECNAME`
...@@ -24,6 +26,10 @@ uni_rpmbuild() ...@@ -24,6 +26,10 @@ uni_rpmbuild()
# FIXME: do not override -v # FIXME: do not override -v
ONEPARAM="--define=_source_payload w9.gzdio" ONEPARAM="--define=_source_payload w9.gzdio"
fi fi
if [ -n "$RPMTOPDIR" ] ; then
TWOPARAM="--define=_topdir $RPMTOPDIR"
fi
if [ "$COMMAND" = "buildreq" ] ; then if [ "$COMMAND" = "buildreq" ] ; then
if is_gear $SPECDIR ; then if is_gear $SPECDIR ; then
...@@ -39,16 +45,16 @@ uni_rpmbuild() ...@@ -39,16 +45,16 @@ uni_rpmbuild()
shift # skip spec name shift # skip spec name
[ -n "$SPECDIR" ] && [ "$SPECDIR" != "." ] && warning "Spec is not in git dir" [ -n "$SPECDIR" ] && [ "$SPECDIR" != "." ] && warning "Spec is not in git dir"
if [ "$MENV" = "SS" ] ; then if [ "$MENV" = "SS" ] ; then
$NICE $GEAR --commit --rpmbuild -- $COMMAND "$ONEPARAM" $@ || RET=$? $NICE $GEAR --commit --rpmbuild -- $COMMAND "$ONEPARAM" "$TWOPARAM" $@ || RET=$?
else else
# build src.rpm via hasher (on ALT) # build src.rpm via hasher (on ALT)
# $NICE gear-hsh --build-args="-bs" --rpmbuild -- $COMMAND "$ONEPARAM" $@ # $NICE gear-hsh --build-args="-bs" --rpmbuild -- $COMMAND "$ONEPARAM" $@
$NICE $GEAR --hasher -- myhsh --build-prog=$ETERBUILDDIR/functions/rebuild $@ || RET=$? $NICE $GEAR --hasher -- myhsh --build-prog=$ETERBUILDDIR/functions/rebuild $@ || RET=$?
fi fi
else else
$NICE $COMMAND "$ONEPARAM" $@ || RET=$? $NICE $COMMAND "$ONEPARAM" "$TWOPARAM" $@ || RET=$?
fi fi
[ -n "$VERBOSE" ] && echo "Run $COMMAND $ONEPARAM $@" || : [ -n "$VERBOSE" ] && echo "Run $COMMAND $ONEPARAM $TWOPARAM $@" || :
return $RET return $RET
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment