# Maintainer: Oliver Smith # Co-Maintainer: Clayton Craft pkgname=postmarketos-mkinitfs pkgver=1.4.1 pkgrel=1 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" provides="mkinitfs=0.0.1" export GOPATH="$srcdir" export CGO_ENABLED=0 build() { # "-s -w" build a stripped binary go build -v -ldflags="-s -w" } 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" install -Dm755 postmarketos-mkinitfs \ "$pkgdir/sbin/postmarketos-mkinitfs" ln -s /sbin/postmarketos-mkinitfs \ "$pkgdir/sbin/mkinitfs" mkdir -p "$pkgdir/etc/postmarketos-mkinitfs/hooks/" } check() { go test ./... } sha512sums=" f827acb0a10c0e5c1631f1b712e91fde7eb4ade0f1174eb2ef1754018bf4518ea1ad3229fd335c25fb0c6fe46ae20890f5cf43e58c8143ae17b5ab9bb36f0199 postmarketos-mkinitfs-1.4.1.tar.gz 08a3e79c6fa7d3839d43515b8da7817cb36f4ab014552fd0164957c232bb16fde337e57c47c9734d396a5fca3328fbf49ebabe4728c6071c80b04dad14886bba 00-default.modules 0c6d2c749952ff027f1c435a7a3b2861fb632b81c16b6d69a92b47457da4af8cb80e50168b93f92b316377c8c1f5243029fca22ac49fef0940eb5ad6c3dff6ec init.sh ddf1d545413cbf4bdd910c8bbd457ce46b1d0afe4c32ec204f3fee933386b08bc27af9f2907b0734b53d929b38352c5c8744d5828d60ffbc68f2a724b854d267 init_functions.sh "