# Reference: <https://postmarketos.org/devicepkg>
maintainer=""
pkgname=device-samsung-i9100
pkgver=15
pkgrel=0
pkgdesc="Samsung Galaxy SII"
url="https://postmarketos.org"
arch="armv7"
license="MIT"
depends="
	firmware-samsung-i9100
	firmware-samsung-s5k5baf
	libsamsung-ipc
	linux-firmware-s5p-mfc
	linux-postmarketos-exynos4
	mesa-egl
	postmarketos-base
	u-boot-samsung-i9100>=2025.07
	v4l-utils
	"
makedepends="devicepkg-dev"
install="$pkgname.post-install"
options="!check !archcheck"
subpackages="
	$pkgname-openrc:openrc
"
source="
	deviceinfo
	kernel-cmdline.conf
	media-pipeline.initd
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

openrc() {
	install_if="$pkgname=$pkgver-r$pkgrel openrc"
	install="$subpkgname.post-install"
	install -Dm755 "$srcdir"/media-pipeline.initd "$subpkgdir"/etc/init.d/media-pipeline
}

sha512sums="
c55ecbe75ff9097d314bc3ac694c1d98cd0bc2185c01b0e670bfc15e35bc73cde35370e5a2688721471deb689b2269b1a1d44bee6a65d166df5136b534769401  deviceinfo
61eb2babd4c3e53e70b7a351795b60acdcca0a5d4603055add225bec9b45e50ee1956236837f7caa1c214d439834c90d836df329c0c1f47b433fd7ddc45fac96  kernel-cmdline.conf
d3f06476be583f095189557e5269866cfc9346ddbf8d78267d7562fad7f5eca6b09b81fd08cd9690ecf88105bafe8f3ebd9136b68ab5cdaa8bfff740a8bdf3d2  media-pipeline.initd
"
