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 # use gz payload as time is what we need here, not compress ratio
25 # we use %__ldconfig variable to test are we on rpm 4.4.9
26 # on 4.4.9 we should not redefine %clean to contain %clean, and redefine %__spec_clean_body instead
27 # on 4.4.2 we must redefine %clean to contain %clean
30 ${TARGET:+--target $TARGET} \
33 --define 'clean %%%{!?__ldconfig:clean}%{?__ldconfig:check} \
35 --define 'check %%check \
37 --define '_source_payload w9.gzdio' \
38 --define '__spec_install_pre %___build_pre' \
39 --define '__spec_clean_body %{nil}' \
43 specfile="${1%.spec}.spec"; shift
44 set -- "$specfile" "$@"
46 tmp=$(rpm-specdump "$@" | awk '$2 == "_target_cpu" {print $3}')
51 BCONDS=$(./builder -nn -ncs --show-bcond-args $specfile)
53 # just create the rpm's if -bb is somewhere in the args
54 if [[ *$@* != *-bb* ]]; then