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"

makedepends=(python2-cairo xorg-libxxf86vm)

name=python2-gobject2
version=2.28.7
release=4

source=(https://download.gnome.org/sources/pygobject/${version%.*}/pygobject-$version.tar.xz)
	
build() {
cd pygobject-$version
./configure --prefix=/usr --disable-introspection
make
make DESTDIR=$PKG install

# Obsolets libs
rm $PKG/usr/lib/libpyglib-2.0-python.la
rm $PKG/usr/lib/python2.7/site-packages/glib/_glib.la
rm $PKG/usr/lib/python2.7/site-packages/gobject/_gobject.la
rm $PKG/usr/lib/python2.7/site-packages/gtk-2.0/gio/_gio.la
rm $PKG/usr/lib/python2.7/site-packages/gtk-2.0/gio/unix.la
}
uptodate(){
local latest lastversion url
url="https://download.gnome.org/sources/pygobject"
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"
} 
