1 ################################################################################
5 ################################################################################
7 DOCKER_CONTAINERD_VERSION
= 0ac3cd1be170d180b2baed755e8f0da547ceb267
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
) \
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'
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
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
))
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
47 $(eval
$(generic-package
))