# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-htc-protou
pkgdesc="HTC Desire X"
pkgver=4
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
	postmarketos-base
	postmarketos-base-downstream-disable-udev-v4l
	linux-htc-protou
	mkbootimg
	msm-fb-refresher
"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo kernel-cmdline.conf initfs-hook.sh pointercal"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname

	install -Dm644 "$srcdir"/pointercal \
		"$pkgdir"/etc/pointercal
}

nonfree_firmware() {
	pkgdesc="Wifi firmware"
	depends="firmware-aosp-broadcom-wlan"
	mkdir "$subpkgdir"
}

sha512sums="
786ac9d15648cedfe86ec4f4d2f1fe696d40fcfc54e0995ce5f82fb9afbfca9cf7d7ebd134d8eb78534b761bc0c5a15f236681e7e9312d666b345f57cf5e9274  deviceinfo
0aabbd329073593aacd4407f3f2e2dd01729ae6e5d120f98ecdb584a91ca1fc5cbcbb3cefa27399e5d4eeab5f632627e8b4a491d671392fa776b6b1dcfec46b4  kernel-cmdline.conf
b49562b112ac966896d152ba30548f5b863cc94359fb02a8b75ec43a2c1229a852a218d50201628c0cbee3b88b68136163716e78dcc4ec71401ff9dc8340e016  initfs-hook.sh
e76d0a2e1a9b611e811f6c0c90201f019ef435132ea4e7119e6179ffc99ba72c5fb6c3bdd1041ff06186d75a163bf3443d0c073c7fe1b55c10b58af53ada163a  pointercal
"
