pkgname="device-sony-honami"
pkgdesc="Sony Xperia Z1"
pkgver=1.1
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-sony-honami msm-fb-refresher mkbootimg mesa-dri-swrast"
source="deviceinfo 90-android-touch-dev.rules"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"

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

nonfree_firmware() {
	depends="firmware-sony-rhine"
	pkgdesc="Wifi firmware"
	mkdir "$subpkgdir"
}

sha512sums="04de5d33633b6f07b1ef5e6b1e73cccd4c1e7d449213d067df30c928e6c41c5d7658e3c0892a1668cb298f67ba4b2b9b5b54a34c6b24e846f88f212c5e2563c6  deviceinfo
1651ac9eda3c97fafe55abe0f0ae429e04f73edcbf2c56aa3259f81837f7adde348bcb385daed05c30cfc61415455a459a917ed3acccbfd9b7a1caa32a851d40  90-android-touch-dev.rules"
