X-Git-Url: http://git.annexia.org/?p=fedora-mingw.git;a=blobdiff_plain;f=build-everything-in-mock.sh;h=782bea26f72a147074593cc16da03523cba63d6a;hp=4f0245037c96a435af5636458336b31f09e93b71;hb=966f55f8692da3f842da077e57c22ff501e380e1;hpb=4d853c2dd1748e9c25014db7b114e587f038704c diff --git a/build-everything-in-mock.sh b/build-everything-in-mock.sh index 4f02450..782bea2 100755 --- a/build-everything-in-mock.sh +++ b/build-everything-in-mock.sh @@ -1,26 +1,56 @@ #!/bin/bash - +set -e + # These are the packages we don't want to build yet: -nobuild="example -cyrus-sasl -gdb -pidgin -python -nspr -nss -wix" +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 - ( - cd $dir - rpmbuild -bs --define "_sourcedir $(pwd)" --define "_srcrpmdir $(pwd)" *.spec - ) + 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 done -smock/smock.pl --arch=i386 --arch=x86_64 --distro=fedora-10 */*.src.rpm +# 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