# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-sony-honami
pkgdesc="Sony Xperia Z1"
pkgver=4
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-sony-honami msm-fb-refresher mkbootimg"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-nonfree-firmware:nonfree_firmware
	$pkgname-udev
"
source="
	deviceinfo
	kernel-cmdline.conf
	90-android-touch-dev.rules
"

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-sony-rhine"
	pkgdesc="Wifi firmware"
	mkdir "$subpkgdir"
}


sha512sums="
3d4214140ebe422661b9c46578bafbdd1f67df378f5edee3952e4a5dcbdfbd505be24b592688b8e32e1e5366a130051e55a9d32121087edd86ed102659bb2225  deviceinfo
94b474da990a48717f07c8e59826330dc5a76fdd99f43516e0b4b4b45025e7672288f94d27ca331ed1a77b4e5730f5901e35f9d9604613e4e1998eca58dec390  kernel-cmdline.conf
1651ac9eda3c97fafe55abe0f0ae429e04f73edcbf2c56aa3259f81837f7adde348bcb385daed05c30cfc61415455a459a917ed3acccbfd9b7a1caa32a851d40  90-android-touch-dev.rules
"
