# Reference: <https://postmarketos.org/devicepkg>
maintainer="snlavaise <snlavaise@gmail.com>"
pkgname=device-motorola-rtwo
pkgver=1
pkgrel=14
pkgdesc="Motorola Moto Edge 40 Pro"
url="https://postmarketos.org"
arch="aarch64"
license="MIT"
depends="
	android-tools
	linux-postmarketos-qcom-sm8550
	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="
2625f12ae797bf8b2ad03aed507d86cac728e37a202d92ed565900e449f03f4164b5a1e08304916e5e73c5c53338176c2ea0d8251b5f473894637af317519aa3  deviceinfo
44085ab61668201f3091046586a333f017bc0e11af7624d7bd5bfe13e98eed3943a2daa02922db48ce8cac8de3c08622ac2c32cf959daf96bd416f217863f62c  modules-initfs
"
