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'
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
41 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON
),y
)
42 DOCKER_ENGINE_BUILD_TAGS
+= daemon
43 DOCKER_ENGINE_BUILD_TARGETS
+= dockerd
46 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL
),y
)
47 DOCKER_ENGINE_BUILD_TAGS
+= experimental
50 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS
),y
)
51 DOCKER_ENGINE_DEPENDENCIES
+= btrfs-progs
53 DOCKER_ENGINE_BUILD_TAGS
+= exclude_graphdriver_btrfs
56 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER
),y
)
57 DOCKER_ENGINE_DEPENDENCIES
+= lvm2
59 DOCKER_ENGINE_BUILD_TAGS
+= exclude_graphdriver_devicemapper
62 ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS
),y
)
63 DOCKER_ENGINE_DEPENDENCIES
+= gvfs
65 DOCKER_ENGINE_BUILD_TAGS
+= exclude_graphdriver_vfs
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
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
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
91 define DOCKER_ENGINE_USERS
92 - - docker
-1 * - - - Docker Application Container Framework
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
)
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
)
114 $(eval
$(generic-package
))