# Depends on: glib graphviz libxslt help2man

description="Programming language which bring news features of languages of programming modern to developers GNOME"
url="http://live.gnome.org/Vala"
packager="tnut <tnut@nutyx.org>"
contributors="Pierre B"

name=vala
version=0.42.3
release=2

source=(http://ftp.gnome.org/pub/gnome/sources/vala/${version%.*}/$name-$version.tar.xz )

build() {
cd $name-$version

./configure --prefix=/usr
make
make DESTDIR=$PKG install
rm $PKG/usr/lib/libvala-0.42.la
rm $PKG/usr/lib/vala-0.42/libvalaccodegen.la

# Obsolets libs
rm $PKG/usr/lib/libvaladoc-0.42.la
rm $PKG/usr/lib/valadoc/doclets/devhelp/libdoclet.la
rm $PKG/usr/lib/valadoc/doclets/gtkdoc/libdoclet.la
rm $PKG/usr/lib/valadoc/doclets/html/libdoclet.la
}

uptodate(){
local latest lastversion url
url="http://ftp.gnome.org/pub/gnome/sources/$name"
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"
}
