Allow extra SRPMS to be specified.
[fedora-mingw.git] / build-everything-in-mock.sh
1 #!/bin/bash -
2
3 # These are the packages we don't want to build yet:
4 nobuild="example
5 cyrus-sasl
6 gdb
7 pidgin
8 python
9 python3
10 nspr
11 nss
12 virt-ctrl
13 wix"
14
15 rm -f */*.src.rpm
16
17 # If any extra SRPMS need to be considered, list them here.  Otherwise
18 # leave this empty.
19 srpms=""
20
21 for dir in *; do
22     if ! echo "$nobuild" | grep -sq "^$dir\$"; then
23         if [ -d $dir -a -f $dir/*.spec ]; then
24                 if ! rpmbuild -bs --define "_sourcedir $(pwd)/$dir" --define "_srcrpmdir $(pwd)/$dir" $dir/*.spec; then
25                   echo "Failed to create a source RPM in directory $dir."
26                   echo "If you want to ignore this directory, you should add"
27                   echo "it to the 'nobuild' list in this script."
28                   exit 1
29                 fi
30                 srpms="$srpms $(pwd)/$dir/*.src.rpm"
31         fi
32     fi
33 done
34
35 smock/smock.pl --arch=i386 --arch=x86_64 --distro=fedora-10 $srpms