new package: tinyramfs-0.1.0

This commit is contained in:
dkwo 2023-03-07 16:11:17 -05:00 committed by Andrew J. Hesford
parent 8b9a8827cf
commit 900477f176
4 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,4 @@
compress="gzip -9"
hooks="eudev"
root=
root_type=ext4

View file

@ -0,0 +1,13 @@
#!/bin/sh
#
# Kernel post-install hook for tinyramfs.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
[ -x usr/bin/tinyramfs ] || exit 0
umask 0077
usr/bin/tinyramfs -f -k ${VERSION} boot/initramfs-${VERSION}.img

View file

@ -0,0 +1,10 @@
#!/bin/sh
#
# Kernel post-remove hook for tinyramfs.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
rm -f boot/initramfs-${VERSION}.img

View file

@ -0,0 +1,24 @@
# Template file for 'tinyramfs'
pkgname=tinyramfs
version=0.1.0
revision=1
build_style=gnu-makefile
depends="util-linux cpio binutils kmod"
short_desc="Tiny initramfs written in POSIX shell"
maintainer="dkwo <npiazza@disroot.org>"
license="GPL-3.0-only"
homepage="https://github.com/illiliti/tinyramfs"
distfiles="https://github.com/illiliti/tinyramfs/archive/refs/tags/${version}.tar.gz"
checksum=a78ecd56a52a02bc1f4b86ba829a957ad1f83c252bfde66562d5c3ef40be7c51
alternatives="
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/tinyramfs/kernel-hook-postinst
initramfs:/etc/kernel.d/post-remove/20-initramfs:/usr/libexec/tinyramfs/kernel-hook-postrm
"
make_check=no # checking requires qemu, locally this still fails
conf_files="/etc/tinyramfs/config"
post_install() {
vinstall ${FILESDIR}/kernel-hook-postinst 755 usr/libexec/tinyramfs
vinstall ${FILESDIR}/kernel-hook-postrm 755 usr/libexec/tinyramfs
vinstall ${FILESDIR}/config 644 etc/tinyramfs
}