]>
Commit | Line | Data |
---|---|---|
b0f3c13a ER |
1 | #!/bin/sh |
2 | # will build package, skipping %prep and %build stage | |
3 | # i use it a lot! | |
4 | # | |
5 | # -glen 2005-03-03 | |
201eefee ER |
6 | # |
7 | # TODO | |
1e4db2ae | 8 | # - make builder to understand -bi and use builder for short-circuit |
b0f3c13a ER |
9 | |
10 | set -e | |
11 | ||
12 | rpmbuild() { | |
13 | set -x | |
4a529b9f | 14 | /usr/bin/rpmbuild ${TARGET:+--target $TARGET} $BCONDS --short-circuit --define '_source_payload w9.gzdio' "$@" || exit |
b0f3c13a | 15 | } |
e5c7e9c1 | 16 | |
36c6591f | 17 | specfile="$1" |
91e42acf | 18 | |
36c6591f | 19 | tmp=$(awk '/^BuildArch:/ { print $NF}' $specfile) |
595e4fde ER |
20 | if [ "$tmp" ]; then |
21 | TARGET="$tmp" | |
22 | fi | |
23 | ||
36c6591f ER |
24 | BCONDS=$(./builder --show-bconds $specfile) |
25 | # ignore output from older builders whose output is not compatible. | |
26 | if [ "$(echo "$bconds" | wc -l)" -gt 1 ]; then | |
27 | BCONDS="" | |
28 | fi | |
29 | ||
e5c7e9c1 ER |
30 | # just create the rpm's if -bb is somewhere in the args |
31 | if [[ *$@* != *-bb* ]]; then | |
4a529b9f | 32 | rpmbuild -bi "$@" |
e5c7e9c1 | 33 | fi |
4a529b9f | 34 | rpmbuild -bb --define 'clean %{nil}' "$@" |