description="A help browser for viewing help files."
url="http://www.gnome.org/"

packager="Tnut <tnut@nutyx.org>"
contributors="Greg,Tnut,Spiky"

makedepends=(itstool intltool gtk-doc libxslt webkit2gtk-4 yelp-xsl gsettings-desktop-schemas libhandy)
run=(desktop-file-utils hicolor-icon-theme )

name=yelp
version=42.2
release=2

source=(https://download.gnome.org/sources/$name/${version%.*}/$name-$version.tar.xz)

build() {

cd $name-$version
./configure --prefix=/usr --disable-static
make
make DESTDIR=$PKG install
# Obsolets libs
rm $PKG/usr/lib/libyelp.la
rm $PKG/usr/lib/yelp/web-extensions/libyelpwebextension.la
}
uptodate(){
local latest lastversion url
url="https://download.gnome.org/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"
}
