X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5dda6ad8b673ae4cd0139b4d58f1e015cd934b65..38d45b10146b37f688da3ca172942c4e71637594:/wxPython/distrib/all/build-linux?ds=sidebyside diff --git a/wxPython/distrib/all/build-linux b/wxPython/distrib/all/build-linux index 8872d26222..f0660d8626 100755 --- a/wxPython/distrib/all/build-linux +++ b/wxPython/distrib/all/build-linux @@ -5,11 +5,11 @@ # # The command line must have the following parameters: # -# 1. the path to the base of the wx source tree -# 2. the path of where to put the resulting RPMs -# 3. skipclean flag (yes|no) -# 4. the VERSION -# 5. the remaining args are the versions of Python to build for +# 1. the path of the build dir. The src RPMs will be here when we start +# and the binary RPMs will be left here when we're done. +# 2. skipclean flag (yes|no) +# 3. the VERSION +# 4. the remaining args are the versions of Python to build for # # --------------------------------------------------------------------------- @@ -18,47 +18,68 @@ set -o errexit echo "-=-=-=- Hello from $HOSTNAME -=-=-=-" -if [ $# -lt 5 ]; then +if [ $# -lt 4 ]; then echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..." exit 1 fi -WXDIR=$1 -DESTDIR=$2 -SKIPCLEAN=$3 -VERSION=$4 -shift;shift;shift;shift +RELEASE=$1 +SKIPCLEAN=$2 +VERSION=$3 +shift;shift;shift PYVER=$@ -# Since this is probably a VMWare guest, make sure that the date and -# time are correct -ntpdate gate.alldunn.com +rpmtop=_rpm_top +function DoRPMBuild { + # $1 : python version + # $2 : port + # $3 : unicode + + rpmbuild --define "_topdir $PWD/$rpmtop" \ + --define "_tmppath $PWD/$rpmtop/tmp" \ + --define "release ${RELEASE}_py$1" \ + --define "pyver $1" \ + --define "port $2" \ + --define "unicode $3" \ + -bb wxPython.spec -# In this case $WXDIR is where we will build at, but the source tree -# won't be there like the other builds. The source RPMs will be in -# $DESTDIR, and we'll put the binary RPMs back there when done. + if [ $? != 0 ]; then + return $? + fi +} -echo "Preparing $WXDIR..." -mkdir -p $WXDIR -cd $WXDIR -rm -rf * + +echo "*** Setting up RPM build dirs" +for dir in SPECS BUILD RPMS SOURCES SRPMS tmp; do + if [ ! -d $rpmtop/$dir ]; then + mkdir -p $rpmtop/$dir + fi +done + +cp wxPython-src-$VERSION.tar.gz $rpmtop/SOURCES + +echo "******************** PYVER = " $PYVER for ver in $PYVER; do echo "Building the RPMs for Python $ver..." - myrpmbuild --rebuild $DESTDIR/wxPythonGTK-py$ver-$VERSION-1.src.rpm - myrpmbuild --rebuild $DESTDIR/wxPythonGTK2-py$ver-$VERSION-1.src.rpm + DoRPMBuild $ver gtk 0 + DoRPMBuild $ver gtk2 1 + DoRPMBuild $ver gtk2 0 done -echo "Copying RPMs to $DESTDIR..." -cp wxPythonGTK*.i[0-9]86.rpm $DESTDIR -cd $DESTDIR +echo "*** Moving RPMs to ." +find $rpmtop -name "*.rpm" +mv -f `find $rpmtop -name "*.rpm"` . if [ $SKIPCLEAN != yes ]; then + echo "*** Cleaning up $rpmtop" + rm -rf $rpmtop + echo "Cleaning up..." - rm -rf $WXDIR || true + rm *.spec *.tar.gz fi echo "-=-=-=- Goodbye! -=-=-=-"