# Archived: unmaintained
maintainer=""
pkgname=firmware-sony-ivy
pkgver=2
pkgrel=0
pkgdesc="Sony Xperia Z3+ Firmware"
url="https://github.com/TheMuppets/proprietary_vendor_sony"
arch="aarch64"
license="proprietary"
_commit="fd7901fc26c1aee86a776a78f745f161f1d9db93"
options="!check !strip !tracedeps pmb:cross-native"

# Source
source="
	ivy-fw_bcmdhd.bin::https://github.com/TheMuppets/proprietary_vendor_sony/raw/$_commit/ivy/proprietary/etc/firmware/wlan/bcmdhd/fw_bcmdhd.bin
	wlan_macaddr0
	wlan_txpower_2_4g
	wlan_txpower_5g_low
	wlan_txpower_5g_mid
	wlan_txpower_5g_high
	wlan_txpower_co1_2_4g
	wlan_txpower_co1_5g_high
	wlan_txpower_co1_5g_mid
	wlan_txpower_co1_5g_low
	ivy-bcmdhd.cal::https://raw.githubusercontent.com/sonyxperiadev/device-sony-ivy/master/rootdir/system/etc/wifi/bcmdhd.cal
"
package() {
	# Wifi
	mkdir -p "$pkgdir"/lib/firmware/postmarketos/bcmdhd/bcm4356/
	install -Dm644 "$srcdir/ivy-fw_bcmdhd.bin" "$pkgdir/lib/firmware/postmarketos/bcmdhd/bcm4356/fw_bcm4356.bin"
	install -D -m644 "$srcdir"/wlan_macaddr0 \
		"$pkgdir"/etc/wlan_macaddr0
	install -D -m644 "$srcdir"/wlan_txpower_2_4g \
		"$pkgdir"/etc/wlan_txpower_2_4g
	install -D -m644 "$srcdir"/wlan_txpower_5g_low \
		"$pkgdir"/etc/wlan_txpower_5g_low
	install -D -m644 "$srcdir"/wlan_txpower_5g_mid  \
		"$pkgdir"/etc/wlan_txpower_5g_mid
	install -D -m644 "$srcdir"/wlan_txpower_5g_high \
		"$pkgdir"/etc/wlan_txpower_5g_high
	install -D -m644 "$srcdir"/wlan_txpower_co1_2_4g \
		"$pkgdir"/etc/wlan_txpower_co1_2_4g
	install -D -m644 "$srcdir"/wlan_txpower_co1_5g_high \
		"$pkgdir"/etc/wlan_txpower_co1_5g_high
	install -D -m644 "$srcdir"/wlan_txpower_co1_5g_low \
		"$pkgdir"/etc/wlan_txpower_co1_5g_low
	install -D -m644 "$srcdir"/wlan_txpower_co1_5g_mid \
		"$pkgdir"/etc/wlan_txpower_co1_5g_mid
	install -D -m644 "$srcdir"/ivy-bcmdhd.cal \
		"$pkgdir"/etc/wifi/bcmdhd.cal
}
sha512sums="
79c00d624e40b96a8364bce9bdcda008346cada539f99a76c48b8294b12dcd20cbbe4def002ee02138ad3a08bb5c0df3b04548a75249334342da7c3cadd8a55e  ivy-fw_bcmdhd.bin
b4ab2443b7a2e661f1a2b02788336e8dcf9b0052559fc52848b42f039b03fb57cf600a094bc30fe02b366ac7c4d6ba389107ab946cb89fff9dcbe6181494fdd2  wlan_macaddr0
9a41768781fca02c122d4fc8a1418ad87a6c5fc9e91d73a35647128f15d2f99f2efaae8d3f916e7cdd1fbe6d8e7d1295eda27cfaf2820dc0b9a8a408cf1eb5e7  wlan_txpower_2_4g
7009030b9317a4e1b93b510e0a883ab91172fe6ce23e904ab39973847c1aeed9dc196e456baa0f250785516ea10ded7a97133e69580cde4bc744577a75edf888  wlan_txpower_5g_low
7009030b9317a4e1b93b510e0a883ab91172fe6ce23e904ab39973847c1aeed9dc196e456baa0f250785516ea10ded7a97133e69580cde4bc744577a75edf888  wlan_txpower_5g_mid
7009030b9317a4e1b93b510e0a883ab91172fe6ce23e904ab39973847c1aeed9dc196e456baa0f250785516ea10ded7a97133e69580cde4bc744577a75edf888  wlan_txpower_5g_high
1ab76b4e189e63b4725bad102eb5a24323e5d1a671da873cf12602ed364227892346dc279bed67c2fdd14f6990df971b45ebdf2e03720c69b33db247049188c7  wlan_txpower_co1_2_4g
7009030b9317a4e1b93b510e0a883ab91172fe6ce23e904ab39973847c1aeed9dc196e456baa0f250785516ea10ded7a97133e69580cde4bc744577a75edf888  wlan_txpower_co1_5g_high
7009030b9317a4e1b93b510e0a883ab91172fe6ce23e904ab39973847c1aeed9dc196e456baa0f250785516ea10ded7a97133e69580cde4bc744577a75edf888  wlan_txpower_co1_5g_mid
7009030b9317a4e1b93b510e0a883ab91172fe6ce23e904ab39973847c1aeed9dc196e456baa0f250785516ea10ded7a97133e69580cde4bc744577a75edf888  wlan_txpower_co1_5g_low
80c62a8fcd4d00ce35b859e12b2b8d9d0b8f0154f3bffb8bc8c329c1ddea5a790f341a7ebcc991ae1a74bd363511063ecd0baba2a5af811ebf004819ac7cd795  ivy-bcmdhd.cal
"
