pkgname=firmware-samsung-a20
pkgver=1
pkgrel=0
pkgdesc="Firmware for the Samsung Galaxy A20"
url="https://gitlab.com/arpio/proprietary_vendor_a205"
arch="aarch64"
license="proprietary"
options="!check !archcheck !strip !spdx !tracedeps pmb:cross-native"

# Source
_commit="06b2a884c0c0ebf244995d31895d396b30a40170"

_vendor_files="
APBargeIn_AUDIO_SLSI.bin
AP_AUDIO_SLSI.bin
Tfa9896.cnt
calliope_dram.bin
calliope_sram.bin
fimc_is_lib.bin
fimc_is_rta.bin
mfc_fw.bin
setfile_3l6.bin
setfile_4ha_front.bin
setfile_imx258.bin
setfile_sr556.bin
"

for _file in $_vendor_files; do
	source="$source $pkgname-$_commit-$_file::$url/-/raw/master/firmware/$_file"
done

package() {
	local file
	for file in $_vendor_files; do
		 install -Dm644 "$srcdir/$pkgname-$_commit-$file" \
			"$pkgdir/lib/firmware/postmarketos/$file"
	done
}

sha512sums="49805625aa39c7eee135de4cf2ae16e2665589a86f777fc2703d8f21f0a96d6e07ce9cc36fb20eeaa6dd09a76850236e27d2b6869cb08c31ab8b772714e7b6c1  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-APBargeIn_AUDIO_SLSI.bin
f11246d886b4adb16d3c41bd9750a4183301e594bc163b0790c010ce381447c18f180a57c82dbc2c74d2f841fec3e8ea39bb8acd85f45d1b3b0f897541efd485  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-AP_AUDIO_SLSI.bin
134594d5041554ede2508dc47aa1043e55965f34b40a5d1b76c537b8adbb5886539b1ffd484d3d177e475a11c47ca621c90f15e578e329ddbb84f368e84fbdf9  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-Tfa9896.cnt
088435ff7e7dfb2510d7428ff73c5eb2d42a204ec73c93c602bd98816a483406c2955917fb1e91809188eaafa0c2b21f612ca4f48bbd909f501f7aeb5aeb5f96  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-calliope_dram.bin
ea37791306b295d2c234052501194c5c98d9d713617f1e28379c2d09b394d2cc3213bae1e5d850eec38e8565a32af4dcaa319fcb29b16b9322fa9cc6db442eff  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-calliope_sram.bin
8ca1b33c7d36aefb51a9c4b5187edff0d72c20d56b6885a34062cb2ebe94511e8459da8997cd91fd5bbbd1da3176c4119215de7e1bb59c3c49f1ae6d73b76d18  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-fimc_is_lib.bin
665cb23f245f43f557deb68c8b43cbd8459ff0bf8f2c4bb7fd56079790c5b4650e67382c4f8d4e731bf52ac8abe6a924c6ef122bac0e57b0000503651f7d14b4  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-fimc_is_rta.bin
7b99132e5b33caeadc438a7a5f5e1dc0674a7fabd3f213fe2c88a1e215320fe74fc57a783eff22c15ce171f2a5e047d9364b6e3eee6b70c95954b0cb0f2a46fb  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-mfc_fw.bin
166b4876d49685ab1d34b492029c97b3000c43b1c6f83cd7a443f20453223dbeff19ffb3ba914b7eb63525b2308a01875609561ad52c103153bf023f245c63f6  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-setfile_3l6.bin
8e3fe313851a397b6927ef838f7fd765e1afb34f63913ec45a314d2db88909106f5f32045fb95cdabc51c23d4499645ab7c14a98d24371d24d912250680974c2  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-setfile_4ha_front.bin
3a3b3e36cdc104d7e27d93d9307615171646e30f0e1651867262573559dfc7ee256f7fc40e2ac1fe599bf94a47025dadb86b48ec6366ce78dae4c101cdc52770  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-setfile_imx258.bin
0f195297a84aa88fe3ffd9f342faeaaeae7fb0baea9530d2858a1509a11c77e11d254c13efb2d182803280958a12885e5d3d64cb20bb763ae1712abbe966f11d  firmware-samsung-a20-06b2a884c0c0ebf244995d31895d396b30a40170-setfile_sr556.bin"
