# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-sony-castor
pkgver=3
pkgrel=1
pkgdesc="Sony Xperia Z2 Tablet"
url="https://postmarketos.org"
arch="armv7"
license="MIT"
depends="
	linux-postmarketos-qcom-msm8974
	mkbootimg
	postmarketos-base
"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo modules-load.conf"
options="!check !archcheck"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="Wifi, GPU firmware"
	depends="
		linux-firmware-brcm
		linux-firmware-cypress
		firmware-qcom-adreno-a330
		firmware-sony-castor
	"
	mkdir "$subpkgdir"
}

sha512sums="
5e09db279648182f18039a54166aa91a4010c5e0adbf94cdb5ad4487a92714732ec9a4da87ae0c3a4361aba288fc940b7b0fc7db93d1ea74ea48135502732dcc  deviceinfo
d8ce60ea7acaabf627ddca2f0887a4cda46f313b7aaf7934bef2fef8a6e0798ccefab849e4571e4e3fcd06ae34c1a6efe3b58b401e2e443416f6200e6d4ea769  modules-load.conf
"
