-
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
123 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,3 +1,4 @@ | ||
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 | ||
DIST make-initrd-2.48.0.tar.xz 2764660 BLAKE2B 92d236755e49a1b6f5b8e04227c8d56e74bbef7d22ce9e4253d1ecd4aebfd4e95425a33f07b0344081d342c29b836b14afff710503bc01783c6511529d0dd21c SHA512 9e4f025361dba56ef60aa218c464c230dc12e51be93bf3cf826acb99d7d5efaef73c01d27c5f526c76b4fcc95476c885258ec841804200d65d55a50959571d71 |
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,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 | ||
} |