# Reference: <https://postmarketos.org/devicepkg>
# Co-Maintainer: Achill Gilgenast <achill@achill.org>
maintainer="Luca Weiss <luca@lucaweiss.eu>"
pkgname=device-qemu-riscv64
pkgver=11
pkgrel=4
pkgdesc="Simulated device in QEMU (riscv64)"
url="https://postmarketos.org"
arch="riscv64"
license="MIT"
depends="
	postmarketos-base
	postmarketos-qemu-common
	systemd-boot
	"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-kernel-stable:kernel_stable
	$pkgname-kernel-lts:kernel_lts
	$pkgname-kernel-mainline:kernel_mainline
	"

source="
	kernel-cmdline.conf
	deviceinfo
	"
options="!check !archcheck"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

kernel_stable() {
	pkgdesc="Stable kernel (recommended, best balance between stability and features)"
	depends="linux-postmarketos-stable linux-firmware-none"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

kernel_lts() {
	pkgdesc="Long-term maintainance kernel (most stability, not all security fixes & new features)"
	depends="linux-postmarketos-lts linux-firmware-none"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

kernel_mainline() {
	pkgdesc="Upstream development kernel (regular breakage, latest features)"
	depends="linux-postmarketos-mainline linux-firmware-none"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

sha512sums="
8411587834a64f96673e890195d7e6d7451e0316a69126197a4d6a1522e36c7c5a8a522647f1712038653803d19cf27916a66c6f0e409bd41ddca19f6ff1cda9  kernel-cmdline.conf
d9edefbfba3d9892981d0278e4867bd743fbe86c58300d0aeb66d751c8714f40d63f915e9d9a5d32b736924d28e9cfacfac155972c619e696b53b96eac92bfad  deviceinfo
"
