-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alexey Gladkov <[email protected]>
- Loading branch information
Showing
2 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
DIST make-initrd-2.45.0.tar.xz 2458296 BLAKE2B 45cf670ca1ee58efb62c94dfe1bd618575b60d92d5941795198aee8b93a0f20f545bfd1619d853f00c21615af1910691fcc758c92f9189550145b07f02aa6595 SHA512 e69a1b821eaa03b85d671d153fef6d4e97728ee766d6045cbbb76d166458d42bcf80c25d8e893d0b7f1d2694ac7c62a0102b386b006c75a14284b72a8fc8ee4e | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# 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" | ||
|
||
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 ) | ||
" | ||
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) \ | ||
$(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 | ||
} |