#!/bin/bash build-one () { HERE=$(pwd) ARCH=$1 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.8.0-oracle.spec } build-one x86_64