pmaports/main/postmarketos-mkinitfs/APKBUILD
Clayton Craft bf26469fd7
main/postmarketos-mkinitfs: add /lib/firmware to list of trigger dirs (MR 4742)
In many cases, when fw is installed in /lib/firmware, some of it ends up
in the initramfs. In those situations, mkinitfs should run so that the
initramfs gets the latest fw. This will result in mkinitfs possibly
running in cases where it doesn't matter (i.e. device has fw in
/lib/firmware but none is used in the initramfs), but I think the
trade-off is worth it.

This also breaks the triggers= line into multiple lines so that it's
easier to review/maintain. We can't prepend whitespace on these lines
since the apkbuild parser expects dirs to be separated by ":"
2024-01-19 18:51:50 +01:00

65 lines
1.9 KiB
Text

# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-mkinitfs
pkgver=2.2.2
pkgrel=3
pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://postmarketos.org"
depends="
boot-deploy>=0.9
"
makedepends="go scdoc"
replaces="mkinitfs"
triggers="$pkgname.trigger=\
/lib/firmware/*:\
/usr/lib/systemd/boot:\
/usr/libexec/pmos-tests-initramfs:\
/usr/share/deviceinfo:\
/usr/share/kernel/*:\
/usr/share/mkinitfs-triggers:\
/usr/share/mkinitfs/*\
"
# mkinitfs-vendor-$pkgver.tar.gz: vendored Go deps, is part of the release:
# https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/releases
source="
https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/archive/$pkgver/postmarketos-mkinitfs-$pkgver.tar.gz
https://gitlab.com/api/v4/projects/postmarketOS%2Fpostmarketos-mkinitfs/packages/generic/mkinitfs-vendor-$pkgver/$pkgver/mkinitfs-vendor-$pkgver.tar.gz
"
install="$pkgname.post-upgrade"
arch="all"
license="GPL-2.0-or-later"
provider_priority=999 # higher priority than Alpine's mkinitfs
provides="initramfs-generator"
subpackages="$pkgname-doc"
export CGO_ENABLED=0
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
export GOPATH="$srcdir"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
prepare() {
default_prepare
ln -s "$srcdir"/vendor "$builddir"/vendor
}
build() {
unset LDFLAGS # passed to Go as linker flags, which are invalid
make VERSION="$pkgver"
}
package() {
make PREFIX=/usr DESTDIR="$pkgdir" install
}
check() {
go test ./...
}
sha512sums="
ddbb21c1beaaaad7fe9bb653ab6013a0d5b041a2e261e1f02ae7fbf716d1a8f8bf3043904707a35a4fe484aba578f0fba860d269a946541a345b647a83cde7d9 postmarketos-mkinitfs-2.2.2.tar.gz
34ecfb29d3b0e547ba3ba3e50fa0e962c3c381cc200b12504354a9cfcc46a1b2987a69f298eedb5c39a6cdb06bc270119c991ffe1f96399e37ec8c20e90385f4 mkinitfs-vendor-2.2.2.tar.gz
"