# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-zerofltexx
pkgdesc="Samsung Galaxy S6"
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-zerofltexx
	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"
	depends="firmware-samsung-zero"
	mkdir "$subpkgdir"
}

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

	mkdir -p "$subpkgdir"
}


sha512sums="
e92397f3bc43bee2acab6edbb705c7c94da2f4024c454ba8a62a40713fefeb9b9078f907dae30edec21805c378f2771597043c7d254c30904feedc59409eb70b  deviceinfo
"
