python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / docker-engine / docker-engine.mk
blob7f7840b7f6e4e18c44f60c0f15b2e163ce9aaecb
1 ################################################################################
3 # docker-engine
5 ################################################################################
7 DOCKER_ENGINE_VERSION = v17.03.0-ce
8 DOCKER_ENGINE_COMMIT = 60ccb2265b0574d6c1c1090876a1d1ab32bed60e
9 DOCKER_ENGINE_SITE = $(call github,docker,docker,$(DOCKER_ENGINE_VERSION))
11 DOCKER_ENGINE_LICENSE = Apache-2.0
12 DOCKER_ENGINE_LICENSE_FILES = LICENSE
14 DOCKER_ENGINE_DEPENDENCIES = host-go host-pkgconf
16 DOCKER_ENGINE_GOPATH = "$(@D)/vendor"
17 DOCKER_ENGINE_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
18 CGO_ENABLED=1 \
19 CGO_NO_EMULATION=1 \
20 GOBIN="$(@D)/bin" \
21 GOPATH="$(DOCKER_ENGINE_GOPATH)" \
22 PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
23 $(TARGET_MAKE_ENV)
25 DOCKER_ENGINE_GLDFLAGS = \
26 -X main.GitCommit=$(DOCKER_ENGINE_VERSION) \
27 -X main.Version=$(DOCKER_ENGINE_VERSION)
29 ifeq ($(BR2_STATIC_LIBS),y)
30 DOCKER_ENGINE_GLDFLAGS += -extldflags '-static'
31 endif
33 DOCKER_ENGINE_BUILD_TAGS = cgo exclude_graphdriver_zfs autogen
34 DOCKER_ENGINE_BUILD_TARGETS = docker
36 ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
37 DOCKER_ENGINE_BUILD_TAGS += seccomp
38 DOCKER_ENGINE_DEPENDENCIES += libseccomp
39 endif
41 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y)
42 DOCKER_ENGINE_BUILD_TAGS += daemon
43 DOCKER_ENGINE_BUILD_TARGETS += dockerd
44 endif
46 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL),y)
47 DOCKER_ENGINE_BUILD_TAGS += experimental
48 endif
50 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
51 DOCKER_ENGINE_DEPENDENCIES += btrfs-progs
52 else
53 DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_btrfs
54 endif
56 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y)
57 DOCKER_ENGINE_DEPENDENCIES += lvm2
58 else
59 DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_devicemapper
60 endif
62 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS),y)
63 DOCKER_ENGINE_DEPENDENCIES += gvfs
64 else
65 DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_vfs
66 endif
68 define DOCKER_ENGINE_CONFIGURE_CMDS
69 mkdir -p $(DOCKER_ENGINE_GOPATH)/src/github.com/docker
70 ln -fs $(@D) $(DOCKER_ENGINE_GOPATH)/src/github.com/docker/docker
71 cd $(@D) && \
72 GITCOMMIT="$$(echo $(DOCKER_ENGINE_COMMIT) | head -c7)" \
73 BUILDTIME="$$(date)" \
74 VERSION="$(patsubst v%,%,$(DOCKER_ENGINE_VERSION))" \
75 PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" $(TARGET_MAKE_ENV) \
76 bash ./hack/make/.go-autogen
77 endef
79 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y)
81 define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
82 $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \
83 $(TARGET_DIR)/usr/lib/systemd/system/docker.service
84 $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.socket \
85 $(TARGET_DIR)/usr/lib/systemd/system/docker.socket
86 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
87 ln -fs ../../../../usr/lib/systemd/system/docker.service \
88 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/docker.service
89 endef
91 define DOCKER_ENGINE_USERS
92 - - docker -1 * - - - Docker Application Container Framework
93 endef
95 endif
97 define DOCKER_ENGINE_BUILD_CMDS
98 $(foreach target,$(DOCKER_ENGINE_BUILD_TARGETS), \
99 cd $(@D); $(DOCKER_ENGINE_MAKE_ENV) \
100 $(HOST_DIR)/usr/bin/go build -v \
101 -o $(@D)/bin/$(target) \
102 -tags "$(DOCKER_ENGINE_BUILD_TAGS)" \
103 -ldflags "$(DOCKER_ENGINE_GLDFLAGS)" \
104 github.com/docker/docker/cmd/$(target)
106 endef
108 define DOCKER_ENGINE_INSTALL_TARGET_CMDS
109 $(foreach target,$(DOCKER_ENGINE_BUILD_TARGETS), \
110 $(INSTALL) -D -m 0755 $(@D)/bin/$(target) $(TARGET_DIR)/usr/bin/$(target)
112 endef
114 $(eval $(generic-package))