# Depends on: glib-networking libxml2 gobject-introspection vala sqlite ninja meson libpsl kerberos

description="HTTP client/server library for GNOME"
url="https://wiki,gnome.org/Projects/libsoup"
packager="tnut <tnut@nutyx.org>"
contributors="Pierre B, Tnut, Remy"

run=( glib-networking )
name=libsoup
version=2.64.2

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

build() {
cd $name-$version
mkdir build
cd    build
meson --prefix=/usr -Dvapi=true
ninja
DESTDIR=$PKG ninja install
}
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"
}
