]> git.pld-linux.org Git - packages/rpm-build-tools.git/blame - repackage.sh
- avoid passing -bb to builder when attempting to get bconds
[packages/rpm-build-tools.git] / repackage.sh
CommitLineData
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
10set -e
11
12rpmbuild() {
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 17specfile="$1"
91e42acf 18
36c6591f 19tmp=$(awk '/^BuildArch:/ { print $NF}' $specfile)
595e4fde
ER
20if [ "$tmp" ]; then
21 TARGET="$tmp"
22fi
23
36c6591f
ER
24BCONDS=$(./builder --show-bconds $specfile)
25# ignore output from older builders whose output is not compatible.
26if [ "$(echo "$bconds" | wc -l)" -gt 1 ]; then
27 BCONDS=""
28fi
29
e5c7e9c1
ER
30# just create the rpm's if -bb is somewhere in the args
31if [[ *$@* != *-bb* ]]; then
4a529b9f 32 rpmbuild -bi "$@"
e5c7e9c1 33fi
4a529b9f 34rpmbuild -bb --define 'clean %{nil}' "$@"
This page took 0.026554 seconds and 4 git commands to generate.