# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Alexey Min <alexey.min@gmail.com>
pkgname=device-xiaomi-lavender
pkgdesc="Xiaomi Redmi Note 7"
pkgver=0.1
pkgrel=2
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base mkbootimg"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-kernel-downstream:kernel_downstream
	$pkgname-kernel-mainline:kernel_mainline
"
source="deviceinfo"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

kernel_downstream() {
	pkgdesc="LineageOS downstream kernel (recommended)"
	depends="linux-xiaomi-lavender mesa-dri-swrast msm-fb-refresher"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

kernel_mainline() {
	pkgdesc="Close to mainline; for kernel development only (most features aren't working)"
	depends="linux-postmarketos-qcom-sdm660"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

sha512sums="e126e32fb5d5839c2189069edf68d0520f62acdc27b96e05ff37fdecc22d161347ce02b755b48105999cd50480603c38fb8f4a3d3845cc3e2f133adef15f6326  deviceinfo"
