]>
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 | |
d0560858 ER |
17 | specfile="${1%.spec}.spec"; shift |
18 | set -- "$specfile" "$@" | |
91e42acf | 19 | |
36c6591f | 20 | tmp=$(awk '/^BuildArch:/ { print $NF}' $specfile) |
595e4fde ER |
21 | if [ "$tmp" ]; then |
22 | TARGET="$tmp" | |
23 | fi | |
24 | ||
9874554f | 25 | BCONDS=$(./builder --show-bcond-args $specfile) |
36c6591f | 26 | |
e5c7e9c1 ER |
27 | # just create the rpm's if -bb is somewhere in the args |
28 | if [[ *$@* != *-bb* ]]; then | |
4a529b9f | 29 | rpmbuild -bi "$@" |
e5c7e9c1 | 30 | fi |
4a529b9f | 31 | rpmbuild -bb --define 'clean %{nil}' "$@" |