diff options
author | Zen <z@pyl.onl> | 2024-11-19 10:54:57 -0600 |
---|---|---|
committer | Nowa Ammerlaan <nowa@gentoo.org> | 2024-11-20 10:36:40 +0100 |
commit | a8a0b918c16690b366835ffa30f67af9e4ebfd63 (patch) | |
tree | fe06da74d5394e2e2c6d1291cea6f7cb02815066 /sys-kernel/ugrd/ugrd-1.28.2.ebuild | |
parent | sys-kernel/ugrd: Add 1.27.2 with backported fix (diff) | |
download | gentoo-a8a0b918c16690b366835ffa30f67af9e4ebfd63.tar.gz gentoo-a8a0b918c16690b366835ffa30f67af9e4ebfd63.tar.bz2 gentoo-a8a0b918c16690b366835ffa30f67af9e4ebfd63.zip |
sys-kernel/ugrd: Add 1.28.2
Signed-off-by: Zen <z@pyl.onl>
Closes: https://github.com/gentoo/gentoo/pull/39374
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
Diffstat (limited to 'sys-kernel/ugrd/ugrd-1.28.2.ebuild')
-rw-r--r-- | sys-kernel/ugrd/ugrd-1.28.2.ebuild | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/sys-kernel/ugrd/ugrd-1.28.2.ebuild b/sys-kernel/ugrd/ugrd-1.28.2.ebuild new file mode 100644 index 000000000000..21ddb7fb455a --- /dev/null +++ b/sys-kernel/ugrd/ugrd-1.28.2.ebuild @@ -0,0 +1,73 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..13} ) +inherit distutils-r1 optfeature shell-completion + +DESCRIPTION="Python based initramfs generator with TOML defintions" +HOMEPAGE="https://github.com/desultory/ugrd" +SRC_URI="https://github.com/desultory/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +RESTRICT="test" +PROPERTIES="test_privileged" + +RDEPEND=" + app-misc/pax-utils + >=dev-python/zenlib-2.3.2[${PYTHON_USEDEP}] + >=dev-python/pycpio-1.4.0[${PYTHON_USEDEP}] + sys-apps/pciutils +" + +BDEPEND=" + test? ( + sys-fs/btrfs-progs + sys-fs/xfsprogs + sys-fs/cryptsetup + amd64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] ) + arm64? ( app-emulation/qemu[qemu_softmmu_targets_aarch64] ) + ) +" + +python_install_all() { + # Call the distutils-r1_python_install_all function + distutils-r1_python_install_all + # Install the example config into /etc/ugrd/config.toml + # Do not overwrite an existing config + insinto /etc/ugrd + newins examples/example.toml config.toml + + # Install the kernel preinst.d hook + exeinto /usr/lib/kernel/preinst.d + doexe hooks/installkernel/52-ugrd.install + exeinto /usr/lib/kernel/install.d + doexe hooks/kernel-install/52-ugrd.install + + dobashcomp completion/ugrd # Install bash autocomplete script + dozshcomp completion/_ugrd # Install zsh autocomplete script +} + +pkg_postinst() { + optfeature "ugrd.crypto.cryptsetup support" sys-fs/cryptsetup + optfeature "ugrd.fs.btrfs support" sys-fs/btrfs-progs + optfeature "ugrd.crypto.gpg support" app-crypt/gnupg + optfeature "ugrd.fs.lvm support" sys-fs/lvm2[lvm] + optfeature "ugrd.fs.mdraid support" sys-fs/mdadm + optfeature "ugrd.base.plymouth support" sys-boot/plymouth +} + +distutils_enable_tests unittest + +src_test() { + addwrite /dev/kvm + distutils-r1_src_test +} + +python_test() { + eunittest tests/ +} |