# Archived: Downstream port, only for testing. Use mainline port!
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-ouya-ouya-downstream
pkgver=3
pkgrel=0
pkgdesc="Ouya (Downstream)"
url="https://postmarketos.org"
arch="armv7"
license="MIT"
options="!check !archcheck"
depends="
	firmware-ouya-ouya
	linux-ouya-ouya
	mkbootimg
	postmarketos-base
	"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-x11
	"
source="
	deviceinfo
	fb.modes
	initfs-hook.sh
	networkmanager.conf
	"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname

	install -D -m644 "$srcdir"/fb.modes \
		"$pkgdir"/etc/fb.modes
	install -D -m644 "$srcdir"/networkmanager.conf \
		"$pkgdir"/etc/NetworkManager/conf.d/10-ouya.conf
}

x11() {
	install_if="$pkgname xorg-server"
	depends="xf86-video-opentegra libvdpau-tegra"
	mkdir "$subpkgdir"
}

sha512sums="
15208abd2cf64e3660d13de019f3fc82b2cf386525be966ec181d0cb3f5914a51bbdcf6bb747c1f63ec06abbd31b4784e4d899249e2d5c98e7ef4d09e8a49f90  deviceinfo
bf442fac4dc0594e055ed7a7d8232b5c884e2e77543273e8c4f32b5fe3c199561c86d8a5f665e17406057ca7863fabb93e789fe5e168fcd89d2982e0046232ad  fb.modes
c7253d5d6f53b7acbb1c2358e95ecba86ccbaa2bb5e99ad8db9f59e453209ddad55b13d8c1dc67f634cc4f997283b4079fa1b5b60f6d1440b13f39e5b1646d81  initfs-hook.sh
b0737a8fb7a60b2d24e4e124dbeb7044832a683a78887454d13d4078039338fb04579ce9066140733222409e7f53255bfde2c6725bd3848752a27e112717c28c  networkmanager.conf
"
