-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (31 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
GITHASH := 89658be
VERSION := 17.05.0-ce
ARCHIVE := docker-$(VERSION).tgz
HASH := docker-$(VERSION).hash
BINARIES := docker/bundles/$(VERSION)/binary-client/docker \
docker/bundles/$(VERSION)/binary-daemon/docker-containerd \
docker/bundles/$(VERSION)/binary-daemon/docker-containerd-ctr \
docker/bundles/$(VERSION)/binary-daemon/docker-containerd-shim \
docker/bundles/$(VERSION)/binary-daemon/docker-init \
docker/bundles/$(VERSION)/binary-daemon/docker-proxy \
docker/bundles/$(VERSION)/binary-daemon/docker-runc \
docker/bundles/$(VERSION)/binary-daemon/dockerd
all: $(ARCHIVE) $(HASH)
$(HASH): $(ARCHIVE)
echo -n "sha256 " > $@
sha256sum $(ARCHIVE) >> $@
$(ARCHIVE): $(BINARIES)
sudo rm -rf docker/bundles/$(VERSION)/docker
sudo mkdir -p docker/bundles/$(VERSION)/docker
sudo cp $^ docker/bundles/$(VERSION)/docker/
tar zcvf docker-$(VERSION).tgz -C docker/bundles/$(VERSION)/ docker
$(BINARIES): | docker
cd docker && git fetch && git checkout $(GITHASH)
$(MAKE) -C docker binary
docker:
git clone https://github.com/docker/docker.git
clean:
$(RM) $(ARCHIVE) $(HASH) $(BINARIES)
distclean: clean
$(RM) -r docker
.PHONY: all clean distclean