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...
6 # The command line must have the following parameters:
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)
12 # 4. the remaining args are the versions of Python to build for
14 # ---------------------------------------------------------------------------
19 echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
22 echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..."
35 echo "*** Setting up RPM build dirs"
36 for dir
in SPECS BUILD RPMS SRPMS tmp
; do
37 if [ ! -d $rpmtop/$dir ]; then
41 if [ ! -e $rpmtop/SOURCES
]; then
42 ln -s $PWD $rpmtop/SOURCES
45 rpmbuild
--define "_topdir $PWD/$rpmtop" \
46 --define "_tmppath $PWD/$rpmtop/tmp" \
47 --define "release $RELEASE" \
54 echo "*** Moving RPMs to ."
55 find $rpmtop -name "*.rpm"
56 mv -f `find $rpmtop -name "*.rpm"` .
58 echo "*** Cleaning up $rpmtop"
65 echo "Building the RPMs for Python $ver..."
66 for port
in GTK GTK2
; do
67 rpm2cpio wxPython
$port-py$ver-$VERSION-1.src.rpm
| \
68 cpio --extract -R root.
69 DoRPMBuild
-ba wxPython
$port.spec
74 if [ $SKIPCLEAN != yes ]; then
77 rm wxPythonGTK
-py$ver-$VERSION-*.src.rpm
78 rm wxPythonGTK2
-py$ver-$VERSION-*.src.rpm
83 echo "-=-=-=- Goodbye! -=-=-=-"