pmaports/main/postmarketos-mkinitfs/APKBUILD

72 lines
2.1 KiB
Text

# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-mkinitfs
pkgver=1.5
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"
provider_priority=999 # higher priority than Alpine's mkinitfs
provides="initramfs-generator"
export GOPATH="$srcdir"
export CGO_ENABLED=0
build() {
unset LDFLAGS # passed to Go as linker flags, which are invalid
make
}
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"
mkdir -p "$pkgdir/etc/postmarketos-mkinitfs/hooks/"
make PREFIX=/usr DESTDIR="$pkgdir" install
}
check() {
go test ./...
}
sha512sums="
b5214a275b5bf553621a345400b74af6f24f620c706e23b8bbfe42d400e835268e846834480bb1b955fa91ba4357e4339fa0f05304ce3536bfd270d1f91633a2 postmarketos-mkinitfs-1.5.tar.gz
20f110337113e8de8999cf2a064a93fea36821d5c216bfa4ba46ec1f83825638262b92fd7be29eee0a85a54a108b7315a96cbe30da8ae4419f54c2ed53bb08c7 00-default.modules
ccdceaa710d97d6f57d8d66bfcbec448486d08083341712303f62123039f729229b88528308e411a308a2b90b81b60de89fe91143a6facbb11cbc9b4055eeaec init.sh
2abdea96aa66fcc709092ab97bfe5a99ecd7a6c959e344e0619a1c93ce28de21530379c498012a4d8e938013e7b490d3a00d5782b6d75c0987220ac3e7d66c92 init_functions.sh
"