# Reference: <https://postmarketos.org/devicepkg>
maintainer="Linus Walleij <linusw@kernel.org>"
pkgname=device-samsung-kyle
pkgdesc="Samsung Galaxy Amp (SGH-I407)"
pkgver=6
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
	firmware-samsung-u8500
	linux-postmarketos-stericsson
	mkbootimg
	postmarketos-base
	"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-kwin
	$pkgname-phosh
"
source="
	deviceinfo
	kernel-cmdline.conf
	kwin.sh
	phoc.ini
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

kwin() {
	install_if="$pkgname kwin"
	install -Dm644 "$srcdir"/kwin.sh "$subpkgdir"/etc/profile.d/kwin.sh
}

phosh() {
	install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-phosh"
	replaces="phosh"

	install -Dm644 "$srcdir"/phoc.ini \
			"$subpkgdir"/usr/share/phosh/phoc.ini
}

sha512sums="
48b2f74f58abe6113ed87135a5299060e29d6cde572ee34e7ad1efca6a4b3d998376c9f87ea296595bf49cafe008fa59fcd62d76dd730f6fa604467825699676  deviceinfo
447fd07a0896a72af0cf69708be98f92311ac9b5c1c75ae8a131bf55be3f2d6a82bedc9b2373bc2589a09b1049ad22f8eff7d6cb012e1759df11e83fada01eb2  kernel-cmdline.conf
685ec71484a932c59f83f1039d4d18a010a5849342e96d9e15ae8ce64374aac15073f9c51d7d9f270c60e70d2ea15c685b8f528cdc40f991b093b9227cba6a48  kwin.sh
95576332f1ad579d30359df9a3efcc3f478c56688509b5c470a70e8ae41466dbb397fb6db7578b5c54e13795ab8cf869b5c63ba775951817a8bb3d4c682bdfd5  phoc.ini
"
