2 # will build package, skipping %prep and %build stage
8 # do %install and rpm package, skips %clean
9 # SPECS$ ./repackage.sh kdelibs.spec
11 # after that is done you could try only package creation (as %clean was
12 # skipped), for adjusting %files lists:
13 # SPECS$ ./repackage.sh kdelibs.spec -bb
15 # See also: SPECS/compile.sh
18 # - make builder to understand -bi and use builder for short-circuit
23 # preprocess args, we must have --target as first arg to rpmbuild
25 while [ $# -gt 0 ]; do
38 # use gz payload as time is what we need here, not compress ratio
40 # we use %__ldconfig variable to test are we on rpm 4.4.9
41 # on 4.4.9 we should not redefine %clean to contain %clean, and redefine %__spec_clean_body instead
42 # on 4.4.2 we must redefine %clean to contain %clean
45 ${TARGET:+--target $TARGET} \
47 --define 'clean %%%{!?__ldconfig:clean}%{?__ldconfig:check} \
49 --define 'check %%check \
51 --define '_source_payload w9.gzdio' \
52 --define '_binary_payload w9.gzdio' \
53 --define '__spec_install_pre %___build_pre' \
54 --define '__spec_clean_body %{nil}' \
60 while [ $# -gt 0 ]; do
62 --target|--with|--without)
79 eval rpm-specdump $a || echo >&2 $?
82 tmp=$(specdump "$@" | awk '$2 == "_target_cpu" {print $3}')
87 # just create the rpm's if -bb is somewhere in the args
88 if [[ *$@* != *-bb* ]]; then