# Archived: Downstream port, only for testing. Use mainline port!
maintainer="chiffa <chiffathefoxx@gmail.com>"
pkgname=firmware-samsung-beyond1lte
pkgver=1
pkgrel=0
pkgdesc="Firmware for the Samsung Galaxy S10"
url="https://github.com/Linux4/proprietary_vendor_samsung"
arch="aarch64"
license="proprietary"
options="!check !archcheck !strip !spdx !tracedeps pmb:cross-native"

# Source
_commit="05c9ef8f16e0ad5ab274e408c120dfd99fd5c628"
_wifi_files_common="bcmdhd_mfg.bin_b1 bcmdhd_mon.bin_b1 bcmdhd_sta.bin_b1 nvram.txt_ES00_semco_b0 nvram.txt_ES01_semco_b0 nvram.txt_ES02_semco_b0"
_wifi_files_device="bcmdhd_clm.blob nvram.txt_1rh_es11_b0 nvram.txt_1rh_es12_b0 nvram.txt_1rh_es13_b0 nvram.txt_1rh_es43_b1 nvram.txt_CS01_semco_b1 nvram.txt_ES03_semco_b0"

for _file in $_wifi_files_common; do
	source="$source $pkgname-$_commit-$_file::$url/raw/$_commit/exynos9820-common/proprietary/vendor/firmware/$_file"
done
for _file in $_wifi_files_device; do
	source="$source $pkgname-$_commit-$_file::$url/raw/$_commit/beyond1lte/proprietary/vendor/firmware/$_file"
done

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

sha512sums="
ff316607a30a93790bcddf267713419599f717e561ee61869eaa2ea0d4783702c7132a9534461a791d07ef6cfc86ca58e484dc4ab0a84ff4c2409b85e499139e  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-bcmdhd_mfg.bin_b1
6016bb808d4467ee7f49dc8ce7449518cf02c282bfe7da6081db481c57ed504f82a3833434966a18d95acbd74c94ffcf6e74b69a13be85e15514f21efd2acbdd  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-bcmdhd_mon.bin_b1
3e8042abba00394269a8ae30f4017ff3717753204d18b4051ea0b3adb94837bd2aed8417d7ff39daf2732750b5e927eb66a15554a82d8818c52301c17b459b26  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-bcmdhd_sta.bin_b1
a18ceea8b753102bfacdcc713eb6d22e942adc7ded2232fcf3d2e02b4ba780b588d40f91f3994d3e87fe04ab318f561171adcd80ab1a1730fcf33e70f87402f2  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-nvram.txt_ES00_semco_b0
aa3a52150f87c60b77e2b9df8e3e19d60cdedfe9137be67c25466e068b33ff53d587b96e0657721d37002e44af9b8b86a0c92948da7927900ea3a783afd41d73  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-nvram.txt_ES01_semco_b0
6887150124ea7227833104e8eacdaf305fcb4c57755fd44a2ae3d8b2c2565a6c282875923967a889c672f5992485849174d981eba2f9fd95e90f15cf03ebbe47  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-nvram.txt_ES02_semco_b0
4ba014ae0c96bb3e96afc95d7a293200043cc625044c4b7f9b7967a36a0c7272e99279d1bf9776cc36a05c119a6fdd1cce8a8955eb5d7a3fa85caacd59024b77  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-bcmdhd_clm.blob
e8263dc21849228b88a61ab9ab1c5bf3f9e6742e0d6125f28c65ee1bf54bdd473e72e608fb6eede5727aa8ea881e215326289a601274e34757f9665e4214f2e4  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-nvram.txt_1rh_es11_b0
f95cb09859718fde6df2c9e2f855c0280ff97d94d57e40aeaa7639d6b7200cd0a5ced7d9afc0b69504c981a85f969d9d58c3be16585ab98c7212be70bde1bca6  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-nvram.txt_1rh_es12_b0
2448da911a6007352cfa5c693f450f12e55d9b9758e86dcf4b0bbdf418fa3424d5f495d8a198f172d99a6aed217915a7ab7aa531780fedf8efe5a1846b82b328  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-nvram.txt_1rh_es13_b0
453e4f7f5bfde52db2600c8ccca25e4a318b21f990a66cf41e3baa5c2e378fd621e75642ce6293a19060ab659c2a5e6c70f74d9e3afbe0399c601f4e6001beb4  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-nvram.txt_1rh_es43_b1
963e342d7294a54adb180a340cad90a5caf337dda32b836d1914d0cd9900d5763c25fb55f6140f6fabc630e870b701946f331474e057b0a53d848b6d56e38734  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-nvram.txt_CS01_semco_b1
f41f40c9f41776809c643f6f7c3c2d49aef9b9377b603e5d36f7f1328226251d21733dd08022f2628d625caf099f2a225470a8d2b1a077889b016e0d721dd9e6  firmware-samsung-beyond1lte-05c9ef8f16e0ad5ab274e408c120dfd99fd5c628-nvram.txt_ES03_semco_b0
"
