a1ee78900e
In some situations, like when building a device package with pmb, deviceinfo may not exist in the rootfs. mkinitfs 2.2's behavior changed slightly to fail if it can't find a deviceinfo, and this avoids calling it in those cases. [ci:skip-build]: Already built successfully in CI
55 lines
1.8 KiB
Text
55 lines
1.8 KiB
Text
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
|
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
|
pkgname=postmarketos-mkinitfs
|
|
pkgver=2.2
|
|
pkgrel=1
|
|
pkgdesc="Tool to generate initramfs images for postmarketOS"
|
|
url="https://postmarketos.org"
|
|
depends="
|
|
boot-deploy>=0.7
|
|
"
|
|
makedepends="go scdoc"
|
|
replaces="mkinitfs"
|
|
triggers="$pkgname.trigger=/usr/share/mkinitfs/*:/usr/share/kernel/*:/usr/share/mkinitfs-triggers"
|
|
# 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="
|
|
7efa31463e85dbcf53baac75b081060df91fee09f1ed33d5b45909d2e2571f8869be16552c486cf9f9e9945598c04ba96656dfa7a17a83a3654985901ef16b57 postmarketos-mkinitfs-2.2.tar.gz
|
|
b817718da500bee51d2de610cadfcbda88bd110ebc3ecf5c798fb3d0175e9977fb638c8bfb2054bc4573d00ff03b6ffc85654f7d6964b37577bc9de1be01a08c mkinitfs-vendor-2.2.tar.gz
|
|
"
|