]> git.pld-linux.org Git - packages/rpm-build-tools.git/blob - compile.sh
- no need for source payload here
[packages/rpm-build-tools.git] / compile.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 set -e
8
9 rpmbuild() {
10         set -x
11         /usr/bin/rpmbuild ${TARGET:+--target $TARGET} $BCONDS --short-circuit "$@" || exit
12 }
13
14 specfile="${1%.spec}.spec"; shift
15 set -- "$specfile" "$@"
16
17 tmp=$(awk '/^BuildArch:/ { print $NF}' $specfile)
18 if [ "$tmp" ]; then
19         TARGET="$tmp"
20 fi
21
22 BCONDS=$(./builder --show-bconds $specfile)
23 # ignore output from older builders whose output is not compatible.
24 if [ "$(echo "$BCONDS" | wc -l)" -gt 1 ]; then
25         BCONDS=""
26 fi
27
28 rpmbuild -bc "$@"
This page took 0.024743 seconds and 4 git commands to generate.