#!/bin/sh
#wget ........

tar --directory /usr/src/packages/SOURCES -xzvf /usr/src/packages/SOURCES/wxPython-src-2.5.3.1.tar.gz
cd /usr/src/packages/SOURCES/wxPython-src-2.5.3.1/
export WXDIR="/usr/src/packages/SOURCES/wxPython-src-2.5.3.1/"

cd $WXDIR

mkdir bld
cd bld

echo "../configure --prefix=/opt/wx/2.5-3-1 --with-gtk --with-opengl --enable-debug --enable-geometry --enable-sound --with-sdl --enable-display --enable-unicode --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=builtin --with-zlib=builtin" >.configure.sh

chmod +x .configure.sh


echo "make && make -C contrib/src/gizmos && make -C contrib/src/ogl CXXFLAGS='-DwxUSE_DEPRECATED=0' && make -C contrib/src/stc $*" >.make.sh

chmod +x .make.sh

./.configure.sh
./.make.sh
./.make.sh install

export PATH=$PATH:/opt/wx/2.5-3-1/bin
export LD_LIBRARY_PATH=/opt/wx/2.5-3-1/lib

cd $WXDIR/wxPython

python2.3 setup.py build_ext --inplace --debug WX_CONFIG=/opt/wx/2.5-3-1/bin/wx-config  UNICODE=1