summaryrefslogtreecommitdiffstats
path: root/recipes-containers/cdi/cdi_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/cdi/cdi_git.bb')
-rw-r--r--recipes-containers/cdi/cdi_git.bb40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-containers/cdi/cdi_git.bb b/recipes-containers/cdi/cdi_git.bb
new file mode 100644
index 00000000..acdfb7ad
--- /dev/null
+++ b/recipes-containers/cdi/cdi_git.bb
@@ -0,0 +1,40 @@
1DESCRIPTION = "The cdi command-line tool is a utility for inspecting and interacting with the CDI (Container Device Interface) cache."
2SUMMARY = "The cdi command-line tool."
3HOMEPAGE = "https://github.com/cncf-tags/container-device-interface"
4
5LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
7
8PV = "1.1.0+git"
9SRCREV_cdi = "35765bd41b50a86aa3919eb352bc90321e010e68"
10SRCREV_FORMAT = "cdi"
11SRC_URI = "git://github.com/cncf-tags/container-device-interface.git;protocol=https;name=cdi;branch=main;destsuffix=${GO_SRCURI_DESTSUFFIX} \
12 "
13SRCREV_FORMAT = "cdi"
14
15GO_IMPORT = "tags.cncf.io/container-device-interface/"
16
17inherit go goarch
18
19# GO_MOD_FETCH_MODE: "vcs" (all git://) or "hybrid" (gomod:// + git://)
20GO_MOD_FETCH_MODE ?= "hybrid"
21
22# VCS mode: all modules via git://
23include ${@ "go-mod-git.inc" if d.getVar("GO_MOD_FETCH_MODE") == "vcs" else ""}
24include ${@ "go-mod-cache.inc" if d.getVar("GO_MOD_FETCH_MODE") == "vcs" else ""}
25
26# Hybrid mode: gomod:// for most, git:// for selected
27include ${@ "go-mod-hybrid-gomod.inc" if d.getVar("GO_MOD_FETCH_MODE") == "hybrid" else ""}
28include ${@ "go-mod-hybrid-git.inc" if d.getVar("GO_MOD_FETCH_MODE") == "hybrid" else ""}
29include ${@ "go-mod-hybrid-cache.inc" if d.getVar("GO_MOD_FETCH_MODE") == "hybrid" else ""}
30
31do_compile() {
32 cd ${S}/src/${GO_IMPORT}
33 sed -i -e 's:GO_EXTRAFLAGS:GOBUILDFLAGS:g' Makefile
34 oe_runmake
35}
36
37do_install() {
38 install -d "${D}${bindir}"
39 install -m 755 ${S}/src/${GO_IMPORT}/bin/* "${D}${bindir}"
40}