Merge branch '20688-wb1-to-wb2-redirects' refs #20688
[arvados.git] / build / package-build-dockerfiles / Makefile
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 SHELL := '/bin/bash'
6 all: centos7/generated debian10/generated debian11/generated rocky8/generated ubuntu1804/generated ubuntu2004/generated
7
8 centos7/generated: common-generated-all
9         test -d centos7/generated || mkdir centos7/generated
10         cp -f -rlt centos7/generated common-generated/*
11
12 debian10/generated: common-generated-all
13         test -d debian10/generated || mkdir debian10/generated
14         cp -f -rlt debian10/generated common-generated/*
15
16 debian11/generated: common-generated-all
17         test -d debian11/generated || mkdir debian11/generated
18         cp -f -rlt debian11/generated common-generated/*
19
20 rocky8/generated: common-generated-all
21         test -d rocky8/generated || mkdir rocky8/generated
22         cp -f -rlt rocky8/generated common-generated/*
23
24 ubuntu1804/generated: common-generated-all
25         test -d ubuntu1804/generated || mkdir ubuntu1804/generated
26         cp -f -rlt ubuntu1804/generated common-generated/*
27
28 ubuntu2004/generated: common-generated-all
29         test -d ubuntu2004/generated || mkdir ubuntu2004/generated
30         cp -f -rlt ubuntu2004/generated common-generated/*
31
32 GOTARBALL_=DOES_NOT_EXIST
33 NODETARBALL_=DOES_NOT_EXIST
34 GOVERSION=$(shell grep 'const goversion =' ../../lib/install/deps.go |awk -F'"' '{print $$2}')
35 GOTARBALL_x86_64=go$(GOVERSION).linux-amd64.tar.gz
36 NODETARBALL_x86_64=node-v10.23.1-linux-x64.tar.xz
37 GOTARBALL_aarch64=go$(GOVERSION).linux-arm64.tar.gz
38 NODETARBALL_aarch64=node-v10.23.1-linux-arm64.tar.xz
39
40 # Get the bash variable $HOSTTYPE (this requires the SHELL line above)
41 HOSTTYPE=$(shell echo $${HOSTTYPE})
42
43 GOTARBALL=${GOTARBALL_$(HOSTTYPE)}
44 NODETARBALL=${NODETARBALL_$(HOSTTYPE)}
45
46 RVMKEY1=mpapis.asc
47 RVMKEY2=pkuczynski.asc
48
49 common-generated-all: common-generated/$(GOTARBALL) common-generated/$(NODETARBALL) common-generated/$(RVMKEY1) common-generated/$(RVMKEY2)
50
51 common-generated/$(GOTARBALL): common-generated
52         wget -cqO common-generated/$(GOTARBALL) https://dl.google.com/go/$(GOTARBALL)
53
54 common-generated/$(NODETARBALL): common-generated
55         wget -cqO common-generated/$(NODETARBALL) https://nodejs.org/dist/v10.23.1/$(NODETARBALL)
56
57 common-generated/$(RVMKEY1): common-generated
58         wget -cqO common-generated/$(RVMKEY1) https://rvm.io/mpapis.asc
59
60 common-generated/$(RVMKEY2): common-generated
61         wget -cqO common-generated/$(RVMKEY2) https://rvm.io/pkuczynski.asc
62
63 common-generated:
64         mkdir common-generated