X-Git-Url: http://git.annexia.org/?p=fedora-mingw.git;a=blobdiff_plain;f=build-everything-in-mock.sh;h=782bea26f72a147074593cc16da03523cba63d6a;hp=a644ae5676fdcbe83038758e533bf64d4131ed6d;hb=90e292e971c13ea2ac3d963730c8694dd60e406a;hpb=23c7bad0ad5bfbcff1748f1fbdd7f536a084a6e3 diff --git a/build-everything-in-mock.sh b/build-everything-in-mock.sh index a644ae5..782bea2 100755 --- a/build-everything-in-mock.sh +++ b/build-everything-in-mock.sh @@ -1,45 +1,56 @@ #!/bin/bash - -DIST=fedora-9 -SKIP_BUILT_RPMS=1 - -LOCALREPO=$HOME/public_html/smock/yum -ARCHES="i386 x86_64" - -export DIST SKIP_BUILT_SRPMS LOCALREPO ARCHES - -specs=`perl show-build-order.pl | - grep -v '^#' | - grep -Eo '[^[:space:]]+/mingw-[^[:space:]]+\.spec'` - -rm -f buildall.log -echo -e "Specfiles in build order:\n$specs\n\n" >> buildall.log - -pwd=`pwd` - -for spec in $specs -do - set -e - dir=`dirname $spec` - srcrpm=`rpmbuild --define "_sourcedir $pwd/$dir" -bs $spec` - if [ $? != 0 ]; then exit 1; fi - srcrpm=`echo $srcrpm | awk '{print $2}'` - - # Test if all the output RPMs exist already. - skip= - if [ $SKIP_BUILT_RPMS ]; then - skip=1 - baserpm=`basename $srcrpm | sed 's/\.fc[[:digit:]]*\.src\.rpm//g'` - for arch in $ARCHES; do - if [ ! -f $LOCALREPO/$DIST/$arch/RPMS/$baserpm.* ]; then - skip= - fi - done +set -e + +# These are the packages we don't want to build yet: +nobuild=$(grep -v '^#' IGNORE) + +# Keep going - don't stop when smock hits an error. +keepgoing=--keepgoing + +rm -f */*.src.rpm + +# If any extra SRPMS need to be considered, list them here. Otherwise +# leave this empty. +srpms="" + +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 IGNORE file in the top level directory." + exit 1 + fi + srpms="$srpms $(pwd)/$dir/*.src.rpm" + fi fi - - if [ $skip ]; then - echo "skipping $srcrpm" - else - smock/smock.sh $DIST $srcrpm - fi -done 2>&1 | tee -a buildall.log +done + +# Rawhide build everything: + +smock/smock.pl \ + --arch=i386 \ + --arch=x86_64 \ + --distro=fedora-rawhide \ + $keepgoing \ + $srpms + +# In Fedora 10 don't try to build the OCaml RPMs since they +# require OCaml 3.11 which was not in Fedora 10: + +srpms_no_ocaml="" +for f in $srpms; do + case $f in + *ocaml* | *virt-top*) ;; + *) srpms_no_ocaml="$srpms_no_ocaml $f" ;; + esac +done + +smock/smock.pl \ + --arch=i386 \ + --arch=x86_64 \ + --distro=fedora-10 \ + $keepgoing \ + $srpms_no_ocaml