# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-zeroltexx
pkgdesc="Samsung Galaxy S6 edge"
pkgver=4
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	postmarketos-base
	postmarketos-base-downstream-disable-udev-v4l
	linux-samsung-zeroltexx
	mkbootimg
	msm-fb-refresher
"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-nonfree-firmware:nonfree_firmware
	$pkgname-openrc
	"
source="deviceinfo"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="Non-free firmware for the Samsung Galaxy S6 edge"
	depends="firmware-samsung-zero"
	mkdir "$subpkgdir"
}

openrc() {
	install_if="$pkgname=$pkgver-r$pkgrel openrc"
	install="$subpkgname.post-install"

	mkdir -p "$subpkgdir"
}


sha512sums="
44a9b16ca6c26bba1a1464eb04c0e9a1dde11249c4c177015fa82a711ec23692459473259ba465895d7e60788a3568a6576d5d4cc3e659ae0f956f94166beeb0  deviceinfo
"
