X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5797a657ec112113e9756416b85ea5f75dedc320..d8d7193d767beecab7335e58df1fa0d25ae1e2ea:/wxPython/distrib/all/build-linux diff --git a/wxPython/distrib/all/build-linux b/wxPython/distrib/all/build-linux index 7a632ae24c..0a2e6b882e 100755 --- a/wxPython/distrib/all/build-linux +++ b/wxPython/distrib/all/build-linux @@ -18,41 +18,75 @@ set -o errexit echo "-=-=-=- Hello from $HOSTNAME -=-=-=-" -if [ $# -lt 4]; then +if [ $# -lt 4 ]; then echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..." exit 1 fi -DESTDIR=$1 +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 + +if which rpmbuild > /dev/null 2>&1; then + RPMBUILD=rpmbuild +else + RPMBUILD=rpm +fi + + +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 + + if [ $? != 0 ]; then + return $? + fi +} -cd $DESTDIR +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 wxPythonGTK-py$ver-$VERSION-1.src.rpm - myrpmbuild --rebuild 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..." - for ver in $PYVER; do - rm wxPythonGTK-py$ver-$VERSION-1.src.rpm - done + rm *.spec *.tar.gz fi echo "-=-=-=- Goodbye! -=-=-=-"