diff options
Diffstat (limited to 'recipes-containers/docker/docker_git.bb')
-rw-r--r-- | recipes-containers/docker/docker_git.bb | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb index 1ced8f47..4d6c17c9 100644 --- a/recipes-containers/docker/docker_git.bb +++ b/recipes-containers/docker/docker_git.bb | |||
@@ -32,7 +32,9 @@ SRC_URI = "\ | |||
32 | 32 | ||
33 | # Apache-2.0 for docker | 33 | # Apache-2.0 for docker |
34 | LICENSE = "Apache-2.0" | 34 | LICENSE = "Apache-2.0" |
35 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9740d093a080530b5c5c6573df9af45a" | 35 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=9740d093a080530b5c5c6573df9af45a" |
36 | |||
37 | GO_IMPORT = "import" | ||
36 | 38 | ||
37 | S = "${WORKDIR}/git" | 39 | S = "${WORKDIR}/git" |
38 | 40 | ||
@@ -81,18 +83,17 @@ do_compile() { | |||
81 | # Set GOPATH. See 'PACKAGERS.md'. Don't rely on | 83 | # Set GOPATH. See 'PACKAGERS.md'. Don't rely on |
82 | # docker to download its dependencies but rather | 84 | # docker to download its dependencies but rather |
83 | # use dependencies packaged independently. | 85 | # use dependencies packaged independently. |
84 | cd ${S} | 86 | cd ${S}/src/import |
85 | rm -rf .gopath | 87 | rm -rf .gopath |
86 | mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" | 88 | mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" |
87 | ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" | 89 | ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" |
88 | 90 | ||
89 | mkdir -p .gopath/src/github.com/docker | 91 | mkdir -p .gopath/src/github.com/docker |
90 | ln -sf ../../../../../libnetwork .gopath/src/github.com/docker/libnetwork | 92 | ln -sf ${WORKDIR}/libnetwork .gopath/src/github.com/docker/libnetwork |
91 | ln -sf ../../../../../cli .gopath/src/github.com/docker/cli | 93 | ln -sf ${WORKDIR}/cli .gopath/src/github.com/docker/cli |
92 | 94 | ||
93 | export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" | 95 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" |
94 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" | 96 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" |
95 | cd - | ||
96 | 97 | ||
97 | # Pass the needed cflags/ldflags so that cgo | 98 | # Pass the needed cflags/ldflags so that cgo |
98 | # can find the needed headers files and libraries | 99 | # can find the needed headers files and libraries |
@@ -109,10 +110,10 @@ do_compile() { | |||
109 | ./hack/make.sh dynbinary | 110 | ./hack/make.sh dynbinary |
110 | 111 | ||
111 | # build the proxy | 112 | # build the proxy |
112 | go build -o ${S}/docker-proxy github.com/docker/libnetwork/cmd/proxy | 113 | go build -o ${S}/src/import/docker-proxy github.com/docker/libnetwork/cmd/proxy |
113 | 114 | ||
114 | # build the cli | 115 | # build the cli |
115 | go build -o ${S}/bundles/latest/dynbinary-client/docker github.com/docker/cli/cmd/docker | 116 | go build -o ${S}/src/import/bundles/latest/dynbinary-client/docker github.com/docker/cli/cmd/docker |
116 | } | 117 | } |
117 | 118 | ||
118 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" | 119 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" |
@@ -126,15 +127,15 @@ INITSCRIPT_PARAMS_${PN} = "defaults" | |||
126 | 127 | ||
127 | do_install() { | 128 | do_install() { |
128 | mkdir -p ${D}/${bindir} | 129 | mkdir -p ${D}/${bindir} |
129 | cp ${S}/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker | 130 | cp ${S}/src/import/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker |
130 | cp ${S}/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd | 131 | cp ${S}/src/import/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd |
131 | cp ${S}/docker-proxy ${D}/${bindir}/docker-proxy | 132 | cp ${S}/src/import/docker-proxy ${D}/${bindir}/docker-proxy |
132 | 133 | ||
133 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 134 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
134 | install -d ${D}${systemd_unitdir}/system | 135 | install -d ${D}${systemd_unitdir}/system |
135 | install -m 644 ${S}/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system | 136 | install -m 644 ${S}/src/import/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system |
136 | # replaces one copied from above with one that uses the local registry for a mirror | 137 | # replaces one copied from above with one that uses the local registry for a mirror |
137 | install -m 644 ${S}/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system | 138 | install -m 644 ${S}/src/import/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system |
138 | else | 139 | else |
139 | install -d ${D}${sysconfdir}/init.d | 140 | install -d ${D}${sysconfdir}/init.d |
140 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init | 141 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init |
@@ -142,7 +143,7 @@ do_install() { | |||
142 | 143 | ||
143 | mkdir -p ${D}${datadir}/docker/ | 144 | mkdir -p ${D}${datadir}/docker/ |
144 | cp ${WORKDIR}/hi.Dockerfile ${D}${datadir}/docker/ | 145 | cp ${WORKDIR}/hi.Dockerfile ${D}${datadir}/docker/ |
145 | install -m 0755 ${S}/contrib/check-config.sh ${D}${datadir}/docker/ | 146 | install -m 0755 ${S}/src/import/contrib/check-config.sh ${D}${datadir}/docker/ |
146 | } | 147 | } |
147 | 148 | ||
148 | inherit useradd | 149 | inherit useradd |