summaryrefslogtreecommitdiffstats
path: root/external/meta-virtualization/recipes-core/kata-containers/kata-agent_git.bb
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-virtualization/recipes-core/kata-containers/kata-agent_git.bb
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-virtualization/recipes-core/kata-containers/kata-agent_git.bb')
-rw-r--r--external/meta-virtualization/recipes-core/kata-containers/kata-agent_git.bb39
1 files changed, 39 insertions, 0 deletions
diff --git a/external/meta-virtualization/recipes-core/kata-containers/kata-agent_git.bb b/external/meta-virtualization/recipes-core/kata-containers/kata-agent_git.bb
new file mode 100644
index 00000000..3632ee52
--- /dev/null
+++ b/external/meta-virtualization/recipes-core/kata-containers/kata-agent_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Agent run inside a virtual machine, which spawns containers and processes"
+HOMEPAGE = "https://github.com/kata-containers/agent"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/github.com/kata-containers/agent/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+GO_IMPORT = "github.com/kata-containers/agent"
+SRCREV = "e03f7d7453fabffb17e1540f28666c26178d3cbf"
+SRC_URI = "git://${GO_IMPORT}.git \
+ "
+
+RDEPENDS_${PN}-dev_append = "bash"
+
+S = "${WORKDIR}/git"
+
+inherit go
+
+do_compile() {
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export GOARCH=${TARGET_GOARCH}
+ export CGO_ENABLED="1"
+ export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+
+ cd ${S}/src/${GO_IMPORT}
+ oe_runmake kata-agent
+}
+
+do_install() {
+ mkdir -p ${D}/${bindir}/
+ cp ${WORKDIR}/git/src/${GO_IMPORT}/kata-agent ${D}/${bindir}
+
+ mkdir -p ${D}/${systemd_unitdir}/system
+ cp ${WORKDIR}/git/src/${GO_IMPORT}/kata-agent.service ${D}/${systemd_unitdir}/system
+}
+
+deltask compile_ptest_base
+
+FILES_${PN} += "${systemd_unitdir}/*" \ No newline at end of file