pmaports/main/postmarketos-mkinitfs/APKBUILD

65 lines
1.9 KiB
Text
Raw Normal View History

# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-mkinitfs
pkgver=2.4.0
pkgrel=0
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 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="
999cc57ebd9c9a1ef22f76093802bd95712b8f03578d50884818f4452cbc1887e306a8856a3631b6fcca6f132c7b12ce55023d0673f809b884c36c31ad3e861f postmarketos-mkinitfs-2.4.0.tar.gz
ee20b2bf71f5cd584aab04da9937462d87a8ec29691681588208d862ae85dedc02f1ca0e0aa8d3020fdbe65e16f4dcf215fd12e285056a3f654523c7891afac3 mkinitfs-vendor-2.4.0.tar.gz
"