SPECS: repackage.sh - rpm-specdump doesn't like all options that r...

glen glen at pld-linux.org
Mon Feb 11 23:23:18 CET 2008


Author: glen                         Date: Mon Feb 11 22:23:18 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- rpm-specdump doesn't like all options that rpmbuild understands

---- Files affected:
SPECS:
   repackage.sh (1.23 -> 1.24) 

---- Diffs:

================================================================
Index: SPECS/repackage.sh
diff -u SPECS/repackage.sh:1.23 SPECS/repackage.sh:1.24
--- SPECS/repackage.sh:1.23	Mon Feb 11 23:14:05 2008
+++ SPECS/repackage.sh	Mon Feb 11 23:23:13 2008
@@ -40,10 +40,30 @@
 		"$@" || exit
 }
 
+specdump() {
+	local a
+	while [ $# -gt 0 ]; do
+		case "$1" in
+		--target|--with|--without)
+			a="$a $1 $2"
+			shift
+			;;
+		-*)
+			;;
+		*)
+			a="$a $1"
+			;;
+		esac
+		shift
+	done
+	set -x
+	rpm-specdump $a
+}
+
 specfile="${1%.spec}.spec"; shift
 set -- "$specfile" "$@"
 
-tmp=$(rpm-specdump "$@" | awk '$2 == "_target_cpu" {print $3}')
+tmp=$(specdump "$@" | awk '$2 == "_target_cpu" {print $3}')
 if [ "$tmp" ]; then
 	TARGET="$tmp"
 fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/repackage.sh?r1=1.23&r2=1.24&f=u



More information about the pld-cvs-commit mailing list