mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 04:23:16 -04:00
app-emulation/cloud-utils: new package, add 0.33
Signed-off-by: Artemis Everfree <artemis@artemis.sh>
This commit is contained in:
96
app-emulation/cloud-utils/cloud-utils-0.33.ebuild
Normal file
96
app-emulation/cloud-utils/cloud-utils-0.33.ebuild
Normal file
@@ -0,0 +1,96 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..13} )
|
||||
inherit python-single-r1
|
||||
|
||||
DESCRIPTION="Useful set of utilities for interacting with a cloud."
|
||||
HOMEPAGE="https://github.com/canonical/cloud-utils"
|
||||
SRC_URI="https://github.com/canonical/cloud-utils/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
# image-utils vs guest-utils is a distinction that does not actually exist
|
||||
# upstream, but is rather one that arch linux makes. alpine goes even more
|
||||
# fine-grained, creating a single package for each individual utility. I ain't
|
||||
# maintaining all that, but I do think the distinction arch makes is worthwhile.
|
||||
#
|
||||
# The difference is this: is the tool something you would want to use within a
|
||||
# cloud VM, or use outside of a cloud VM to manipulate your VM's disk image?
|
||||
# This is useful, because the image manipulation scripts need qemu-img and
|
||||
# cdrtools around, which you might not want to install onto a VM just to run
|
||||
# something like `ec2metadata` or `growpart`
|
||||
IUSE="+guest-utils +image-utils"
|
||||
|
||||
REQUIRED_USE="
|
||||
${PYTHON_REQUIRED_USE}
|
||||
|| ( guest-utils image-utils )
|
||||
"
|
||||
|
||||
# cloud-utils also provides its own growpart, which is I think different from
|
||||
# sys-fs/growpart.
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
guest-utils? (
|
||||
!sys-fs/growpart
|
||||
)
|
||||
image-utils? (
|
||||
app-cdr/cdrtools
|
||||
app-emulation/qemu
|
||||
app-misc/ca-certificates
|
||||
net-misc/wget
|
||||
sys-apps/util-linux
|
||||
sys-fs/dosfstools
|
||||
sys-fs/e2fsprogs
|
||||
sys-fs/mtools
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/use-mkisofs.patch
|
||||
)
|
||||
|
||||
src_install() {
|
||||
# This package really is just a pile of scripts, with a simple Makefile that
|
||||
# installs them. We can implement the USE flags most easily by ignoring the
|
||||
# Makefile and installing the files ourselves.
|
||||
|
||||
local wanted_bin=()
|
||||
local wanted_man=()
|
||||
|
||||
if use 'guest-utils'; then
|
||||
wanted_bin+=(
|
||||
bin/ec2metadata
|
||||
bin/growpart
|
||||
bin/vcs-run
|
||||
)
|
||||
wanted_man+=(
|
||||
man/growpart.1
|
||||
)
|
||||
fi
|
||||
|
||||
if use 'image-utils'; then
|
||||
wanted_bin+=(
|
||||
bin/cloud-localds
|
||||
bin/mount-image-callback
|
||||
bin/resize-part-image
|
||||
bin/write-mime-multipart
|
||||
)
|
||||
wanted_man+=(
|
||||
man/cloud-localds.1
|
||||
man/resize-part-image.1
|
||||
man/write-mime-multipart.1
|
||||
)
|
||||
fi
|
||||
|
||||
local bindir="${D}/usr/bin"
|
||||
local mandir="${D}/usr/share/man/man1"
|
||||
|
||||
mkdir -p "${bindir}" "${mandir}" || die
|
||||
install "${wanted_bin[@]}" "${bindir}" || die
|
||||
install "${wanted_man[@]}" "${mandir}" --mode=0644 || die
|
||||
}
|
||||
Reference in New Issue
Block a user