maint: remove -j2 flags on Fedora/OpenSUSE to workaround Make 3.82 borkage
[barry/progweb.git] / maintainer / bmchroots
blob2de594caa61253bcce2ed39e634d660867a9939a
2 # This script is run from the top level scripts.  You can rely on
3 # the following environment variables being set:
5 #    $BMTARBALL  - relative path to the release source tarball (bz2)
6 #    $BMTARBASE  - basename of the source tarball (bz2)
7 #    $BMBUILDDIR - directory to place resulting binary package tree
10 set -e
12 rm -rf /tmp/bmchroots
13 mkdir -p /tmp/bmchroots
16 # Build the DEB's
18 function do_ubuntu() {
19         ./save.sh "/tmp/bmchroots/$1" "$2" "$3" \
20                 ./chroot.sh cdfrey /var/chroot/$1 \
21                         "$BMTARBALL make-deb.sh" \
22                         /var/chroot/$1/home/cdfrey/barrychroot/bmbuild/results \
23                         /tmp/bmchroots/$1 \
24                         cdfrey \
25                 ./make-deb.sh "$BMTARBASE" \
26                         "$4" \
27                         bmbuild bmbuild
31 # Build the Fedora RPM's
33 function do_fedora() {
34         ./save.sh "/tmp/bmchroots/$1" "$2" "$4" \
35                 ./chroot.sh cdfrey "/var/chroot/$1" \
36                         "$BMTARBALL make-bm-rpm.sh" \
37                         /var/chroot/$1/home/cdfrey/rpmbuild/bmbuild/results \
38                         /tmp/bmchroots/$1 \
39                         cdfrey \
40                 ./make-bm-rpm.sh \
41                         "$BMTARBASE" \
42                         "$5" \
43                         /home/cdfrey \
44                         /home/cdfrey/rpmbuild/bmbuild
45         mkdir -p "$3"
46         mv "$2"/*src.rpm "$3"
49 # Ubuntu 8.04 has trouble building KDEPIM / akonadi-sync, so skip those
50 do_ubuntu ubuntu804 "$BMBUILDDIR/dists/ubuntu804/main/binary-i386" "" \
51         "touch deb-akonadi-latest deb-kdepim-0.2x && make -j2 debian-all"
52 do_ubuntu ubuntu1004 "$BMBUILDDIR/dists/ubuntu1004/main/binary-i386" "" \
53         "make -j2 debian-all"
54 # Ubuntu 11.04 (Natty) is also good for Mint 11
55 do_ubuntu ubuntu1104 "$BMBUILDDIR/dists/ubuntu1104/main/binary-i386" "" \
56         "make -j2 debian-all"
57 # Ubuntu 11.10 (Oneiric) should also be good for Mint 12
58 do_ubuntu ubuntu1110 "$BMBUILDDIR/dists/ubuntu1110/main/binary-i386" "" \
59         "make -j2 debian-all"
61 # Fedora and openSUSE use make 3.82, which is buggy and doesn't handle
62 # parallel builds safely all cases.  So we can't use any -j options here.
63 # http://lists.gnu.org/archive/html/bug-make/2012-01/msg00042.html
64 do_fedora fedora14 \
65         "$BMBUILDDIR/dists/fedora14/i386/RPMS" \
66         "$BMBUILDDIR/dists/fedora14/source-i386/SRPMS" \
67         "" "make rpm-all"
68 do_fedora fedora16 \
69         "$BMBUILDDIR/dists/fedora16/i686/RPMS" \
70         "$BMBUILDDIR/dists/fedora16/source-i686/SRPMS" \
71         "" "make rpm-all"
72 do_fedora opensuse12.1 \
73         "$BMBUILDDIR/dists/opensuse12.1/i586/RPMS" \
74         "$BMBUILDDIR/dists/opensuse12.1/source-i586/SRPMS" \
75         "" "make rpm-libtar rpm-all"
77 chown -R cdfrey:cdfrey "$BMBUILDDIR"
80 # Cleanup
82 rm -rf /tmp/bmchroots