1 ################################################################################
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
) \
21 GOPATH
="$(DOCKER_ENGINE_GOPATH)" \
22 PKG_CONFIG
="$(PKG_CONFIG_HOST_BINARY)" \
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'
32 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT
),y
)
33 DOCKER_ENGINE_GLDFLAGS_DOCKER
+= -extldflags
'-static'
38 DOCKER_ENGINE_BUILD_TAGS
= cgo exclude_graphdriver_zfs autogen
39 DOCKER_ENGINE_BUILD_TARGETS
= docker
41 ifeq ($(BR2_PACKAGE_LIBSECCOMP
),y
)
42 DOCKER_ENGINE_BUILD_TAGS
+= seccomp
43 DOCKER_ENGINE_DEPENDENCIES
+= libseccomp
46 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON
),y
)
47 DOCKER_ENGINE_BUILD_TAGS
+= daemon
48 DOCKER_ENGINE_BUILD_TARGETS
+= dockerd
51 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL
),y
)
52 DOCKER_ENGINE_BUILD_TAGS
+= experimental
55 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS
),y
)
56 DOCKER_ENGINE_DEPENDENCIES
+= btrfs-progs
58 DOCKER_ENGINE_BUILD_TAGS
+= exclude_graphdriver_btrfs
61 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER
),y
)
62 DOCKER_ENGINE_DEPENDENCIES
+= lvm2
64 DOCKER_ENGINE_BUILD_TAGS
+= exclude_graphdriver_devicemapper
67 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS
),y
)
68 DOCKER_ENGINE_DEPENDENCIES
+= gvfs
70 DOCKER_ENGINE_BUILD_TAGS
+= exclude_graphdriver_vfs
73 define DOCKER_ENGINE_CONFIGURE_CMDS
74 mkdir
-p
$(DOCKER_ENGINE_GOPATH
)/src
/github.com
/docker
75 ln
-fs
$(@D
) $(DOCKER_ENGINE_GOPATH
)/src
/github.com
/docker
/docker
77 GITCOMMIT
="$$(echo $(DOCKER_ENGINE_COMMIT) | head -c7)" \
78 BUILDTIME
="$$(date)" \
79 VERSION
="$(patsubst v%,%,$(DOCKER_ENGINE_VERSION))" \
80 PKG_CONFIG
="$(PKG_CONFIG_HOST_BINARY)" $(TARGET_MAKE_ENV
) \
81 bash .
/hack
/make
/.go-autogen
84 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON
),y
)
86 define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
87 $(INSTALL
) -D
-m
0644 $(@D
)/contrib
/init
/systemd
/docker.service \
88 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/docker.service
89 $(INSTALL
) -D
-m
0644 $(@D
)/contrib
/init
/systemd
/docker.socket \
90 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/docker.socket
91 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/
92 ln
-fs ..
/..
/..
/..
/usr
/lib
/systemd
/system
/docker.service \
93 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/docker.service
96 define DOCKER_ENGINE_USERS
97 - - docker
-1 * - - - Docker Application Container Framework
102 define DOCKER_ENGINE_BUILD_CMDS
103 $(foreach target
,$(DOCKER_ENGINE_BUILD_TARGETS
), \
104 cd
$(@D
); $(DOCKER_ENGINE_MAKE_ENV
) \
105 $(HOST_DIR
)/usr
/bin
/go build
-v \
106 -o
$(@D
)/bin
/$(target
) \
107 -tags "$(DOCKER_ENGINE_BUILD_TAGS)" \
108 -ldflags "$(DOCKER_ENGINE_GLDFLAGS) $(DOCKER_ENGINE_GLDFLAGS_$(call UPPERCASE,$(target)))" \
109 github.com
/docker
/docker
/cmd
/$(target
)
113 define DOCKER_ENGINE_INSTALL_TARGET_CMDS
114 $(foreach target
,$(DOCKER_ENGINE_BUILD_TARGETS
), \
115 $(INSTALL
) -D
-m
0755 $(@D
)/bin
/$(target
) $(TARGET_DIR
)/usr
/bin
/$(target
)
119 $(eval
$(generic-package
))