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

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="WiFi/BT, Modem, GPU, Venus firmware"
	depends="
		linux-firmware-qcom
		linux-firmware-qca
		linux-firmware-ath10k
		firmware-google-trogdor
		soc-qcom-sc7180-nonfree-firmware
		msm-cros-efs-loader
	"
	mkdir "$subpkgdir"
}


sha512sums="
e2eee558c89272358b4531ef9d7b7cefc937702c17985c3067181029a7f2c8545f68c3634d515fee6d12229d09f52b6f2b4ae804449f37c11b3aa9e5bcfaaced  deviceinfo
ef0257928f28aff25e6c625fabfd0942b01d4d86f1b523212ca825cf80f8b7a6c20ff17bfb02cb19f2a5d8787326ba22ad560a957c8d3c38b9ec70f1e16f9117  modules-initfs
"
