]> git.pld-linux.org Git - packages/rpm-build-tools.git/blob - repackage.sh
- restore r1.4
[packages/rpm-build-tools.git] / repackage.sh
1 #!/bin/sh
2 # will build package, skipping %prep and %build stage
3 # i use it a lot!
4 #
5 # -glen 2005-03-03
6 #
7 # TODO
8 # - make builder doesn't understand -bi and use builder for short-circuit
9
10 set -e
11
12 rpmbuild() {
13         set -x
14         /usr/bin/rpmbuild ${TARGET:+--target $TARGET} --short-circuit --define '_source_payload w9.gzdio' "$@" || exit
15 }
16
17 bconds=$(./builder --show-bconds "$@")
18 # ignore output from older builders whose output is not compatible.
19 if [ "$(echo "$bconds" | wc -l)" -gt 1 ]; then
20         bconds=""
21 fi
22
23 SPECFILE="$1"
24 tmp=$(awk '/^BuildArch:/ { print $NF}' $SPECFILE)
25 if [ "$tmp" ]; then
26         TARGET="$tmp"
27 fi
28
29 # just create the rpm's if -bb is somewhere in the args
30 if [[ *$@* != *-bb* ]]; then
31         rpmbuild -bi $bconds "$@"
32 fi
33 rpmbuild -bb --define 'clean %{nil}' $bconds "$@"
This page took 0.024485 seconds and 4 git commands to generate.