summaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker
diff options
context:
space:
mode:
authorAmy Fong <amy.fong@windriver.com>2015-10-06 14:41:14 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-10-13 11:29:57 -0400
commitc861012e9c6babbefc60bb3b031f96559f99844a (patch)
tree4cdc153155a14506af67ca8ff9d55dd1700c7a7c /recipes-containers/docker
parentd0ef47396d1ea7c67b27898f6d0401cbcef45281 (diff)
downloadmeta-virtualization-c861012e9c6babbefc60bb3b031f96559f99844a.tar.gz
docker: fix paths for cross compile
Some of the cgo variables were pointing to host paths and not target Fix install rules - binaries can be installed to a subdirectory. Signed-off-by: Amy Fong <amy.fong@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/docker')
-rw-r--r--recipes-containers/docker/docker_git.bb12
1 files changed, 9 insertions, 3 deletions
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index 69c45ae3..080e5743 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -84,10 +84,12 @@ do_compile() {
84 export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" 84 export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
85 cd - 85 cd -
86 86
87 export CGO_ENABLED="1"
88
87 # Pass the needed cflags/ldflags so that cgo 89 # Pass the needed cflags/ldflags so that cgo
88 # can find the needed headers files and libraries 90 # can find the needed headers files and libraries
89 export CGO_CFLAGS="${BUILD_CFLAGS}" 91 export CGO_CFLAGS="${BUILDSDK_CFLAGS}"
90 export CGO_LDFLAGS="${BUILD_LDFLAGS}" 92 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS}"
91 93
92 # this is the unsupported built structure 94 # this is the unsupported built structure
93 # that doesn't rely on an existing docker 95 # that doesn't rely on an existing docker
@@ -125,7 +127,11 @@ do_install() {
125 install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init 127 install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init
126 fi 128 fi
127 129
128 cp ${S}/vendor/bin/nsinit ${D}/${bindir} 130 if [ -d ${S}/vendor/bin/linux_* ]; then
131 cp ${S}/vendor/bin/linux_*/* ${D}/${bindir}
132 else
133 cp ${S}/vendor/bin/* ${D}/${bindir}
134 fi
129 135
130 mkdir -p ${D}/usr/share/docker/ 136 mkdir -p ${D}/usr/share/docker/
131 cp ${WORKDIR}/hi.Dockerfile ${D}/usr/share/docker/ 137 cp ${WORKDIR}/hi.Dockerfile ${D}/usr/share/docker/