From f55754c858aac01515725984995aaff4491ae8b0 Mon Sep 17 00:00:00 2001 From: wael <40663@proton.me> Date: Sun, 17 Jul 2022 11:58:35 +0300 Subject: [PATCH] New package: tinyramfs-0.1.0 --- srcpkgs/tinyramfs/files/kernel-hook-postinst | 5 +++++ srcpkgs/tinyramfs/files/kernel-hook-postrm | 5 +++++ srcpkgs/tinyramfs/template | 20 ++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100755 srcpkgs/tinyramfs/files/kernel-hook-postinst create mode 100755 srcpkgs/tinyramfs/files/kernel-hook-postrm create mode 100644 srcpkgs/tinyramfs/template diff --git a/srcpkgs/tinyramfs/files/kernel-hook-postinst b/srcpkgs/tinyramfs/files/kernel-hook-postinst new file mode 100755 index 000000000000..5a591fd55490 --- /dev/null +++ b/srcpkgs/tinyramfs/files/kernel-hook-postinst @@ -0,0 +1,5 @@ +#!/bin/sh +PKGNAME="$1" +VERSION="$2" + +usr/bin/tinyramfs -f -k ${VERSION} boot/initramfs-${VERSION}.img diff --git a/srcpkgs/tinyramfs/files/kernel-hook-postrm b/srcpkgs/tinyramfs/files/kernel-hook-postrm new file mode 100755 index 000000000000..0badb451e491 --- /dev/null +++ b/srcpkgs/tinyramfs/files/kernel-hook-postrm @@ -0,0 +1,5 @@ +#!/bin/sh +PKGNAME="$1" +VERSION="$2" + +rm -f boot/initramfs-${VERSION}.img diff --git a/srcpkgs/tinyramfs/template b/srcpkgs/tinyramfs/template new file mode 100644 index 000000000000..f1229cb81378 --- /dev/null +++ b/srcpkgs/tinyramfs/template @@ -0,0 +1,20 @@ +# Template file for 'tinyramfs' +pkgname=tinyramfs +version=0.1.0 +revision=1 +build_style=gnu-makefile +depends="util-linux cpio binutils eudev kmod" +short_desc="Tiny initramfs written in POSIX shell" +maintainer="wael <40663@proton.me>" +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 +# checking requires qemu, locally this still fails +make_check=no + +post_install() { + vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-tinyramfs + vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-tinyramfs + rm -rf ${DESTDIR}/usr/lib/dracut/hook.d/systemd-udev +}