#Packager: Dimitris Tzemos <dijemos~at~gmail~dot~com>

pkgname=libvdpau-va-gl
pkgver=0.4.2
pkgrel=1dj
source=("https://github.com/i-rinat/libvdpau-va-gl/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
docs=("ChangeLog" "LICENSE" "README.md")
url=https://github.com/i-rinat/libvdpau-va-gl

doinst() {
if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
  if [ -x /usr/bin/gtk-update-icon-cache ]; then
    /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
  fi
fi
}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"libvdpau-va-gl (VDPAU driver with VA-API/OpenGL backend)"
"libvdpau-va-gl: VDPAU driver with VA-API/OpenGL backend."
""
"https://github.com/i-rinat/libvdpau-va-gl"
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	
	mkdir -p build
	cd build
	cmake \
	-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
	-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DLIB_SUFFIX=${LIBDIRSUFFIX} \
	-DCMAKE_BUILD_TYPE=Release \
	..
	make  || return 1
	make install/strip DESTDIR=$startdir/pkg || return 1
	cd ..
} 
