]> git.pld-linux.org Git - packages/rpm-build-tools.git/blame - compile.sh
- incude usage count of bconds in second column
[packages/rpm-build-tools.git] / compile.sh
CommitLineData
b6b35b6b
ER
1#!/bin/sh
2# will build package, skipping %prep and %build stage
3# i use it a lot!
4#
4845abe9
ER
5# Usage:
6# do do only %build stage (ie after %prep has been done), for example after
7# modifying some sources for more complicated specs wholse %build is not just
8# %{__make}:
9# SPECS$ ./compile.sh kdelibs.spec
10#
11# See also: SPECS/repackage.sh
12#
b6b35b6b
ER
13# -glen 2005-03-03
14
15set -e
16
17rpmbuild() {
18 set -x
7b1ec576 19 /usr/bin/rpmbuild ${TARGET:+--target $TARGET} $BCONDS --short-circuit "$@" || exit
b6b35b6b 20}
8f4bfd92
ER
21
22specfile="${1%.spec}.spec"; shift
23set -- "$specfile" "$@"
24
25tmp=$(awk '/^BuildArch:/ { print $NF}' $specfile)
26if [ "$tmp" ]; then
27 TARGET="$tmp"
28fi
29
4845abe9 30BCONDS=$(./builder -nn -ncs --show-bcond-args $specfile)
8f4bfd92 31
b6b35b6b 32rpmbuild -bc "$@"
This page took 0.03822 seconds and 4 git commands to generate.