]> git.pld-linux.org Git - packages/rpm-build-tools.git/blob - repackage.sh
- autodetect noarch target (sick of the strip and chrpath noise)
[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 set -e
8
9 rpmbuild() {
10         set -x
11
12         # i'd use ./builder to get all the ~/.bcondrc parsing,
13     # but builder doesn't understand -bi
14 #       ./builder -ncs -nc -nn --opts --short-circuit "$@"
15         /usr/bin/rpmbuild ${TARGET:+--target $TARGET} --short-circuit --define '_source_payload w9.gzdio' "$@" || exit
16 }
17
18 SPECFILE="$1"
19 tmp=$(awk '/^BuildArch:/ { print $NF}' $SPECFILE)
20 if [ "$tmp" ]; then
21         TARGET="$tmp"
22 fi
23
24 # just create the rpm's if -bb is somewhere in the args
25 if [[ *$@* != *-bb* ]]; then
26         rpmbuild -bi "$@"
27 fi
28 rpmbuild -bb --define 'clean %{nil}' "$@"
This page took 0.029535 seconds and 4 git commands to generate.