pkgname="device-samsung-i9505"
pkgdesc="Samsung Galaxy S4 International"
pkgver=0.4
pkgrel=5
url="https://postmarketos.org"
license="MIT"
arch="noarch"
options="!check"
depends="postmarketos-base linux-samsung-i9505 mkbootimg mesa-dri-swrast"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo 90-android-sec_touchscreen.rules"

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

nonfree_firmware() {
	pkgdesc="Wifi firmware"
	depends="firmware-samsung-i9505"
	mkdir "$subpkgdir"
}

sha512sums="1045a64b14ba22b9dafe8c31caf4ae5cd72f55ad26cdf4cf3d986062fecf5728e13e7dacccf47cdcadfe83c50f478d7df5425ad6610b12c035b5ebdf5a5a356e  deviceinfo
9dd220de9aa0ee4106686d43a4bac858c7b57ca8537488a54176ef13615195dab7945ca3f6896368186e99c7ed78748a2ad25458efe586dbc337190143d5184f  90-android-sec_touchscreen.rules"
