From: Alexander Kanavin <[email protected]>

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 <[email protected]>
Signed-off-by: Alexander Kanavin <[email protected]>
Signed-off-by: Jose Quaresma <[email protected]>
---
 .../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.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#59572): https://lists.yoctoproject.org/g/yocto/message/59572
Mute This Topic: https://lists.yoctoproject.org/mt/97976942/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to