]> git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/all/build-linux
Unnecessary wxString(wxString).
[wxWidgets.git] / wxPython / distrib / all / build-linux
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 of the build dir. The src RPMs will be here when we start
9 # and the binary RPMs will be left here when we're done.
10 # 2. skipclean flag (yes|no)
11 # 3. the VERSION
12 # 4. 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 4 ]; then
22 echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..."
23 exit 1
24 fi
25
26 RELEASE=$1
27 SKIPCLEAN=$2
28 VERSION=$3
29 shift;shift;shift
30 PYVER=$@
31
32 rpmtop=_rpm_top
33
34 function DoRPMBuild {
35 # $1 : python version
36 # $2 : port
37 # $3 : unicode
38
39 rpmbuild --define "_topdir $PWD/$rpmtop" \
40 --define "_tmppath $PWD/$rpmtop/tmp" \
41 --define "release ${RELEASE}_py$1" \
42 --define "pyver $1" \
43 --define "port $2" \
44 --define "unicode $3" \
45 -bb wxPython.spec
46
47 if [ $? != 0 ]; then
48 return $?
49 fi
50 }
51
52
53
54 echo "*** Setting up RPM build dirs"
55 for dir in SPECS BUILD RPMS SOURCES SRPMS tmp; do
56 if [ ! -d $rpmtop/$dir ]; then
57 mkdir -p $rpmtop/$dir
58 fi
59 done
60
61 cp wxPython-src-$VERSION.tar.gz $rpmtop/SOURCES
62
63 echo "******************** PYVER = " $PYVER
64 for ver in $PYVER; do
65 echo "Building the RPMs for Python $ver..."
66 DoRPMBuild $ver gtk 0
67 DoRPMBuild $ver gtk2 1
68 DoRPMBuild $ver gtk2 0
69 done
70
71
72 echo "*** Moving RPMs to ."
73 find $rpmtop -name "*.rpm"
74 mv -f `find $rpmtop -name "*.rpm"` .
75
76
77 if [ $SKIPCLEAN != yes ]; then
78 echo "*** Cleaning up $rpmtop"
79 rm -rf $rpmtop
80
81 echo "Cleaning up..."
82 rm *.spec *.tar.gz
83 fi
84
85 echo "-=-=-=- Goodbye! -=-=-=-"