# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Raymond Hackley <raymondhackley@protonmail.com>
pkgname=device-samsung-j5x
pkgdesc="Samsung Galaxy J5 (2016)"
pkgver=4
pkgrel=2
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	linux-postmarketos-qcom-msm8916
	mkbootimg
	postmarketos-base
	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-j5x-wcnss-nv"
	mkdir "$subpkgdir"
}

sha512sums="
09e2319dea448b3c4580e55d6b121726557a893e8d8ecde9e62cf3fd5e72acbf784215a3ea688b3c43b5e56cf07523a17ba1aa36bcdbc77413f8362b06bd9a18  deviceinfo
72ccbf2f59a72d5299339f9db3cdf4e84d4b20c756b549c11d2e94b0bd4b433d993d64c2908e2536ff369363813586691af28c2a5c0e1aecf7a848e8b455cb8d  modules-initfs
"
