summaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker-compose/docker-compose_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/docker-compose/docker-compose_git.bb')
-rw-r--r--recipes-containers/docker-compose/docker-compose_git.bb81
1 files changed, 81 insertions, 0 deletions
diff --git a/recipes-containers/docker-compose/docker-compose_git.bb b/recipes-containers/docker-compose/docker-compose_git.bb
new file mode 100644
index 00000000..abc5b0ea
--- /dev/null
+++ b/recipes-containers/docker-compose/docker-compose_git.bb
@@ -0,0 +1,81 @@
1HOMEPAGE = "https://github.com/docker/compose"
2SUMMARY = "Multi-container orchestration for Docker"
3DESCRIPTION = "Docker compose v2"
4
5DEPENDS = " \
6 go-md2man \
7 rsync-native \
8"
9
10# Specify the first two important SRCREVs as the format
11SRCREV_FORMAT="compose_survey"
12SRCREV_compose = "b15df818c759b355b03ed70505ffa451301eb566"
13
14SRC_URI = "git://github.com/docker/compose;name=compose;branch=v2;protocol=https"
15
16include src_uri.inc
17
18# patches and config
19SRC_URI += "file://modules.txt"
20
21SRC_URI[sha256sum] = "d7b05a9bff34dfb25abe7e5b1e54cf2607f953d91cb33fb231a4775a1a4afa3d"
22
23LICENSE = "Apache-2.0"
24LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=175792518e4ac015ab6696d16c4f607e"
25
26GO_IMPORT = "import"
27
28PV = "v2.11.2"
29
30COMPOSE_PKG = "github.com/docker/compose/v2"
31
32inherit go goarch
33inherit pkgconfig
34
35do_configure[noexec] = "1"
36
37PACKAGECONFIG ?= ""
38
39include relocation.inc
40
41do_compile() {
42 cd ${S}/src/import
43
44 export GOPATH="$GOPATH:${S}/src/import/.gopath"
45
46 # Pass the needed cflags/ldflags so that cgo
47 # can find the needed headers files and libraries
48 export GOARCH=${TARGET_GOARCH}
49 export CGO_ENABLED="1"
50 export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
51 export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
52
53 export GOFLAGS="-mod=vendor -trimpath"
54
55 # our copied .go files are to be used for the build
56 ln -sf vendor.copy vendor
57 # inform go that we know what we are doing
58 cp ${WORKDIR}/modules.txt vendor/
59
60 GO_LDFLAGS="-s -w -X internal.Version=${PV} -X ${COMPOSE_PKG}/internal.Version=${PV}"
61 GO_BUILDTAGS=""
62 mkdir -p ./bin
63 ${GO} build $GOFLAGS -tags "$GO_BUILDTAGS" -ldflags "$GO_LDFLAGS" -o ./bin/docker-compose ./cmd
64}
65
66do_install() {
67 #install -d "${D}${BIN_PREFIX}/bin"
68 #install -m 755 "${S}/src/import/bin/docker-compose" "${D}${BIN_PREFIX}/bin"
69
70 # commonly installed to: /usr/lib/docker/cli-plugins/
71 install -d "${D}${libdir}/docker/cli-plugins/"
72 install -m 755 "${S}/src/import/bin/docker-compose" "${D}${libdir}/docker/cli-plugins/"
73
74}
75
76RDEPENDS:${PN} += " docker"
77
78FILES:${PN} += " ${libdir}/docker/cli-plugins/"
79
80INHIBIT_PACKAGE_STRIP = "1"
81INSANE_SKIP:${PN} += "ldflags already-stripped"