# Template file for 'oneVPL'
pkgname=oneVPL
version=2023.3.1
revision=2
build_style=cmake
hostmakedepends="pkg-config"
makedepends="libva-devel libX11-devel"
short_desc="Intel oneAPI Video Processing Library"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="MIT"
homepage="https://github.com/oneapi-src/oneVPL"
changelog="https://github.com/oneapi-src/oneVPL/blob/master/CHANGELOG.md"
distfiles="https://github.com/oneapi-src/oneVPL/archive/refs/tags/v$version.tar.gz"
checksum=914530a80bdb155d3a4d50916ff34451da48584269e37075a48bd74a74e3d847

post_install() {
	vlicense LICENSE
}

oneVPL-devel_package() {
	short_desc+=" - development files"
	depends="${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove etc/vpl/vars.sh
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove usr/lib/cmake
		vmove "usr/lib/*.so"
	}
}

oneVPL-examples_package() {
	short_desc+=" - examples"
	depends="${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/bin/sample_decode
		vmove usr/bin/sample_encode
		vmove usr/bin/sample_multi_transcode
		vmove usr/bin/sample_vpp
		vmove usr/bin/vpl-inspect
		vmove usr/share/vpl/examples
	}
}
