X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=compile.sh;h=8aa5607618e1874c2b6f2027ec9b1f841620e5b5;hb=202b825e4bf39de168b9939434900024e14841d9;hp=59b915d211be8f65d61680c34d0a8972417db222;hpb=b6b35b6b133eb3499d51df4d778d09e0d288913a;p=packages%2Frpm-build-tools.git diff --git a/compile.sh b/compile.sh old mode 100644 new mode 100755 index 59b915d..8aa5607 --- a/compile.sh +++ b/compile.sh @@ -2,15 +2,24 @@ # will build package, skipping %prep and %build stage # i use it a lot! # +# Usage: +# make only %build stage (i.e. after %prep has been done), for example after +# modifying some sources for more complicated specs whose %build is not just +# %{__make}: +# SPECS$ ./compile.sh kdelibs.spec +# +# See also: SPECS/repackage.sh +# # -glen 2005-03-03 -set -e - -rpmbuild() { - set -x - # i'd use ./builder to get all the ~/.bcondrc parsing, - # but builder doesn't understand -bi -# ./builder -ncs -nc -nn --opts --short-circuit "$@" - command rpmbuild --short-circuit "$@" || exit -} -rpmbuild -bc "$@" +dir=$(dirname "$0") +if [ $# = 0 ]; then + # if no spec name passed, glob *.spec + set -- *.spec + if [ ! -f "$1" -o $# -gt 1 ]; then + echo >&2 "ERROR: Too many or too few .spec files found" + echo >&2 "Usage: ${0##*/} PACKAGE.spec" + exit 1 + fi +fi +exec $dir/builder --no-md5 -ncs -nn --short-circuit -bc "$@"