]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- updated from repackage.sh
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 1 Nov 2006 22:02:28 +0000 (22:02 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    compile.sh -> 1.2

compile.sh

index 59b915d211be8f65d61680c34d0a8972417db222..6faa9c8e41f72db1b1074bdc9be7ad111f027f81 100644 (file)
@@ -8,9 +8,21 @@ set -e
 
 rpmbuild() {
        set -x
-       # i'd use ./builder to get all the ~/.bcondrc parsing,
-    # but builder doesn't understand -bi
-#      ./builder -ncs -nc -nn --opts --short-circuit "$@"
-       command rpmbuild --short-circuit "$@" || exit
+       /usr/bin/rpmbuild ${TARGET:+--target $TARGET} $BCONDS --short-circuit --define '_source_payload w9.gzdio' "$@" || exit
 }
+
+specfile="${1%.spec}.spec"; shift
+set -- "$specfile" "$@"
+
+tmp=$(awk '/^BuildArch:/ { print $NF}' $specfile)
+if [ "$tmp" ]; then
+       TARGET="$tmp"
+fi
+
+BCONDS=$(./builder --show-bconds $specfile)
+# ignore output from older builders whose output is not compatible.
+if [ "$(echo "$BCONDS" | wc -l)" -gt 1 ]; then
+       BCONDS=""
+fi
+
 rpmbuild -bc "$@"
This page took 0.025456 seconds and 4 git commands to generate.