# Maintainer: Oliver Smith # Co-Maintainer: Clayton Craft pkgname=postmarketos-mkinitfs pkgver=1.5.1 pkgrel=4 pkgdesc="Tool to generate initramfs images for postmarketOS" url="https://postmarketos.org" depends=" boot-deploy busybox-extras btrfs-progs bzip2 cryptsetup device-mapper e2fsprogs e2fsprogs-extra f2fs-tools lz4 multipath-tools parted postmarketos-fde-unlocker unudhcpd xz " makedepends="go" replaces="mkinitfs" triggers="$pkgname.trigger=/etc/postmarketos-mkinitfs/hooks:/usr/share/kernel/*:/usr/share/postmarketos-mkinitfs-triggers" source=" https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/archive/$pkgver/postmarketos-mkinitfs-$pkgver.tar.gz 00-default.modules init.sh init_functions.sh " install="$pkgname.post-upgrade" arch="all" license="GPL-2.0-or-later" provider_priority=999 # higher priority than Alpine's mkinitfs provides="initramfs-generator" export GOPATH="$srcdir" export CGO_ENABLED=0 build() { unset LDFLAGS # passed to Go as linker flags, which are invalid make } package() { install -Dm644 "$srcdir/init_functions.sh" \ "$pkgdir/usr/share/postmarketos-mkinitfs/init_functions.sh" install -Dm755 "$srcdir/init.sh" \ "$pkgdir/usr/share/postmarketos-mkinitfs/init.sh" install -Dm644 "$srcdir/00-default.modules" \ "$pkgdir/etc/postmarketos-mkinitfs/modules/00-default.modules" mkdir -p "$pkgdir/etc/postmarketos-mkinitfs/hooks/" make PREFIX=/usr DESTDIR="$pkgdir" install } check() { go test ./... } sha512sums=" d28802b17d7912a58d23c02fbdddfdb6f74489e712d61a59472f7f000a4429786f69ba2fca59d321c55c277ff79edb6f47c939a9e973b31f694aeca0167354ff postmarketos-mkinitfs-1.5.1.tar.gz 20f110337113e8de8999cf2a064a93fea36821d5c216bfa4ba46ec1f83825638262b92fd7be29eee0a85a54a108b7315a96cbe30da8ae4419f54c2ed53bb08c7 00-default.modules 92397322bea64ab5e4dfcd572ddad361b55bd5b59cfb34d5e143416a2ae80182b2d14cdeb0b8b25216792495827922cd5ab6bfa8ed720a79359975293a662630 init.sh bf9787338df2ad90f1f9c80d88b91bbd5f394fef27cf588ed9a2b7a1e5550cc6b89ea8755c789dd182b23b8d86cbcf8f9b76b12e126a5a67f0b0ba1c315c1850 init_functions.sh "