# Depends on: cmake qtbase

description="A style to bend Qt applications to look like they belong into GNOME Shell"
url="https://github.com/MartinBriza/adwaita-qt"
packager="greg<greg@nutyx.org>"
contributors=""

run=()



name=adwaita-qt
version=1.0
release=1

source=(https://github.com/MartinBriza/$name/archive/$version.tar.gz
)

prepare() {
mkdir -p $name-$version/build-qt5
}

build() {
cd $name-$version
pushd build-qt5
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DQT_ROOT=/usr/lib/qt
popd
make -C build-qt5
}

package() {
cd $name-$version
make install/fast DESTDIR=$PKG -C build-qt5
}

uptodate() {
feed=https://github.com/MartinBriza/adwaita-qt/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>@@" | \
head -n $(($ligne+1 )) | \
tail -n $(($ligne))
}

