description="phonon-backend-gstreamer plugin audio for KDE"
url="https://www.kde.org/"

packager="tnut <tnut@nutyx.org>"
contributors="Pierre B"

makedepends=(phonon-qt gstreamer gstreamer-plugins-base gstreamer-plugins-good
             gstreamer-plugins-bad gstreamer-plugins-ugly libxml2 pulseaudio
             qtx11extras)

set=(kde5)

name=phonon-backend-gstreamer-qt
version=4.10.0

_name=phonon-backend-gstreamer

source=( http://download.kde.org/stable/phonon/${_name}/$version/${_name}-$version.tar.xz)

build() {
cd ${_name}-$version
mkdir build
cd    build
cmake -DCMAKE_BUILD_TYPE=Release    \
      -DCMAKE_SKIP_RPATH=ON         \
      -DCMAKE_INSTALL_PREFIX=/usr   \
      -DPHONON_BUILD_PHONON4QT5=ON  \
      -DCMAKE_INSTALL_LIBDIR=lib    \
      -Wno-dev ..

make
make DESTDIR=$PKG install
}

uptodate() {
feed=https://github.com/KDE/phonon-gstreamer/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))
}
