# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-asus-x00td
pkgdesc="Asus ZenFone Max Pro M1"
pkgver=1
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base mkbootimg"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-kernel-downstream:kernel_downstream
	$pkgname-kernel-mainline:kernel_mainline
	$pkgname-nonfree-firmware:nonfree_firmware
"
source="deviceinfo modules-initfs"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

kernel_downstream() {
	pkgdesc="LineageOS downstream kernel (recommended)"
	depends="linux-asus-x00td msm-fb-refresher"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

kernel_mainline() {
	pkgdesc="Close to mainline; for kernel development only (most features aren't working)"
	depends="linux-postmarketos-qcom-sdm660"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

nonfree_firmware() {
	pkgdesc="Wifi, Bluetooth, GPU, Modem, ADSP, Venus firmware"
	depends="firmware-asus-x00td"
	mkdir "$subpkgdir"
}

sha512sums="
cf62307c453d29fcd531430aa3214d2cbf6313abeb42c7b3334bbf43ce7e11f3a88416e8071cc6042a750ab930a5b991689c089197eb06f1dc8584fe6fde614f  deviceinfo
06dd4eadb150d29ee6db13683c8d49e52c14e4c8da0a890d22d38c6ed8e87bd9a38e6ccdba831cae99cb70baf30bc775fdf9083f36d719530171c005556f47b7  modules-initfs
"
