description="GUI interface for some of the most common command line network tools"
url="http://www.gnome.org/"

packager="Spiky <spiky@nutyx.org>"
contributors="Jayce,Tnut"

makedepends=(gtk3 itstool libgtop vala bind traceroute net-tool-cvs whois)
run=(gsettings-desktop-schemas desktop-file-utils gtk-update-icon-cache nmap)

name=gnome-nettool
version=42.0

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

prepare() {
sed -i "s@s odipodi-0.dtd@sodipodi-0.dtd@" \
$name-$version/pixmaps/icons/scalable/apps/gnome-nettool.svg

cd $name-$version
sed -i '/i18n.merge_file/s/(.*/(/' $(find -name meson.build)
patch -Np1 -i ../gnome-nettool-42.0-ping_and_netstat_fixes-1.patch
}

build() {
cd $name-$version

mkdir build
cd    build

meson --prefix=/usr \
      --buildtype=release

ninja

DESTDIR=$PKG ninja install
}
