aboutsummaryrefslogtreecommitdiff
path: root/package/docker-containerd
diff options
context:
space:
mode:
authorGravatar Angelo Compagnucci <angelo@amarulasolutions.com>2018-03-31 15:27:34 +0200
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2018-03-31 19:57:31 +0200
commit2dccb4f2fefd8a0dbda65dd0f7537f811e920b13 (patch)
treef6d44b77a9e488033f1b27767fe1ebb6843e37f0 /package/docker-containerd
parent30063d57d35c61cddff3047e7f55c221cf1d2709 (diff)
downloadbuildroot-2dccb4f2fefd8a0dbda65dd0f7537f811e920b13.tar.gz
buildroot-2dccb4f2fefd8a0dbda65dd0f7537f811e920b13.tar.bz2
package/docker-containerd: convert to golang infrastructure
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'package/docker-containerd')
-rw-r--r--package/docker-containerd/docker-containerd.mk33
1 files changed, 8 insertions, 25 deletions
diff --git a/package/docker-containerd/docker-containerd.mk b/package/docker-containerd/docker-containerd.mk
index 8f0822b77f..88e27b5ed4 100644
--- a/package/docker-containerd/docker-containerd.mk
+++ b/package/docker-containerd/docker-containerd.mk
@@ -9,37 +9,20 @@ DOCKER_CONTAINERD_SITE = $(call github,docker,containerd,$(DOCKER_CONTAINERD_VER
DOCKER_CONTAINERD_LICENSE = Apache-2.0
DOCKER_CONTAINERD_LICENSE_FILES = LICENSE.code
-DOCKER_CONTAINERD_DEPENDENCIES = host-go
+DOCKER_CONTAINERD_WORKSPACE = vendor
-DOCKER_CONTAINERD_GOPATH = "$(@D)/vendor"
-DOCKER_CONTAINERD_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
- CGO_ENABLED=1 \
- GOBIN="$(@D)/bin" \
- GOPATH="$(DOCKER_CONTAINERD_GOPATH)"
-
-DOCKER_CONTAINERD_GLDFLAGS = \
+DOCKER_CONTAINERD_LDFLAGS = \
-X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION)
-ifeq ($(BR2_STATIC_LIBS),y)
-DOCKER_CONTAINERD_GLDFLAGS += -extldflags '-static'
-endif
+DOCKER_CONTAINERD_BUILD_TARGETS = ctr containerd containerd-shim
-define DOCKER_CONTAINERD_CONFIGURE_CMDS
- mkdir -p $(DOCKER_CONTAINERD_GOPATH)/src/github.com/docker
- ln -s $(@D) $(DOCKER_CONTAINERD_GOPATH)/src/github.com/docker/containerd
-endef
+DOCKER_CONTAINERD_INSTALL_BINS = containerd containerd-shim
-define DOCKER_CONTAINERD_BUILD_CMDS
- $(foreach d,ctr containerd containerd-shim,\
- cd $(@D); $(DOCKER_CONTAINERD_MAKE_ENV) $(HOST_DIR)/bin/go build \
- -v -o $(@D)/bin/$(d) -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" ./$(d)$(sep))
-endef
-
-define DOCKER_CONTAINERD_INSTALL_TARGET_CMDS
+define DOCKER_CONTAINERD_INSTALL_SYMLINKS
ln -fs runc $(TARGET_DIR)/usr/bin/docker-runc
- $(INSTALL) -D -m 0755 $(@D)/bin/containerd $(TARGET_DIR)/usr/bin/docker-containerd
- $(INSTALL) -D -m 0755 $(@D)/bin/containerd-shim $(TARGET_DIR)/usr/bin/containerd-shim
ln -fs containerd-shim $(TARGET_DIR)/usr/bin/docker-containerd-shim
endef
-$(eval $(generic-package))
+DOCKER_CONTAINERD_POST_INSTALL_TARGET_HOOKS += DOCKER_CONTAINERD_INSTALL_SYMLINKS
+
+$(eval $(golang-package))