# Depends on: gtk3 perl-xml-parser xorg-libxt xorg-libxres startup-notification xorg-libxinerama xorg-libxrandr xorg-libxcursor xorg-libxdamage intltool gobject-introspection

description="Window Navigator Construction Kit (GTK+3)."
url="http://www.gnome.org/"
packager="tnut <tnut@nutyx.org>"
contributors="Pierre B"

name=libwnck
version=3.30.0
release=2

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

build() {
cd $name-$version
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--disable-static --enable-gtk-doc --enable-compile-warnings=minimum
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
make DESTDIR=$PKG install
# Obsolet lib
rm $PKG/usr/lib/libwnck-3.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"
}
