diff --git a/build b/build index f00860091..d0692a02b 100755 --- a/build +++ b/build @@ -122,7 +122,8 @@ BUILD_SUCCEEDED= COPY_SOURCES_ASIS= NO_SOURCE_COPY= BUILD_IN_PLACE= -NOPREP= +EXTRA_RPMBOPTS= + RECIPE_BUILD_START_TIME= CCACHE_SETUP_START_TIME= @@ -1347,11 +1348,10 @@ while test -n "$1"; do -no-source-copy) NO_SOURCE_COPY=true ;; - -noprep) - NOPREP=true - ;; - -build-in-place) - BUILD_IN_PLACE=true + -rpmbopts) + needarg + EXTRA_RPMBOPTS="$EXTRA_RPMBOPTS${EXTRA_RPMBOPTS:+,}$ARG" + shift ;; -here) BUILD_IN_PLACE=true @@ -1392,7 +1392,9 @@ test "$BUILD_ROOT" != /var/tmp/build-root && validate_param "--root" "$BUILD_ROO test "$CONFIG_DIR" != "$BUILD_DIR/configs" && validate_param "--configdir" "$CONFIG_DIR" CONFIG_DIR if test -n "$BUILD_IN_PLACE"; then + # XXX: for build-recipe-spec definesnstuff+=("--define" "_build_in_place 1") + EXTRA_RPMBOPTS="$EXTRA_RPMBOPTS${EXTRA_RPMBOPTS:+,}build-in-place" fi # validate the buildroot diff --git a/build-recipe-spec b/build-recipe-spec index 3497fe223..e9b6d4bd7 100644 --- a/build-recipe-spec +++ b/build-recipe-spec @@ -200,11 +200,9 @@ recipe_build_spec() { rpmbopts[${#rpmbopts[@]}]='--define' rpmbopts[${#rpmbopts[@]}]="RSYNCDONE 1" fi - if test -n "$NOPREP" ; then - rpmbopts[${#rpmbopts[@]}]='--noprep' - fi - if test -n "$BUILD_IN_PLACE" ; then - rpmbopts[${#rpmbopts[@]}]='--build-in-place' + if test -n "$EXTRA_RPMBOPTS" ; then + IFS=, eval set -- '$EXTRA_RPMBOPTS' + rpmbopts+=("${@/#/--}") fi buildrootoverride=$(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags rpm-buildroot-override)