SPECS: repackage.sh - restore r1.4

glen glen at pld-linux.org
Mon Oct 23 22:03:54 CEST 2006


Author: glen                         Date: Mon Oct 23 20:03:54 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- restore r1.4

---- Files affected:
SPECS:
   repackage.sh (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SPECS/repackage.sh
diff -u SPECS/repackage.sh:1.5 SPECS/repackage.sh:1.6
--- SPECS/repackage.sh:1.5	Mon Oct 23 21:58:37 2006
+++ SPECS/repackage.sh	Mon Oct 23 22:03:49 2006
@@ -11,13 +11,19 @@
 
 rpmbuild() {
 	set -x
-	/usr/bin/rpmbuild --short-circuit --define '_source_payload w9.gzdio' $bconds "$@" || exit
+	/usr/bin/rpmbuild ${TARGET:+--target $TARGET} --short-circuit --define '_source_payload w9.gzdio' "$@" || exit
 }
 
 bconds=$(./builder --show-bconds "$@")
 # ignore output from older builders whose output is not compatible.
 if [ "$(echo "$bconds" | wc -l)" -gt 1 ]; then
 	bconds=""
+fi
+
+SPECFILE="$1"
+tmp=$(awk '/^BuildArch:/ { print $NF}' $SPECFILE)
+if [ "$tmp" ]; then
+	TARGET="$tmp"
 fi
 
 # just create the rpm's if -bb is somewhere in the args
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/repackage.sh?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list