Ignore qt-win tarball.
[fedora-mingw.git] / build-everything-in-mock.sh
1 #!/bin/bash -
2
3 set -e
4
5 # These are the packages we don't want to build yet:
6 nobuild=$(grep -v '^#' IGNORE)
7
8 # Keep going - don't stop when smock hits an error.
9 keepgoing=--keepgoing
10
11 rm -f */*.src.rpm
12
13 # If any extra SRPMS need to be considered, list them here.  Otherwise
14 # leave this empty.
15 srpms=""
16
17 for dir in *; do
18     if ! echo "$nobuild" | grep -sq "^$dir\$"; then
19         if [ -d $dir -a -f $dir/*.spec ]; then
20                 if ! rpmbuild -bs --define "_sourcedir $(pwd)/$dir" --define "_srcrpmdir $(pwd)/$dir" $dir/*.spec; then
21                   echo "Failed to create a source RPM in directory $dir."
22                   echo "If you want to ignore this directory, you should add"
23                   echo "it to the IGNORE file in the top level directory."
24                   exit 1
25                 fi
26                 srpms="$srpms $(pwd)/$dir/*.src.rpm"
27         fi
28     fi
29 done
30
31 # Rawhide build everything:
32
33 smock/smock.pl \
34   --arch=i386 \
35   --arch=x86_64 \
36   --distro=fedora-rawhide \
37   $keepgoing \
38   $srpms
39
40 # In Fedora 10 don't try to build the OCaml RPMs since they
41 # require OCaml 3.11 which was not in Fedora 10:
42
43 srpms_no_ocaml=""
44 for f in $srpms; do
45     case $f in
46     *ocaml* | *virt-top*) ;;
47     *) srpms_no_ocaml="$srpms_no_ocaml $f" ;;
48     esac
49 done
50
51 smock/smock.pl \
52   --arch=i386 \
53   --arch=x86_64 \
54   --distro=fedora-10 \
55   $keepgoing \
56   $srpms_no_ocaml