From e3a187dcc0081f8f071c3e890a2530542bafe3b9 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 | 18 ++++++++++++++++++ 3 files changed, 28 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..10c013502ef3 --- /dev/null +++ b/srcpkgs/tinyramfs/template @@ -0,0 +1,18 @@ +# 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}.zip" +checksum=0a05bcc6963aa24383ea3dca747c50f8cbdff2621858e5eb9e233cf670cb617d + +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 +}