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