iptables: bump to version 1.6.1
[buildroot-gz.git] / package / docker-engine / docker-engine.mk
blobd575662dde87cc627d47720076a6150169fab744
1 ################################################################################
3 # docker-engine
5 ################################################################################
7 DOCKER_ENGINE_VERSION = v1.12.6
8 DOCKER_ENGINE_COMMIT = 78d18021ecba00c00730dec9d56de6896f9e708d
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 ln -fs $(@D) $(DOCKER_ENGINE_GOPATH)/src/github.com/docker/docker
70 cd $(@D) && \
71 GITCOMMIT="$$(echo $(DOCKER_ENGINE_COMMIT) | head -c7)" \
72 BUILDTIME="$$(date)" \
73 VERSION="$(patsubst v%,%,$(DOCKER_ENGINE_VERSION))" \
74 PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" $(TARGET_MAKE_ENV) \
75 bash ./hack/make/.go-autogen
76 endef
78 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y)
80 define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
81 $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \
82 $(TARGET_DIR)/usr/lib/systemd/system/docker.service
83 $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.socket \
84 $(TARGET_DIR)/usr/lib/systemd/system/docker.socket
85 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
86 ln -fs ../../../../usr/lib/systemd/system/docker.service \
87 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/docker.service
88 endef
90 define DOCKER_ENGINE_USERS
91 - - docker -1 * - - - Docker Application Container Framework
92 endef
94 endif
96 define DOCKER_ENGINE_BUILD_CMDS
97 $(foreach target,$(DOCKER_ENGINE_BUILD_TARGETS), \
98 cd $(@D); $(DOCKER_ENGINE_MAKE_ENV) \
99 $(HOST_DIR)/usr/bin/go build -v \
100 -o $(@D)/bin/$(target) \
101 -tags "$(DOCKER_ENGINE_BUILD_TAGS)" \
102 -ldflags "$(DOCKER_ENGINE_GLDFLAGS)" \
103 ./cmd/$(target)
105 endef
107 define DOCKER_ENGINE_INSTALL_TARGET_CMDS
108 $(foreach target,$(DOCKER_ENGINE_BUILD_TARGETS), \
109 $(INSTALL) -D -m 0755 $(@D)/bin/$(target) $(TARGET_DIR)/usr/bin/$(target)
111 endef
113 $(eval $(generic-package))