|
| 1 | +################################################################################ |
| 2 | +# |
| 3 | +# containerd |
| 4 | +# |
| 5 | +################################################################################ |
| 6 | +CONTAINERD_BIN_VERSION = v1.1.3 |
| 7 | +CONTAINERD_BIN_SITE = https://github.com/containerd/containerd/archive |
| 8 | +CONTAINERD_BIN_SOURCE = $(CONTAINERD_BIN_VERSION).tar.gz |
| 9 | +CONTAINERD_BIN_DEPENDENCIES = host-go libgpgme |
| 10 | +CONTAINERD_BIN_GOPATH = $(@D)/_output |
| 11 | +CONTAINERD_BIN_ENV = \ |
| 12 | + CGO_ENABLED=1 \ |
| 13 | + GOPATH="$(CONTAINERD_BIN_GOPATH)" \ |
| 14 | + GOBIN="$(CONTAINERD_BIN_GOPATH)/bin" \ |
| 15 | + PATH=$(CONTAINERD_BIN_GOPATH)/bin:$(BR_PATH) |
| 16 | + |
| 17 | +CONTAINERD_BIN_COMPILE_SRC = $(CONTAINERD_BIN_GOPATH)/src/github.com/containerd/containerd |
| 18 | + |
| 19 | +define CONTAINERD_BIN_USERS |
| 20 | + - -1 containerd-admin -1 - - - - - |
| 21 | + - -1 containerd -1 - - - - - |
| 22 | +endef |
| 23 | + |
| 24 | +define CONTAINERD_BIN_CONFIGURE_CMDS |
| 25 | + mkdir -p $(CONTAINERD_BIN_GOPATH)/src/github.com/containerd |
| 26 | + ln -sf $(@D) $(CONTAINERD_BIN_COMPILE_SRC) |
| 27 | +endef |
| 28 | + |
| 29 | +define CONTAINERD_BIN_BUILD_CMDS |
| 30 | + PWD=$(CONTAINERD_BIN_COMPILE_SRC) $(CONTAINERD_BIN_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) binaries |
| 31 | +endef |
| 32 | + |
| 33 | +define CONTAINERD_BIN_INSTALL_TARGET_CMDS |
| 34 | + $(INSTALL) -Dm755 \ |
| 35 | + $(@D)/bin/containerd \ |
| 36 | + $(TARGET_DIR)/usr/bin |
| 37 | + $(INSTALL) -Dm755 \ |
| 38 | + $(@D)/bin/containerd-shim \ |
| 39 | + $(TARGET_DIR)/usr/bin |
| 40 | + $(INSTALL) -Dm755 \ |
| 41 | + $(@D)/bin/ctr \ |
| 42 | + $(TARGET_DIR)/usr/bin |
| 43 | + $(INSTALL) -Dm644 \ |
| 44 | + $(BR2_EXTERNAL_MINIKUBE_PATH)/package/containerd-bin/config.toml \ |
| 45 | + $(TARGET_DIR)/etc/containerd/config.toml |
| 46 | +endef |
| 47 | + |
| 48 | +define CONTAINERD_BIN_INSTALL_INIT_SYSTEMD |
| 49 | + $(INSTALL) -Dm755 \ |
| 50 | + $(BR2_EXTERNAL_MINIKUBE_PATH)/package/containerd-bin/containerd.service \ |
| 51 | + $(TARGET_DIR)/usr/lib/systemd/system/containerd.service |
| 52 | + $(call link-service,containerd.service) |
| 53 | + $(call link-service,containerd-shutdown.service) |
| 54 | +endef |
| 55 | + |
| 56 | +$(eval $(generic-package)) |
0 commit comments