summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/etcd/etcd_3.5.7.bb54
1 files changed, 54 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb b/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb
new file mode 100644
index 0000000000..0635da942b
--- /dev/null
+++ b/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb
@@ -0,0 +1,54 @@
1DESCRIPTION = "etcd is a distributed key-value store for distributed systems"
2HOMEPAGE = "https://etcd.io/"
3
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${S}/${GO_INSTALL}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
6
7SRC_URI = "git://github.com/etcd-io/etcd;branch=release-3.5;protocol=https"
8SRCREV = "215b53cf3b48ee761f4c40908b3874b2e5e95e9f"
9UPSTREAM_CHECK_COMMITS = "1"
10
11GO_IMPORT = "go.etcd.io/etcd/v3"
12GO_INSTALL = "src/${GO_IMPORT}/"
13
14RDEPENDS:${PN}-dev = " \
15 bash \
16"
17
18export GO111MODULE="on"
19
20inherit go
21
22# Go based binaries do not handle being stripped
23INHIBIT_PACKAGE_STRIP = "1"
24INHIBIT_SYSROOT_STRIP = "1"
25
26# network is required by go to get dependent packages
27do_compile[network] = "1"
28
29# Need to build etcd out of where it is extracted to
30# Need to directly call build script vs. "make build"
31# because "make build" executes the generated binaries
32# at the end of the build which do not run correctly
33# when cross compiling for another machine
34go_do_compile:prepend() {
35 cd ${GO_INSTALL}
36 ./build.sh
37
38 # Lots of discussion in go community about how it sets packages to
39 # read-only by default -> https://github.com/golang/go/issues/31481
40 # etcd is going to need some upstream work to support it.
41 # For now, set the packages which are read-only back to
42 # writeable so things like "bitbake -c cleanall etcd" will work.
43 chmod u+w -R ${S}/src/github.com/myitcv/gobin
44 chmod u+w -R ${WORKDIR}/build/pkg/mod
45
46}
47
48do_install:append() {
49 install -d ${D}${bindir}/
50 install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcd ${D}${bindir}
51 install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcdctl ${D}${bindir}
52 install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcdutl ${D}${bindir}
53}
54