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

# provides and replaces to switch old installations to this package
provides="
	device-google-burnet=$pkgver-r$pkgrel
	device-google-cerise=$pkgver-r$pkgrel
	device-google-cozmo=$pkgver-r$pkgrel
	device-google-damu=$pkgver-r$pkgrel
	device-google-fennel=$pkgver-r$pkgrel
	device-google-fennel14=$pkgver-r$pkgrel
	device-google-juniper=$pkgver-r$pkgrel
	device-google-kakadu=$pkgver-r$pkgrel
	device-google-kappa=$pkgver-r$pkgrel
	device-google-katsu=$pkgver-r$pkgrel
	device-google-kenzo=$pkgver-r$pkgrel
	device-google-kodama=$pkgver-r$pkgrel
	device-google-krane=$pkgver-r$pkgrel
	device-google-makomo=$pkgver-r$pkgrel
	device-google-stern=$pkgver-r$pkgrel
	device-google-willow=$pkgver-r$pkgrel
"
replaces="
	device-google-burnet
	device-google-cerise
	device-google-cozmo
	device-google-damu
	device-google-fennel
	device-google-fennel14
	device-google-juniper
	device-google-kakadu
	device-google-kappa
	device-google-katsu
	device-google-kenzo
	device-google-kodama
	device-google-krane
	device-google-makomo
	device-google-stern
	device-google-willow
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

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

sha512sums="
e1c88545563aa40b69f79ed1d86b4da0d7ad65dfff07dce05f56d51b442ad9bae27ae2d27afa2f5131309072a9ea4f3b026d498ab067b315ed0719a3dded4b2c  deviceinfo
8e95624610dae7d18684056396c9e82635ddce7303d6770e965f9372ffa101fdfd5f8337bc7368004890e9836798663a98c142c52ed63795877ea37ac8da56af  modules-initfs
"
