maintainer="Aelin <aelin@postmarketos.org>"
pkgname=firmware-google-sunfish
pkgver=2
pkgrel=0
pkgdesc="Firmware for Google Pixel 4a"
url="https://github.com/sm7150-mainline/firmware-google-sunfish"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native textrels"
_commit="fe63598e1bd9884bd68ba89e4670dae4d70b1e3e"
source="
	$pkgname-$_commit.tar.gz::$url/archive/$_commit/$pkgname-$_commit.tar.gz
	30-initramfs-$pkgname.files
"
builddir="$srcdir/$pkgname-$_commit"

package() {
	mv "$builddir"/lib "$builddir"/usr
	find . -type f -exec install -Dm644 {} "$pkgdir"/{} \;

	install -Dm644 "$srcdir/30-initramfs-$pkgname.files" -t \
		"$pkgdir"/usr/share/mkinitfs/files
}

sha512sums="
c94511f6e6d6aa6ebf3238e27b7092498f3d58be9893d05e874ce9551cffb1a3e38b994a822c4364c97da0f03925d4d554045234b1f78b59af63207a396ee713  firmware-google-sunfish-fe63598e1bd9884bd68ba89e4670dae4d70b1e3e.tar.gz
bbcd1a4a46ceacf073e2b137469a4cb18ebb3ac20cd66e8ec758f5f271d095c9b651f5165a6fd9335922928e20fb922889fcabcbcccd2f2a8d4b673b17a0803a  30-initramfs-firmware-google-sunfish.files
"
