Skip to content

Commit

Permalink
sys-kernel/make-initrd: add 2.48.1
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Gladkov <[email protected]>
  • Loading branch information
legionus committed Jul 21, 2024
1 parent 470f51c commit 83bc04e
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys-kernel/make-initrd/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ DIST make-initrd-2.45.0.tar.xz 2458296 BLAKE2B 45cf670ca1ee58efb62c94dfe1bd61857
DIST make-initrd-2.46.0.tar.xz 2458624 BLAKE2B 9ac8f6b6ef8946619890c38d7dedfa76b358d35006dc1f7eb6c928cd1da4890469b915c5f0f48389cae4d471ba3ed3eb83076fc2e583b4eb007ca8e85d14a0e1 SHA512 1b9f301026ce971841d57e29cde2e0ca36d86474cd874dcc297e6176b882e7485ca8ef709f8f7b60cc11a6b1b3547526861a5fb7ae21ef4eeebe379a1b7dc118
DIST make-initrd-2.47.0.tar.xz 2761452 BLAKE2B 5d6b937b4d610347b17458debac6eb779c8cff5aae21cbc432514c5551ff36312db2e915728fdc5ff33bbfdb8e0c1dfbc66cadd492e616aee4daeed4994a2d5d SHA512 4c01852307ff7620a6a33f3122ef7124a7def9fe497fb10585cc4e2eaafbc03995d5cad8a5646b4154234908c177cccfacca2891fd5a600c6b3caa808ac24257
DIST make-initrd-2.48.0.tar.xz 2764660 BLAKE2B 92d236755e49a1b6f5b8e04227c8d56e74bbef7d22ce9e4253d1ecd4aebfd4e95425a33f07b0344081d342c29b836b14afff710503bc01783c6511529d0dd21c SHA512 9e4f025361dba56ef60aa218c464c230dc12e51be93bf3cf826acb99d7d5efaef73c01d27c5f526c76b4fcc95476c885258ec841804200d65d55a50959571d71
DIST make-initrd-2.48.1.tar.xz 2764840 BLAKE2B 78546acc14baacf447929a27312b53884699dae8c6c5345790ad420ff4945a1cbc11957b291404bcd40ff43d7f14fdcd89a0d3fc13fabb962f6e174478dd2d50 SHA512 82d8331668e0c885a4ac96fa6b34f2a9e9363b0fc9c8277bcf59f0eaa808c2d604444338c47aeafdc604e792328956f0ce0ac92ef05783c6c30258e6fcdf4527
122 changes: 122 additions & 0 deletions sys-kernel/make-initrd/make-initrd-2.48.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Copyright 2023 Alexey Gladkov <[email protected]>
# Copyright 2024 Gabi Falk <[email protected]>
# SPDX-License-Identifier: GPL-2.0-or-later

EAPI=8

inherit autotools multilib optfeature

DESCRIPTION="Uevent-driven initramfs infrastructure based around udev"
HOMEPAGE="https://github.com/osboot/make-initrd"

if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/osboot/${PN}.git"
else
SRC_URI="https://github.com/osboot/make-initrd/releases/download/${PV}/${P}.tar.xz"
KEYWORDS="amd64"
fi

LICENSE="GPL-3+"
SLOT="0"
IUSE="+zlib bzip2 lzma zstd +man +json-c"

DEPEND="
app-alternatives/cpio
app-arch/tar
dev-build/make
dev-libs/elfutils
dev-libs/libshell
net-libs/libtirpc
sys-apps/coreutils
sys-apps/findutils
sys-apps/grep
sys-apps/kmod
sys-apps/util-linux
virtual/libcrypt:=
virtual/udev
bzip2? ( app-arch/bzip2 )
lzma? ( app-arch/xz-utils )
man? ( app-text/scdoc )
zlib? ( sys-libs/zlib )
zstd? ( app-arch/zstd )
json-c? ( dev-libs/json-c )
"
RDEPEND="${DEPEND}"

BDEPEND="
dev-build/autoconf
dev-build/automake
dev-util/intltool
sys-devel/bison
sys-devel/flex
virtual/pkgconfig
"

src_prepare() {
default

eautoreconf
}

src_configure() {
econf \
--with-bootdir="${EPREFIX}"/boot \
--with-runtimedir="${EPREFIX}/usr/$(get_abi_LIBDIR)"/initramfs \
--libexecdir="${EPREFIX}"/usr/libexec \
--with-imagename='initramfs-$(KERNEL)$(IMAGE_SUFFIX).img' \
--with-busybox \
--without-libshell \
--with-libelf \
--with-zlib=$(usex zlib) \
--with-bzip2=$(usex bzip2) \
--with-lzma=$(usex lzma) \
--with-zstd=$(usex zstd) \
--with-json-c=$(usex json-c) \
$(usex man --with-scdoc --without-scdoc) \
#
}

src_compile() {
emake
default
}

src_install() {
emake DESTDIR="${D}" install

libexec="${ED}/usr/libexec/${PN}"
projdir="${ED}/usr/share/${PN}"

rm -vr -- "$projdir/features/guestfs"

exeinto /usr/lib/kernel/install.d
# This module is based on 50-dracut.install script from
# sys-kernel/dracut-060_pre20240104-r3 package.
newexe "${FILESDIR}"/systemd-make-initrd-v2.install 50-make-initrd.install

exeinto /etc/kernel/preinst.d
newexe "${FILESDIR}"/installkernel-make-initrd-v2.install 50-make-initrd.install
}

pkg_postinst() {
optfeature_header "For underlying volume support:"
optfeature "LVM2 support" sys-fs/lvm2[lvm]
optfeature "Software RAID support" sys-fs/mdadm
optfeature "LUKS support" sys-fs/cryptsetup
optfeature "Multipath support" sys-fs/multipath-tools
optfeature "iSCSI support" sys-block/open-iscsi
optfeature "sshfs support" net-fs/sshfs
optfeature "ZFS support" sys-fs/zfs

optfeature_header "For CPU microcode support:"
optfeature "Inter microcode support" \
sys-apps/iucode_tool sys-firmware/intel-microcode
optfeature "AMD microcode support" sys-kernel/linux-firmware

optfeature_header "For misc feature support:"
optfeature "Extra Boot Config support" dev-util/bootconfig
optfeature "Plymouth support" sys-boot/plymouth
optfeature "SmartCard support" \
dev-libs/opensc sys-apps/pcsc-lite sys-apps/pcsc-tools
}

0 comments on commit 83bc04e

Please sign in to comment.