# Maintainer: Oliver Smith # Co-Maintainer: Clayton Craft pkgname=postmarketos-mkinitfs pkgver=2.2.2 pkgrel=2 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=/usr/share/mkinitfs/*:/usr/share/kernel/*:/usr/share/mkinitfs-triggers:/usr/share/deviceinfo:/usr/libexec/pmos-tests-initramfs:/usr/lib/systemd/boot" # 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 "