]> git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/all/build-chrpm
fixed wxVsnprintf() to write as much as it can if the output buffer is too short
[wxWidgets.git] / wxPython / distrib / all / build-chrpm
1 #!/bin/bash
2 #----------------------------------------------------------------------
3
4 set -o errexit
5 #set -o xtrace
6
7 host=$1
8 chRootRoot=$2
9 chRootName=$3
10 reltag=$4
11 pyver=$5
12
13
14 if [ $buildansi = yes ]; then
15 CHARTYPE=both
16 else
17 CHARTYPE=unicode
18 fi
19
20
21 function TestOnline {
22 local host=$1
23 local message=$2
24
25 if ping -q -c1 -w1 $host > /dev/null; then
26 return 0
27 else
28 return 1
29 fi
30 }
31
32
33
34 if [ $skipdeb != yes ]; then
35 # We use a chroot environment on the build machine for the debian
36 # builds, so this build is pretty simple. Just copy the tarball
37 # and a build script to the build machine, and then run
38 # do-build-deb in the chroot.
39
40 if TestOnline $host; then
41
42 echo "The $host machine is online, build continuing..."
43
44 echo "Copying source files and build script..."
45 ssh root@$host "mkdir -p $chRootRoot/$LINUX_BUILD && rm -rf $chRootRoot/$LINUX_BUILD/*"
46 scp $STAGING_DIR/wxPython-src* distrib/all/do-build-rpm $STAGING_DIR/wxPython.spec \
47 root@$host:$chRootRoot/$LINUX_BUILD
48
49 ssh root@$host "dchroot --chroot $chRootName --directory $LINUX_BUILD \"./do-build-rpm $reltag $skipclean $VERSION $pyver $CHARTYPE\""
50
51 echo "Fetching the results..."
52 ssh root@$host "rm $chRootRoot/$LINUX_BUILD/do-build-rpm"
53 scp "root@$host:$chRootRoot/$LINUX_BUILD/wxPython*.i[0-9]86.rpm" $STAGING_DIR
54 ssh root@$host "rm $chRootRoot/$LINUX_BUILD/wxPython*.i[0-9]86.rpm"
55 echo "Done!"
56 else
57 echo "The $host machine is **OFFLINE**, skipping the binary RPM build."
58 exit 0
59 fi
60 fi
61