# Reference: <https://postmarketos.org/devicepkg>
maintainer="Henrik Grimler <henrik@grimler.se>"
pkgname=device-odroid-u2
pkgdesc="ODROID U2/U3"
pkgver=7
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
	 postmarketos-base>=25-r1
	 u-boot-odroid>=2023.04-r1
	 firmware-odroid-u2
"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-kernel-lts:kernel_lts
	$pkgname-kernel-exynos4:kernel_exynos4
"
source="deviceinfo kernel-cmdline.conf modules-initfs.exynos4 modules-initfs.lts"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

kernel_lts() {
	pkgdesc="Use Alpine's long-term support kernel"
	depends="linux-lts"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

kernel_exynos4() {
	pkgdesc="Use linux-postmarketos-exynos4"
	depends="linux-postmarketos-exynos4"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

sha512sums="
b4a093c4814a8325854ca0037bf838f60264e4d18073f988ec09be679305486d2973ff31d1d33c7b14e35cc8ef792e352b38c480bac928c0958a9e35ce4d73d8  deviceinfo
27420701ba9335b0a575300aa8591bb23f4c9d4c9479a16053ae5dad0a22a86d30ad51b6bb187dccc28753d652a2f8bb34d33ad13bc7c41dbcc60b2e1af05143  kernel-cmdline.conf
bc0c4f7eb77cc3393ac83114fe982b7d2d74725a7a390074ce29bb67b235895487018a407b8ce3593c1fa7e9dbd526199515f7932938c6169a440549eb73dfd3  modules-initfs.exynos4
ba1229a573d863e783a0f945eb825fb77cfd10662d2eacf74c2e20d1e4d118a4fa68200305cd10e1606b489fc8c86e4da7f3305ac6973d3787420eec2bed91b2  modules-initfs.lts
"
