# Depends on: python2-gobject2 python2-cairo libglade 

description="provides the links of Python 2 for the class GObject of GLib."
url="http://www.gnome.org/"
packager="tnut <tnut@nutyx.org>"
contributors="Pierre B"

run=( python2-gobject2 python2-cairo )

name=python2-gtk
version=2.24.0
release=2

source=(http://ftp.gnome.org/pub/gnome/sources/pygtk/${version%.*}/pygtk-$version.tar.bz2)
	
build() {
cd pygtk-$version
./configure --prefix=/usr
make
make DESTDIR=$PKG install

# Obsolets libs
rm $PKG/usr/lib/python2.7/site-packages/gtk-2.0/atk.la
rm $PKG/usr/lib/python2.7/site-packages/gtk-2.0/gtk/_gtk.la
rm $PKG/usr/lib/python2.7/site-packages/gtk-2.0/gtk/glade.la
rm $PKG/usr/lib/python2.7/site-packages/gtk-2.0/gtkunixprint.la
rm $PKG/usr/lib/python2.7/site-packages/gtk-2.0/pango.la
rm $PKG/usr/lib/python2.7/site-packages/gtk-2.0/pangocairo.la
}
uptodate(){
local latest lastversion url
url="http://ftp.gnome.org/pub/gnome/sources/pygtk"
latest="`lynx -read_timeout=20 -dump -listonly -nonumbers \
$url/?C=N\;O=D|grep [0-9]/$|head -1`"
lastversion="`lynx -read_timeout=20 -dump -listonly -nonumbers \
$latest/?C=N\;O=D|grep LATEST|grep [0-9]$|cut -d "-" -f3`"
echo "$lastversion"
}
