# Maintainer: Barnabas Czeman <trabarni@gmail.com>
pkgname=firmware-xiaomi-riva
pkgver=0.1
pkgrel=0
_commit="55441372abe4072f0f174a9614dcbe4b0d4bfcab"
pkgdesc="Firmware files for Xiaomi Redmi 5A"
url="https://postmarketos.org"
arch="aarch64"
license="proprietary"
options="!strip !check !archcheck !spdx pmb:cross-native !tracedeps"

_files="wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b06
	wcnss.b09 wcnss.b10 wcnss.b11 wcnss.b12 wcnss.mdt"
_files_prima="WCNSS_qcom_cfg.ini WCNSS_qcom_wlan_nv.bin WCNSS_wlan_dictionary.dat"
source="$pkgname-$_commit.tar.gz::https://gitlab.com/ALTracer/vendor_xiaomi_rolex/-/archive/$_commit/vendor_xiaomi_rolex-$_commit.tar.gz"
builddir="$srcdir/vendor_xiaomi_rolex-$_commit"

package() {
	# /lib/firmware/postmarketos
	for _i in $_files; do
		install -D -m644 "$_i" \
			"$pkgdir"/lib/firmware/postmarketos/"$_i"
	done

	# /lib/firmware/postmarketos/wlan/prima
	for _i in $_files_prima; do
		install -D -m644 wlan/prima/"$_i" \
			"$pkgdir"/lib/firmware/postmarketos/wlan/prima/"$_i"
	done
}


sha512sums="
91493ed18d462b1aa72df72f06d975a68ef2133b2f6f33971452a77477e5045b8dc9d3842779449407681e49362cdc1a700dcaf3b246f5e5b48450a6edc3cbde  firmware-xiaomi-riva-55441372abe4072f0f174a9614dcbe4b0d4bfcab.tar.gz
"
