X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=build-everything-in-mock.sh;h=bac1581625c178e51ba3d5a70ef9e369dee377ad;hb=b481be5cfa489c193f164434dce4acb96beea6c2;hp=6b079ad2da334a1acd607309fc82496137dcedd5;hpb=3d2e33bc4c25b39c083e7f811cebeaa2602b2884;p=fedora-mingw.git diff --git a/build-everything-in-mock.sh b/build-everything-in-mock.sh index 6b079ad..bac1581 100755 --- a/build-everything-in-mock.sh +++ b/build-everything-in-mock.sh @@ -1,21 +1,26 @@ -#!/bin/sh - +#!/bin/bash - -DIST=fedora-9 +# These are the packages we don't want to build yet: +nobuild=$(grep -v '^#' IGNORE) -specs=`perl show-build-order.pl | - grep -v '^#' | - grep -Eo '[^[:space:]]+/mingw-[^[:space:]]+\.spec'` +rm -f */*.src.rpm -rm -f buildall.log -echo -e "Specfiles in build order:\n$specs\n\n" >> buildall.log +# If any extra SRPMS need to be considered, list them here. Otherwise +# leave this empty. +srpms="" -pwd=`pwd` +for dir in *; do + if ! echo "$nobuild" | grep -sq "^$dir\$"; then + if [ -d $dir -a -f $dir/*.spec ]; then + if ! rpmbuild -bs --define "_sourcedir $(pwd)/$dir" --define "_srcrpmdir $(pwd)/$dir" $dir/*.spec; then + echo "Failed to create a source RPM in directory $dir." + echo "If you want to ignore this directory, you should add" + echo "it to the 'nobuild' list in this script." + exit 1 + fi + srpms="$srpms $(pwd)/$dir/*.src.rpm" + fi + fi +done -for spec in $specs -do - set -e - dir=`dirname $spec` - srcrpm=`rpmbuild --define "_sourcedir $pwd/$dir" -bs $spec | - awk '{print $2}'` - smock/smock $DIST $srcrpm -done 2>&1 | tee -a buildall.log +smock/smock.pl --arch=i386 --arch=x86_64 --distro=fedora-10 $srpms