pmaports/device/testing/firmware-samsung-chagall/APKBUILD
Henrik Grimler 654b9dc36e
samsung-chagallwifi: select firmware pkg variant in device package (MR 4721)
We want both chagallwifi and chagalllte to be able to depend on
firmware-samsung-chagall, for both their downstream and mainline
kernel variants.

Previously we used install_if like:
install_if="device-samsung-chagallwifi-kernel-mainline"
which will only work for chagallwifi and not chagalllte.  Instead we
add two nonfree subpackages to the device packages that install_if's
depending on kernel choice.
2024-01-30 12:26:20 -08:00

48 lines
1.6 KiB
Text

pkgname=firmware-samsung-chagall
pkgver=3.0
pkgrel=0
pkgdesc="Firmware for Samsung chagallwifi and chagalllte"
url="https://github.com/TheMuppets/proprietary_vendor_samsung"
arch="armv7"
license="proprietary"
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
subpackages="
$pkgname-downstream:downstream
$pkgname-mainline:mainline
"
# Source
_chagall_commit="06294e9dd7dd1a7edd3ae1e03634c8bae1358ff7"
_url="https://github.com/TheMuppets/proprietary_vendor_samsung/raw/$_chagall_commit"
_chagall_wifi_files="bcmdhd_sta.bin nvram_net.txt_4354_a1"
for _i in $_chagall_wifi_files; do
source="$source $pkgname-$_chagall_commit-$_i::$_url/chagallwifi/proprietary/etc/wifi/$_i";
done
package() {
mkdir -p "$pkgdir"
}
downstream() {
pkgdesc="Firmware for Samsung chagall* when using downstream kernel"
depends="firmware-samsung-exynos5420-downstream"
mkdir -p "$subpkgdir"
# Wifi
local file
for file in $_chagall_wifi_files; do
install -Dm644 "$srcdir/$pkgname-$_chagall_commit-$file" \
"$subpkgdir/lib/firmware/postmarketos/$file"
done
}
mainline() {
pkgdesc="Firmware for Samsung chagall* when using mainline kernel"
depends="linux-firmware-s5p-mfc"
mkdir -p "$subpkgdir"
}
sha512sums="
1666a13ee4eed31b9c320acd0f48d770a4343fe37da02527e191c5d50f083b20c902c4519f10c256c173315a5315cbe2c7f605e4b7fda1e327243e3fe4a782b6 firmware-samsung-chagall-06294e9dd7dd1a7edd3ae1e03634c8bae1358ff7-bcmdhd_sta.bin
25b603bee8759c93b82efbb99d4cddbb3d7e4ad8604515891b7c38cbd6ba09ce386bdea6d4b81b720d3a0e7534299824fcb5c8861b38d0f70aeb5c7eaa439dad firmware-samsung-chagall-06294e9dd7dd1a7edd3ae1e03634c8bae1358ff7-nvram_net.txt_4354_a1
"