# Reference: <https://postmarketos.org/devicepkg>
maintainer="snlavaise <snlavaise@gmail.com>"
pkgname=device-motorola-rtwo
pkgver=1
pkgrel=0
pkgdesc="Motorola Moto Edge 40 Pro"
url="https://postmarketos.org"
arch="aarch64"
license="MIT"
depends="
	linux-postmarketos-qcom-sm8550
	mkbootimg
	postmarketos-base
	soc-qcom
	"
makedepends="devicepkg-dev"
source="
	deviceinfo
	modules-initfs
	"
options="!archcheck !check"

# TODO (as hardware comes up):
#  - firmware-motorola-rtwo (WiFi/BT/modem/GPU blobs, generate from the
#    stock image with 'pmbootstrap ...' or extract manually)
#  - firmware-qcom-adreno-* for the Adreno 740 (GPU / mesa-vulkan-freedreno)
#  - make-dynpart-mappings once super partitions are mapped
#  - soc-qcom-modem, qbootctl (A/B slot handling) once booting

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

sha512sums="
32c5054a403dc98169061e7aae2bab06b014089f7563ab65515923b1b07ead8832476107f87ecbd94575c69c92ea91eef6db9effe788b0b71e893cfb62e8963b  deviceinfo
c572e21cb0624b554a22a218b0c4faab9b6412654bed6bfef530f3068d076b21c573bd7f4b3ca65f510f8756f636a861191cce925ef49587db7d68d09558826c  modules-initfs
"
