]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- autodetect noarch target (sick of the strip and chrpath noise)
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 5 Feb 2006 17:42:02 +0000 (17:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    repackage.sh -> 1.4

repackage.sh

index 35c54a22efb0a8042dada424423e4492c64bacef..104f8d20a59c701ff7f195f0aac02424a2b99463 100644 (file)
@@ -12,9 +12,15 @@ rpmbuild() {
        # i'd use ./builder to get all the ~/.bcondrc parsing,
     # but builder doesn't understand -bi
 #      ./builder -ncs -nc -nn --opts --short-circuit "$@"
-       /usr/bin/rpmbuild --short-circuit --define '_source_payload w9.gzdio' "$@" || exit
+       /usr/bin/rpmbuild ${TARGET:+--target $TARGET} --short-circuit --define '_source_payload w9.gzdio' "$@" || exit
 }
 
+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
 if [[ *$@* != *-bb* ]]; then
        rpmbuild -bi "$@"
This page took 0.029932 seconds and 4 git commands to generate.