# Maintainer: Venji10 <bennisteinir@gmail.com>
# Co-Maintainer: Joel Selvaraj <jo@jsfamily.in>

pkgname=firmware-xiaomi-beryllium
pkgver=2
pkgrel=0
pkgdesc="Firmware for Xiaomi Poco F1"
url="https://gitlab.com/sdm845-mainline/firmware-xiaomi-beryllium"
arch="aarch64"
depends="soc-qcom-sdm845-nonfree-firmware linux-firmware-qcom linux-firmware-qca linux-firmware-ath10k"
license="proprietary"
options="!strip !check !archcheck"

_commit="aad74c8d4f6fb5852a20bebdebb2979ee63ed775"

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

package() {
	cd "$srcdir/$pkgname-$_commit/"
	while IFS="" read -r _i || [ -n "$_i" ]; do
		[ ! -d $(dirname $_i) ] && mkdir -p $(dirname $_i)
		echo $_i
		install -Dm644 $_i "$pkgdir/$_i"
	done < "$srcdir/firmware.files"
}

sha512sums="c1534e79deef84b9c4c61048f44c7b8ec3a92e02f879f8c2f841ce035a8960839a7d534e0ea42f47e396c86a8cfd73d5bcee608ee4e0817343fd62afef55b2a0  firmware-xiaomi-beryllium.tar.gz
178bb3e3c0daf689881cd4ecc91db4ad13b86230b1f12b3283671a58e76a3c6497d4c2eaf4ea5fc9d0a5f5789a69711b188b3e4461a9049a00f0b6fcc24213a6  firmware.files"
