[meta-lts-mixins][dunfell/go PATCH 4/4] go-helloworld: add from openembedded-core master


Alexander Kanavin
 

This allows a quick smoke test for whether go toolchain produces
working executables.

Link: https://git.yoctoproject.org/poky/tree/meta/recipes-extended/go-examples?id=278cb0fc0725fbfdcafd3b3afcfb7c7c6a4eee14

(copy from external source:
git: https://git.yoctoproject.org/poky/
archive: 278cb0fc0725fbfdcafd3b3afcfb7c7c6a4eee14
copy: meta/recipes-extended/go-examples --> recipes-devtools/go-examples/)

Acked-by: Martin Kaistra <martin.kaistra@...>
Signed-off-by: Alexander Kanavin <alex@...>
---
.../go-examples/go-helloworld_0.1.bb | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 recipes-devtools/go-examples/go-helloworld_0.1.bb

diff --git a/recipes-devtools/go-examples/go-helloworld_0.1.bb b/recipes-devtools/go-examples/go-helloworld_0.1.bb
new file mode 100644
index 0000000..b3a8631
--- /dev/null
+++ b/recipes-devtools/go-examples/go-helloworld_0.1.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "This is a simple example recipe that cross-compiles a Go program."
+SECTION = "examples"
+HOMEPAGE = "https://golang.org/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "git://go.googlesource.com/example;branch=master;protocol=https"
+SRCREV = "787a929d5a0dfb8bbfcdd2c4a62e0fd89466113f"
+UPSTREAM_CHECK_COMMITS = "1"
+
+GO_IMPORT = "golang.org/x/example"
+GO_INSTALL = "${GO_IMPORT}/hello"
+GO_WORKDIR = "${GO_INSTALL}"
+export GO111MODULE="off"
+
+inherit go
+
+# This is just to make clear where this example is
+do_install:append() {
+ mv ${D}${bindir}/hello ${D}${bindir}/${BPN}
+}
--
2.20.1

Join yocto@lists.yoctoproject.org to automatically receive all group messages.