# Archived: Kernel does not build anymore
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-mobvoi-skipjack
pkgdesc="Mobvoi Ticwatch C2"
pkgver=5
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
	linux-mobvoi-skipjack
	mkbootimg
	postmarketos-base
	mdss-fb-init-hack
"
subpackages="
	$pkgname-nonfree-firmware-modem:nonfree_firmware_modem
	$pkgname-nonfree-firmware-venus:nonfree_firmware_venus
	$pkgname-nonfree-firmware-wcnss:nonfree_firmware_wcnss
"
makedepends="devicepkg-dev"
source="deviceinfo kernel-cmdline.conf"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware_modem() {
	pkgdesc="Modem firmware"
	depends="firmware-mobvoi-skipjack-modem"
	mkdir "$subpkgdir"
}

nonfree_firmware_venus() {
	pkgdesc="GPU firmware"
	depends="firmware-mobvoi-skipjack-venus"
	mkdir "$subpkgdir"
}

nonfree_firmware_wcnss() {
	pkgdesc="WiFi/Bluetooth firmware"
	depends="firmware-mobvoi-skipjack-wcnss"
	mkdir "$subpkgdir"
}

sha512sums="
f7d9d96da2c21b5f62fd385990f4e3bdedc6ed8769d4c220c750a9e6dc606513f23f922de01d0d82eafb6ffb6360f31ee2a6dc5334d48d5da925c5bc384a3158  deviceinfo
d39374c1c0474ebf153045b2957bc76ee2f007f6454a96b80fb0ae97661f0723e5a6527e77c51a27daf3ffce537bc13b633c40d130e86ae6c66c0e06d92c46b3  kernel-cmdline.conf
"
