maintainer="Clayton Craft <clayton@craftyguy.net>"
pkgname=oem-intel
pkgdesc="Intel device support"
pkgver=5
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="x86_64"
options="!check !archcheck"
depends="
	alsa-ucm-conf
	intel-ucode
	linux-firmware-i915
	linux-firmware-intel
	sof-firmware
	"
subpackages="
	$pkgname-libva
	$pkgname-vulkan
	"
source="
	00-oem-intel.modules
	00-oem-intel-i915-firmware.files
	"

package() {
	install -Dm644 00-oem-intel.modules \
		-t "$pkgdir"/usr/share/mkinitfs/modules
	install -Dm644 00-oem-intel-i915-firmware.files \
		-t "$pkgdir"/usr/share/mkinitfs/files
}

libva() {
	pkgdesc="libva support for Intel devices"
	install_if="$pkgname=$pkgver-r$pkgrel libva"
	depends="intel-media-driver libva-intel-driver"

	mkdir "$subpkgdir"
}

vulkan() {
	pkgdesc="vulkan support for Intel devices"
	install_if="$pkgname=$pkgver-r$pkgrel vulkan-loader"
	depends="mesa-vulkan-intel"

	mkdir "$subpkgdir"
}

sha512sums="
48b8c0454c8c80e7ad0ebd139c01790eed3fbd4265bf4ce64882d354b091ac7f63084eaf2b00d1244a7a692c73fa900193724577f9a8d753fa8b6743fe1c8990  00-oem-intel.modules
de194dc3f71529f5e75d6c253cecb36166d143de0e0e74ccd130bb5a356b9a88025ae5c3fbd957498c876539e5399f5f69f9c4e5a3a4d9d39c0bba912afb32c5  00-oem-intel-i915-firmware.files
"
