# Depends on: kconfig kcoreaddons kcrash kdbusaddons ki18n kdoctools

description="Advanced plugin and service introspection "
url="https://www.kde.org/"
packager="tnut <tnut@nutyx.org>"
contributors="Pierre B"

name=kservice
version=5.53.0

source=(http://download.kde.org/stable/frameworks/${version%.*}/${name}-$version.tar.xz)

build() {
unset MAKEFLAGS
cd $name-$version
mkdir build
cd    build
cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DBUILD_TESTING=OFF \
    -DBUILD_QCH=ON
make
make DESTDIR=$PKG install
}

uptodate() {
feed=https://github.com/KDE/$name/releases.atom 
exec="lynx -read_timeout=20 -dump -listonly -nonumbers $feed"
ligne=1 # nombre de notification ? afficher
$exec $feed | grep title | \
sed "s@<title>@@" | \
sed "s@</title>@@" | \
sed "s@v@@" | \
head -n $(($ligne+1 )) | \
tail -n $(($ligne))
}
