pkgname=postmarketos-mkinitfs
pkgver=0.6.7
pkgrel=0
pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://postmarketos.org"
# multipath-tools: kpartx
depends="busybox-extras lddtree cryptsetup kmod multipath-tools postmarketos-splash
	device-mapper parted e2fsprogs e2fsprogs-extra osk-sdl charging-sdl triggerhappy"
triggers="$pkgname.trigger=/etc/postmarketos-mkinitfs/hooks:/usr/share/kernel/*"
source="init.sh.in init_functions.sh mkinitfs.sh"
arch="noarch"
license="GPL2"
provides="mkinitfs=0.0.1"
options="!check"

package() {
	mkdir -p "$pkgdir/usr/share/postmarketos-mkinitfs/"
	for file in init.sh.in init_functions.sh; do
		install -Dm644 "$srcdir/$file" \
			"$pkgdir/usr/share/postmarketos-mkinitfs/$file"
	done
	install -Dm755 "$srcdir/mkinitfs.sh" \
		"$pkgdir/sbin/mkinitfs"
	mkdir -p "$pkgdir/etc/postmarketos-mkinitfs/hooks/"
}
sha512sums="d5abfe9a1298069e6722555c6e16223b09b36af65d879feb64d540aa6cbc009a3aa7f00528bcf656370ec37cc64f925c72ebb77813961cd6ebf22107b57ea029  init.sh.in
3b029db5eea5f5f2ad486fdcd944340f5c8de04b0d46aaf63c69d181ba87c4d209e3e32d35c9a6f87f214a4303390bd61b5fe980cf533b17d479d42275a6f9ae  init_functions.sh
e6bf0d326297c7061275156eb9ff354662e740ee5c1ef9e0aab3be80aa50fd32ca5fdaa33a2dfb0431fece3c98c5fea3c40a6f706237aac256b05e92100b8381  mkinitfs.sh"
