# Archived: unmaintained
# Reference: <https://postmarketos.org/devicepkg>
maintainer=""
pkgname=device-lenovo-karate
pkgdesc="Lenovo K6 Power"
pkgver=4
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base linux-lenovo-karate mkbootimg mdss-fb-init-hack"
makedepends="devicepkg-dev"
source="deviceinfo kernel-cmdline.conf 90-android-touch-dev.rules"
subpackages="
	$pkgname-nonfree-firmware:nonfree_firmware
	$pkgname-udev
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
	install -Dm644 "$srcdir"/90-android-touch-dev.rules \
		"$pkgdir"/usr/lib/udev/rules.d/90-android-touch-dev.rules
}

nonfree_firmware() {
	depends="firmware-lenovo-karate"
	pkgdesc="Wifi firmware"
	mkdir "$subpkgdir"
}

sha512sums="
ce8a790cbbf85d4cdf3cf16661b3d00c7db109d33da2556544c9418d6fe571b19d855015c905b37336a758c5fc5b290eb10cf3c88113bcd409a25b0cad80c7fe  deviceinfo
268cca5feefb8bf389dc5245eaf4c2ac223fd1f588705bdcd91c4e62598242cba1dbc8d694b7f401b2f390b631d4a0263de423a82d861e994a6bfdb70da04f76  kernel-cmdline.conf
c6a76928d81a36d54734a6061f73f41ce0a6108cf151eb0ef19c96ac5c108e05996d9bb8b57055037e8e0cb8ea0fb0e7dc3d1f047e1d974f7ea1375754ed0962  90-android-touch-dev.rules
"
