python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / docker-containerd / docker-containerd.mk
blob21b0999bed747cb051b6dae35d8e872cc0eb3978
1 ################################################################################
3 # docker-containerd
5 ################################################################################
7 DOCKER_CONTAINERD_VERSION = 977c511eda0925a723debdc94d09459af49d082a
8 DOCKER_CONTAINERD_SITE = $(call github,docker,containerd,$(DOCKER_CONTAINERD_VERSION))
9 DOCKER_CONTAINERD_LICENSE = Apache-2.0
10 DOCKER_CONTAINERD_LICENSE_FILES = LICENSE.code
12 DOCKER_CONTAINERD_DEPENDENCIES = host-go
14 DOCKER_CONTAINERD_GOPATH = "$(@D)/vendor"
15 DOCKER_CONTAINERD_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
16 CGO_ENABLED=1 \
17 GOBIN="$(@D)/bin" \
18 GOPATH="$(DOCKER_CONTAINERD_GOPATH)"
20 DOCKER_CONTAINERD_GLDFLAGS = \
21 -X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION)
23 ifeq ($(BR2_STATIC_LIBS),y)
24 DOCKER_CONTAINERD_GLDFLAGS += -extldflags '-static'
25 endif
27 define DOCKER_CONTAINERD_CONFIGURE_CMDS
28 mkdir -p $(DOCKER_CONTAINERD_GOPATH)/src/github.com/docker
29 ln -s $(@D) $(DOCKER_CONTAINERD_GOPATH)/src/github.com/docker/containerd
30 mkdir -p $(DOCKER_CONTAINERD_GOPATH)/src/github.com/opencontainers
31 ln -s $(RUNC_SRCDIR) $(DOCKER_CONTAINERD_GOPATH)/src/github.com/opencontainers/runc
32 endef
34 define DOCKER_CONTAINERD_BUILD_CMDS
35 $(foreach d,ctr containerd containerd-shim,\
36 cd $(@D); $(DOCKER_CONTAINERD_MAKE_ENV) $(HOST_DIR)/usr/bin/go build \
37 -v -o $(@D)/bin/$(d) -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" ./$(d)$(sep))
38 endef
40 define DOCKER_CONTAINERD_INSTALL_TARGET_CMDS
41 ln -fs runc $(TARGET_DIR)/usr/bin/docker-runc
42 $(INSTALL) -D -m 0755 $(@D)/bin/containerd $(TARGET_DIR)/usr/bin/docker-containerd
43 $(INSTALL) -D -m 0755 $(@D)/bin/containerd-shim $(TARGET_DIR)/usr/bin/containerd-shim
44 ln -fs containerd-shim $(TARGET_DIR)/usr/bin/docker-containerd-shim
45 endef
47 $(eval $(generic-package))