# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Raymond Hackley <raymondhackley@protonmail.com>
pkgname=device-samsung-grandmax
pkgdesc="Samsung Galaxy Grand Max"
pkgver=2
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
	postmarketos-base
	mkbootimg
	linux-postmarketos-qcom-msm8916
	soc-qcom-msm8916
	soc-qcom-msm8916-rproc
"
makedepends="devicepkg-dev"
source="deviceinfo modules-initfs"
subpackages="
	$pkgname-nonfree-firmware:nonfree_firmware
"
_pmb_select="soc-qcom-msm8916-rproc"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="GPU/WiFi/BT/Modem/Video firmware"
	depends="firmware-qcom-adreno-a300 msm-firmware-loader firmware-samsung-grandmax-wcnss-nv"
	mkdir "$subpkgdir"
}

sha512sums="
a7f7c5ef87b8bc6d6f8c732098342e8a91742a67978eb107e20cc839c5dedb8ce497bf1a9df143fe447e74936cfc6dfeecb4b25427c43278f0020ba1065dee2e  deviceinfo
24b1b199ca26d902807038faa20b44d6060c039900df5c7aa263cdb22b35930e726c2bfd86e32b1f1dd6fa8ab3b57a6c8ff430ce9aae2dd04c04565ea56c8a43  modules-initfs
"
