# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Jean Lucas <jean@4ray.co>
pkgname=device-pine64-rockpro64
pkgver=1
pkgrel=3
pkgdesc="PINE64 ROCKPro64"
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base linux-postmarketos-rockchip u-boot-rockpro64 mesa-dri-gallium"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo
	extlinux.conf
	"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
	install -D -m644 "$srcdir"/extlinux.conf \
		"$pkgdir"/boot/extlinux/extlinux.conf
}

nonfree_firmware() {
	pkgdesc="Wi-Fi, Bluetooth and video-out firmware"
	depends="firmware-pine64-rockpro64 firmware-pine64-pinebookpro"
	mkdir "$subpkgdir"
}

sha512sums="
a4f962053679114498a30e05fb036a1c1d4ceffeb2fb76b0483ebbc35e9042174e8376f5b080982080012bd8531172420f7984d344ad2fceb31ccb9302d4f3d2  deviceinfo
0e6656ca7057b388fc91156611d2f207c3c324d6a66ce411c36b3aa94ae3483c3ac8d74f35740d500a5af2c2953ccd4fffccd319ffe5258d08a462d9ec776ec4  extlinux.conf
"
