maintainer=""
pkgname=firmware-samsung-j6lte
pkgver=2
pkgrel=0
pkgdesc="Proprietary firmware blobs for Samsung Galaxy J6 (2018)"
url="https://gitlab.com/exynos7870-mainline/firmware"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"

_device="j6lte"
_commit="c69a2f7405aeadf3eac6a1e9aa870608707022a2"

source="$url/-/archive/$_commit/firmware-$_commit.tar.gz"

package() {
	# Bluetooth firmware (Broadcom BCM43430B0)
	install -Dm644 "$srcdir/firmware-$_commit/$_device/bluetooth_bcm.hcd" \
		"$pkgdir"/lib/firmware/postmarketos/brcm/"BCM43430B0.hcd"

	# Wi-Fi SDIO firmware (Broadcom BCM43430B0)
	install -Dm644 "$srcdir/firmware-$_commit/$_device/wlansdio_bcm.bin" \
		"$pkgdir"/lib/firmware/postmarketos/brcm/"brcmfmac43430b0-sdio.bin"
	install -Dm644 "$srcdir/firmware-$_commit/$_device/wlansdio_bcm.clm_blob" \
		"$pkgdir"/lib/firmware/postmarketos/brcm/"brcmfmac43430b0-sdio.clm_blob"
	install -Dm644 "$srcdir/firmware-$_commit/$_device/wlansdio_bcm.txt" \
		"$pkgdir"/lib/firmware/postmarketos/brcm/"brcmfmac43430b0-sdio.txt"
}
sha512sums="
ae7c5c531ef0f15b690089a884f45030eaab8056297db0ca07eb93c06d537f1a3e43fd2a602c6b044e61d4f9ebd071a2dc500a7766fa0775633385703be1ad66  firmware-c69a2f7405aeadf3eac6a1e9aa870608707022a2.tar.gz
"
