# Reference: <https://postmarketos.org/devicepkg>
maintainer="WeirdTreeThing <bradyn127@protonmail.com>"
pkgname=device-xunlong-orangepi5-plus
pkgdesc="Xunlong Orange Pi 5 Plus"
pkgver=8
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	linux-firmware-arm
	linux-firmware-rtl_nic
	postmarketos-base
	systemd-boot
"
makedepends="devicepkg-dev"
source="deviceinfo kernel-cmdline.conf modules-initfs"
subpackages="
	$pkgname-kernel-stable:kernel_stable
	$pkgname-kernel-lts:kernel_lts
	$pkgname-kernel-mainline:kernel_mainline
"

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"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

kernel_lts() {
	pkgdesc="Long-term maintenance 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"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

sha512sums="
3bed41bae1a8cf93b2418eda7bbf218a715bae1b33a2c3a10487ef153f4833ad9627126d3bcc7cbd3f06523ac5fb338b28d3134c94f486f9e8aa0b6680323ffe  deviceinfo
97e88eaa9b8e7989a20d2572479fe5d1fe0284de862da11c91b1f347099d5704673837db01a6b0c289fee0a2d7236f64fba31fd6001475f957c23203e34fd6fb  kernel-cmdline.conf
8aa5ce9115d5181744a6d2ea2e0e7b312dede29673f1ecd205f5a8067a18f33d834ea018f9df7e69ca23268b2434ddcc78e0890f1158e3ae97b1a09439c2764a  modules-initfs
"
