Skip to content

Commit

Permalink
sys-kernel/genkernel: updated 9999 to reflect recent changes
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Kenno Handojo
  • Loading branch information
timkenhan committed Sep 28, 2023
1 parent e7c3d8e commit a8470e7
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 28 deletions.
71 changes: 43 additions & 28 deletions sys-kernel/genkernel/genkernel-9999.ebuild
Expand Up @@ -103,7 +103,7 @@ HOMEPAGE="https://wiki.gentoo.org/wiki/Genkernel https://gitweb.gentoo.org/proj/
LICENSE="GPL-2"
SLOT="0"
RESTRICT=""
IUSE="ibm +firmware"
IUSE="ibm +firmware +doc -btrfs -plymouth -b2sum -bcache -dmraid -e2fsprogs -iscsi -luks -lvm -mdadm -multipath -ssh -strace -unionfs -xfsprogs -zfs"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

# Note:
Expand All @@ -128,11 +128,24 @@ RDEPEND="${PYTHON_DEPS}
sys-devel/libtool
virtual/pkgconfig
elibc_glibc? ( sys-libs/glibc[static-libs(+)] )
firmware? ( sys-kernel/linux-firmware )"

if [[ ${PV} == 9999* ]]; then
DEPEND="${DEPEND} app-text/asciidoc"
fi
firmware? ( sys-kernel/linux-firmware )
plymouth? ( sys-boot/plymouth )
doc? ( app-text/asciidoc )"
# iscsi ? ( net-libs/libiscsi )
# dmraid ? ( sys-fs/ )
# luks ? ( sys-fs/cryptsetup )
# lvm ? ( sys-fs/lvm2 )
# mdadm ? ( sys-fs/mdadm )
# multipath ? ( sys-fs/multipath-tools )
# btrfs ? ( sys-fs/btrfs-progs )
# e2fsprogs ? ( sys-fs/e2fsprogs )
# unionfs ? ( sys-fs/unionfs-fuse )
# xfsprogs ? ( sys-fs/xfsprogs )
# zfs ? ( sys-fs/zfs )
# bcache ? ( sys-fs/bcachefs-tools )
# b2sum ? ( sys-apps/util-linux )
# ssh ? ( net-misc/openssh )
# strace ? ( dev-util/strace )

PATCHES=(
)
Expand Down Expand Up @@ -202,34 +215,36 @@ src_prepare() {
-e "s:VERSION_ZSTD:${VERSION_ZSTD}:"\
"${S}"/defaults/software.sh \
|| die "Could not adjust versions"

GK_FEATURES="" # prepare genkernel feature list

if use b2sum ; then GK_FEATURES="${GK_FEATURES}b2sum " ; fi
if use bcache ; then GK_FEATURES="${GK_FEATURES}bcache " ; fi
if use btrfs ; then GK_FEATURES="${GK_FEATURES}btrfs " ; fi
if use dmraid ; then GK_FEATURES="${GK_FEATURES}dmraid " ; fi
if use e2fsprogs ; then GK_FEATURES="${GK_FEATURES}e2fsprogs " ; fi
if use iscsi ; then GK_FEATURES="${GK_FEATURES}iscsi " ; fi
if use luks ; then GK_FEATURES="${GK_FEATURES}luks " ; fi
if use lvm ; then GK_FEATURES="${GK_FEATURES}lvm " ; fi
if use mdadm ; then GK_FEATURES="${GK_FEATURES}mdadm " ; fi
if use multipath ; then GK_FEATURES="${GK_FEATURES}multipath " ; fi
if use plymouth ; then GK_FEATURES="${GK_FEATURES}plymouth " ; fi
# if use splash ; then GK_FEATURES="${GK_FEATURES}splash " ; fi
if use ssh ; then GK_FEATURES="${GK_FEATURES}ssh " ; fi
if use strace ; then GK_FEATURES="${GK_FEATURES}strace " ; fi
if use unionfs ; then GK_FEATURES="${GK_FEATURES}unionfs " ; fi
if use xfsprogs ; then GK_FEATURES="${GK_FEATURES}xfsprogs " ; fi
if use zfs ; then GK_FEATURES="${GK_FEATURES}zfs " ; fi

export GK_FEATURES
}

src_compile() {
if [[ ${PV} == 9999* ]] ; then
emake
fi
emake PREFIX=/usr
}

src_install() {
insinto /etc
doins "${S}"/genkernel.conf

doman genkernel.8
dodoc AUTHORS ChangeLog README TODO
dobin genkernel
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf

if use ibm ; then
cp "${S}"/arch/ppc64/kernel-2.6{-pSeries,} || die
else
cp "${S}"/arch/ppc64/kernel-2.6{.g5,} || die
fi

insinto /usr/share/genkernel
doins -r "${S}"/*

fperms +x /usr/share/genkernel/gen_worker.sh
fperms +x /usr/share/genkernel/path_expander.py
emake DESTDIR="${D}" PREFIX=/usr install

python_fix_shebang "${ED}"/usr/share/genkernel/path_expander.py

Expand Down
16 changes: 16 additions & 0 deletions sys-kernel/genkernel/metadata.xml
Expand Up @@ -6,6 +6,22 @@
</maintainer>
<use>
<flag name="firmware">Prefer system firmware <pkg>sys-kernel/linux-firmware</pkg> over local copy.</flag>
<flag name="iscsi">Include option to have <pkg>net-libs/libiscsi</pkg> in the initramfs</flag>
<flag name="dmraid">Include option to have <pkg>sys-fs/dmraid</pkg> in the initramfs</flag>
<flag name="luks">Include option to have <pkg>sys-fs/cryptsetup</pkg> in the initramfs</flag>
<flag name="lvm">Include option to have <pkg>sys-fs/lvm2</pkg> in the initramfs</flag>
<flag name="mdadm">Include option to have <pkg>sys-fs/mdadm</pkg> in the initramfs</flag>
<flag name="multipath">Include option to have <pkg>sys-fs/multipath-tools</pkg> in the initramfs</flag>
<flag name="btrfs">Include option to have <pkg>sys-fs/btrfs-progs</pkg> in the initramfs</flag>
<flag name="e2fsprogs">Include option to have <pkg>sys-fs/e2fsprogs</pkg> in the initramfs</flag>
<flag name="unionfs">Include option to have <pkg>sys-fs/unionfs-fuse</pkg> in the initramfs</flag>
<flag name="xfsprogs">Include option to have <pkg>sys-fs/xfsprogs</pkg> in the initramfs</flag>
<flag name="zfs">Include option to have <pkg>sys-fs/zfs</pkg> in the initramfs</flag>
<flag name="bcache">Include option to have <pkg>sys-fs/bcachefs-tools</pkg> in the initramfs</flag>
<flag name="b2sum">Include option to have b2sum from <pkg>sys-apps/util-linux</pkg> in the initramfs</flag>
<flag name="plymouth">Include option to have <pkg>sys-boot/plymouth</pkg> in the initramfs</flag>
<flag name="ssh">Include option to have <pkg>net-misc/openssh</pkg> in the initramfs</flag>
<flag name="strace">Include option to have <pkg>dev-util/strace</pkg> in the initramfs</flag>
</use>
<upstream>
<remote-id type="gentoo">proj/genkernel</remote-id>
Expand Down

0 comments on commit a8470e7

Please sign in to comment.