# Reference: <https://postmarketos.org/devicepkg>
# Contributor: Yuval Adam <_@yuv.al>
pkgname=device-t2m-flame
pkgver=1
pkgrel=18
pkgdesc="Mozilla Flame"
url="https://postmarketos.org"
arch="armhf"
license="MIT"
depends="postmarketos-base linux-t2m-flame mkbootimg mesa-dri-swrast"
makedepends="devicepkg-dev"
install="$pkgname.post-install"
source="deviceinfo 90-android-touch-dev.rules"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
options="!check !archcheck"

build() {
	devicepkg_build $startdir $pkgname
}

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

nonfree_firmware() {
	pkgdesc="Wifi firmware"
	depends="firmware-t2m-flame"
	mkdir "$subpkgdir"
}

sha512sums="b64086b4f2bdea389bce7de38bdbbd28e0dc9ca07dbd43e898993e0eda2338550f11b82bad015d9597bc6cf25a8835f97e4741643f92e832071914b6149be7d4  deviceinfo
25256120a19cba6b6f9ae0cda7b2c8c84d168a6457e82afee438d50d2c28b9598bfe690301c15156d866b77cd87652d9b7cc3d9b0637f69414aae09fec159c91  90-android-touch-dev.rules"
