blob: 034217c310cfc1ead995b786abf922714bd661d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake optfeature udev
DESCRIPTION="Utilities and udev rules to support Linux on Azure"
HOMEPAGE="https://github.com/Azure/azure-vm-utils"
SRC_URI="https://github.com/Azure/${PN}/archive/refs/tags/v${PV}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="dracut test"
RESTRICT="!test? ( test )"
CDEPEND="
dev-libs/json-c:=
"
DEPEND="
${CDEPEND}
test? ( dev-util/cmocka )
"
RDEPEND="
${CDEPEND}
dracut? ( sys-kernel/dracut )
"
BDEPEND="
virtual/pkgconfig
"
src_configure() {
local mycmakeargs=(
-DAZURE_EPHEMERAL_DISK_SETUP_CONF_INSTALL_DIR="${EPREFIX}/etc"
-DDRACUT=$(usex dracut dracut "")
-DENABLE_TESTS=$(usex test)
-DINITRAMFS_TOOLS=
-DUDEV_RULES_INSTALL_DIR="${EPREFIX}$(get_udevdir)/rules.d"
-DVERSION="v${PV}"
)
cmake_src_configure
}
src_install() {
cmake_src_install
# Remove post-install test that only works on Azure.
rm -v \
"${ED}"/usr/sbin/azure-vm-utils-selftest \
"${ED}"/usr/share/man/man*/azure-vm-utils-selftest.* \
|| die
}
pkg_postinst() {
udev_reload
optfeature "aggregating multiple NVMe devices into a RAID-0 array" sys-fs/mdadm
}
pkg_postrm() {
udev_reload
}
|