description="Applet for managing network connections."
url="http://www.gnome.org/"

packager="Tnut <tnut@nutyx.org>"
contributors="Fanch,Tnut,Rems"

makedepends=(meson ninja gcr gtk3 iso-codes gobject-introspection
             libsecret libnotify networkmanager polkit-gnome
             modemmanager libnma)
run=(polkit-gnome gtk-update-icon-cache)

name=network-manager-applet
version=1.30.0
release=2

source=(https://download.gnome.org/sources/${name}/${version%.*}/${name}-$version.tar.xz)
 
build() {
mkdir build
cd    build
meson --prefix=/usr     \
      --sysconfdir=/etc \
      -Dappindicator=no \
      -Dselinux=false   \
      -Dteam=false      \
      ../$name-$version
ninja
DESTDIR=$PKG ninja install
}
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 "-" -f5`"
echo "$lastversion"
}
