maintainer="Clayton Craft <clayton@craftyguy.net>"
pkgname=postmarketos-bootsplash
pkgver=0.4.0
pkgrel=0
pkgdesc="pmOS integration components for boot/shutdown splash screen"
url="https://postmarketos.org"
arch="all"
license="CC-BY-SA-3.0"
depends="
	devicepkg-utils
	font-droid
	plymouth
	plymouth-drm
	postmarketos-plymouth-themes
"
depends_openrc="plymouth-openrc-plugin"
options="!check" # no testsuite
subpackages="$pkgname-openrc"
source="
	20-plymouth.conf
	plymouthd.conf
	postmarketos-bootsplash.files
"
replaces="plymouth"

package() {
	# NOTE: install files to initramfs-extra due to size
	install -Dm644 "$srcdir"/postmarketos-bootsplash.files \
		"$pkgdir"/usr/share/mkinitfs/files-extra/30-postmarketos-bootsplash.files

	install -Dm644 "$srcdir"/plymouthd.conf \
		"$pkgdir"/usr/share/plymouth/plymouthd.defaults

	touch bootsplash-trigger
	install -Dm644 bootsplash-trigger \
		"$pkgdir"/usr/share/mkinitfs-triggers/bootsplash

	install -Dm644 20-plymouth.conf -t "$pkgdir"/usr/lib/kernel-cmdline.d
}

openrc() {
	default_openrc

	mkdir -p "$subpkgdir"
}

sha512sums="
dc6d38d3048ee3be47871cb9f4909cc7572f57be792c1cf39688abfd9659e5149699308ead35fe7fd37b87fbac5668cbf03d3b6acd74ec05c8c4b39735e9e8df  20-plymouth.conf
d4cab2578116afa4ca33ca94671191d44e71d4c46cfb11248c42f6bd1e49714eae56339330f483b247a3da0865892a100dc6f33e378a9cbfaea2f56e9616fcd8  plymouthd.conf
c261e23acc70c8062abf4d5419806a832889a70ed8222535269206bb333dfa6f9ab953fe2ddfcf032fe7f89c2ca0ed6497e6a61cf9fd99f6b6372b3dd55658af  postmarketos-bootsplash.files
"
