# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Jenneron <jenneron@protonmail.com>
pkgname=device-google-corsola
pkgdesc="Google Corsola Chromebooks"
pkgver=2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	alsa-ucm-conf
	depthcharge-tools
	linux-postmarketos-mediatek-mt81xx
	postmarketos-base
	postmarketos-cros-common
	soc-mediatek-mt8183
"
makedepends="devicepkg-dev"
source="deviceinfo modules-initfs"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="WiFi/BT firmware"
	depends="linux-firmware-mediatek"
	mkdir "$subpkgdir"
}

sha512sums="
924d60f2d921a9e22a34c945f55cb45c6c19245aeaec4993ae03fcafc91c1533632c61178f1836cbd11b581a26fa2bed5445e12f2ecccb4096a0ee33f7cb2772  deviceinfo
56fdcaa7a610497ed1bddbbfc0850f895bcfd79173b2e7de4bcf196f69120e1b62680da2a0b74543f153cb3d2b84055e71e258e7df938913aff66dca47061d7a  modules-initfs
"
