# Reference: <https://postmarketos.org/devicepkg>
# Co-Maintainer: Nick Chan <towinchenmi@gmail.com>
maintainer="Aster Boese <asterboese@mailbox.org>"
pkgname=device-apple-idevice
pkgdesc="Apple Generic Apple iDevice"
pkgver=5
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	m1n1-apple-idevice
	postmarketos-base
	"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-kernel-4k:kernel_4k
	$pkgname-kernel-16k:kernel_16k
"
source="
	deviceinfo
	modules-initfs
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

kernel_4k() {
	pkgdesc="Kernel with 4k page size"
	depends="linux-postmarketos-apple-4k"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

kernel_16k() {
	pkgdesc="Kernel with 16k page size"
	depends="linux-postmarketos-apple-16k"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

sha512sums="
2afd687b9ab2e1d6c2a8c600d40119661527be4bd7518bca58fc6e6ccde9d46a6fb8812846b2dc6dac75bdb987b4b73e9782800b3e9f5a6edcb3360fc0df150d  deviceinfo
f4df83d543efb5748743f56fbfeddc6734ad341fb623f796faa74b4f42cadfd9a7b1aea2bd3a6f7aa3f284bcb34c05b2ec2a1704ad6e88b043f92dc0de14a573  modules-initfs
"
