mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
New package: booster-0.9
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
This commit is contained in:
parent
c5bfc00a36
commit
14d62d90f7
3 changed files with 76 additions and 0 deletions
13
srcpkgs/booster/files/kernel-hook-postinst
Normal file
13
srcpkgs/booster/files/kernel-hook-postinst
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Kernel post-install hook for booster.
|
||||||
|
#
|
||||||
|
# Arguments passed to this script: $1 pkgname, $2 version.
|
||||||
|
#
|
||||||
|
PKGNAME="$1"
|
||||||
|
VERSION="$2"
|
||||||
|
|
||||||
|
[ -x usr/bin/booster ] || exit 0
|
||||||
|
|
||||||
|
umask 0077
|
||||||
|
usr/bin/booster build --force --kernel-version ${VERSION} boot/initramfs-${VERSION}.img
|
10
srcpkgs/booster/files/kernel-hook-postrm
Normal file
10
srcpkgs/booster/files/kernel-hook-postrm
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Kernel post-remove hook for booster.
|
||||||
|
#
|
||||||
|
# Arguments passed to this script: $1 pkgname, $2 version.
|
||||||
|
#
|
||||||
|
PKGNAME="$1"
|
||||||
|
VERSION="$2"
|
||||||
|
|
||||||
|
rm -f boot/initramfs-${VERSION}.img
|
53
srcpkgs/booster/template
Normal file
53
srcpkgs/booster/template
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# Template file for 'booster'
|
||||||
|
pkgname=booster
|
||||||
|
version=0.9
|
||||||
|
revision=1
|
||||||
|
build_style=go
|
||||||
|
go_import_path=github.com/anatol/booster
|
||||||
|
hostmakedepends="git ruby-ronn"
|
||||||
|
depends="busybox-static"
|
||||||
|
short_desc="Fast and secure initramfs generator"
|
||||||
|
maintainer="travankor <travankor@tuta.io>"
|
||||||
|
license="MIT"
|
||||||
|
homepage="https://github.com/anatol/booster"
|
||||||
|
distfiles="https://github.com/anatol/booster/archive/${version}.tar.gz"
|
||||||
|
checksum=786b89ac5f5b6fb063ff58b490525c9fda9c6f2ae53ab06416b25993bdb72ca4
|
||||||
|
conf_files="/etc/booster.yaml"
|
||||||
|
alternatives="
|
||||||
|
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/booster/kernel-hook-postinst
|
||||||
|
initramfs:/etc/kernel.d/post-remove/20-initramfs:/usr/libexec/booster/kernel-hook-postrm
|
||||||
|
"
|
||||||
|
|
||||||
|
_build_component() {
|
||||||
|
go install -p "$XBPS_MAKEJOBS" -mod=readonly -x
|
||||||
|
}
|
||||||
|
|
||||||
|
do_build() {
|
||||||
|
( cd generator && _build_component )
|
||||||
|
( cd init && CGO_ENABLED=0 _build_component )
|
||||||
|
|
||||||
|
ronn docs/manpage.md
|
||||||
|
|
||||||
|
echo "busybox: true" > booster.yaml
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
local _srcdir="${GOPATH}/bin"
|
||||||
|
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
_srcdir="${_srcdir}/linux_${GOARCH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
vbin "${_srcdir}/generator" booster
|
||||||
|
vinstall "${_srcdir}/init" 755 usr/lib/booster
|
||||||
|
|
||||||
|
vman docs/manpage.1 booster.1
|
||||||
|
vconf booster.yaml
|
||||||
|
|
||||||
|
vinstall ${FILESDIR}/kernel-hook-postinst 755 usr/libexec/booster
|
||||||
|
vinstall ${FILESDIR}/kernel-hook-postrm 755 usr/libexec/booster
|
||||||
|
|
||||||
|
vcompletion contrib/completion/bash bash booster
|
||||||
|
|
||||||
|
vlicense LICENSE
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue