# Reference: <https://postmarketos.org/devicepkg>
maintainer="Ali Nasrullayev <nesrullayev.ali@gmail.com>"
pkgname=device-xiaomi-vayu
pkgdesc="Xiaomi POCO X3 Pro"
pkgver=5
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	firmware-qcom-adreno-a640
	firmware-xiaomi-vayu
	linux-firmware-qca
	make-dynpart-mappings
	mkbootimg
	postmarketos-base
	soc-qcom
	soc-qcom-modem
	soc-qcom-pd-mapper
	soc-qcom-qbootctl
"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-kernel-tianma:kernel_tianma
	$pkgname-kernel-huaxing:kernel_huaxing
"
source="
	deviceinfo
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

kernel_tianma() {
	pkgdesc="Tianma Panel. To know which panel your device use and the status of the port, Visit the Poco X3 Pro wiki page: https://wiki.postmarketos.org/wiki/Xiaomi_POCO_X3_Pro_(xiaomi-vayu)"
	depends="linux-postmarketos-qcom-sm8150"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

kernel_huaxing() {
	pkgdesc="Huaxing Panel. To know which panel your device use and the status of the port, Visit the Poco X3 Pro wiki page: https://wiki.postmarketos.org/wiki/Xiaomi_POCO_X3_Pro_(xiaomi-vayu)"
	depends="linux-postmarketos-qcom-sm8150"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

sha512sums="
a199525d3edfaad447848a4042da89b8286ecd541d1fb89525598cdd6af3c0136e193a1f23c6411991ff00a31ed0399bd020b21a44605017f2d81f56d6ff2837  deviceinfo
"
