]>
Commit | Line | Data |
---|---|---|
36e91097 RD |
1 | #!/bin/bash |
2 | # --------------------------------------------------------------------------- | |
3 | # Build the wxPython source RPMs on a Linux box. This is normally called | |
4 | # from build-all but it should be able to be used standalone too... | |
5 | # | |
6 | # The command line must have the following parameters: | |
7 | # | |
8 | # 1. the path to the base of the wx source tree | |
9 | # 2. the path of where to put the resulting RPMs | |
10 | # 3. skipclean flag (yes|no) | |
11 | # 4. the VERSION | |
12 | # 5. the remaining args are the versions of Python to build for | |
13 | # | |
14 | # --------------------------------------------------------------------------- | |
15 | ||
16 | set -o errexit | |
17 | #set -o xtrace | |
18 | ||
19 | echo "-=-=-=- Hello from $HOSTNAME -=-=-=-" | |
20 | ||
21 | if [ $# -lt 5 ]; then | |
22 | echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..." | |
23 | exit 1 | |
24 | fi | |
25 | ||
26 | WXDIR=$1 | |
27 | DESTDIR=$2 | |
28 | SKIPCLEAN=$3 | |
29 | VERSION=$4 | |
30 | shift;shift;shift;shift | |
31 | PYVER=$@ | |
32 | ||
33 | # Since this is probably a VMWare guest, make sure that the date and | |
34 | # time are correct | |
35 | ntpdate gate.alldunn.com | |
36 | ||
37 | ||
38 | # In this case $WXDIR is where we will build at, but the source tree | |
39 | # won't be there like the other builds. The source RPMs will be in | |
40 | # $DESTDIR, and we'll put the binary RPMs back there when done. | |
41 | ||
42 | echo "Preparing $WXDIR..." | |
43 | mkdir -p $WXDIR | |
44 | cd $WXDIR | |
45 | rm -rf * | |
46 | ||
47 | for ver in $PYVER; do | |
48 | echo "Building the RPMs for Python $ver..." | |
49 | myrpmbuild --rebuild $DESTDIR/wxPythonGTK-py$ver-$VERSION-1.src.rpm | |
50 | myrpmbuild --rebuild $DESTDIR/wxPythonGTK2-py$ver-$VERSION-1.src.rpm | |
51 | done | |
52 | ||
53 | ||
54 | echo "Copying RPMs to $DESTDIR..." | |
55 | cp wxPythonGTK*.i[0-9]86.rpm $DESTDIR | |
56 | cd $DESTDIR | |
57 | ||
58 | ||
59 | if [ $SKIPCLEAN != yes ]; then | |
60 | echo "Cleaning up..." | |
61 | rm -rf $WXDIR | |
62 | fi | |
63 | ||
64 | echo "-=-=-=- Goodbye! -=-=-=-" |