#!/bin/bash make srpm SRPM=$(make verrel).nosrc.rpm build-one () { HERE=$(pwd) ARCH=$1 SRPM=$2 export QA_RPATHS=$[ 0x0001 ] setarch $ARCH rpmbuild \ --define "_sourcedir $HERE" \ --define "_specdir $HERE" \ --define "_builddir $HERE" \ --define "_srcrpmdir $HERE" \ --define "_rpmdir $HERE" \ --define "_source_filedigest_algorithm md5" \ --define "_binary_filedigest_algorithm md5" \ -bb java-1.7.0-oracle.spec } build-one i386 $SRPM