21204: Merge branch '21204-stable-log-sort' from arvados-workbench2.git
[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
7 all: centos7/generated
8 centos7/generated: common-generated-all
9         test -d centos7/generated || mkdir centos7/generated
10         cp -f -rlt centos7/generated common-generated/*
11
12 all: debian10/generated
13 debian10/generated: common-generated-all
14         test -d debian10/generated || mkdir debian10/generated
15         cp -f -rlt debian10/generated common-generated/*
16
17 all: debian11/generated
18 debian11/generated: common-generated-all
19         test -d debian11/generated || mkdir debian11/generated
20         cp -f -rlt debian11/generated common-generated/*
21
22 all: debian12/generated
23 debian12/generated: common-generated-all
24         test -d debian12/generated || mkdir debian12/generated
25         cp -f -rlt debian12/generated common-generated/*
26
27 all: rocky8/generated
28 rocky8/generated: common-generated-all
29         test -d rocky8/generated || mkdir rocky8/generated
30         cp -f -rlt rocky8/generated common-generated/*
31
32 all: ubuntu1804/generated
33 ubuntu1804/generated: common-generated-all
34         test -d ubuntu1804/generated || mkdir ubuntu1804/generated
35         cp -f -rlt ubuntu1804/generated common-generated/*
36
37 all: ubuntu2004/generated
38 ubuntu2004/generated: common-generated-all
39         test -d ubuntu2004/generated || mkdir ubuntu2004/generated
40         cp -f -rlt ubuntu2004/generated common-generated/*
41
42 all: ubuntu2204/generated
43 ubuntu2204/generated: common-generated-all
44         test -d ubuntu2204/generated || mkdir ubuntu2204/generated
45         cp -f -rlt ubuntu2204/generated common-generated/*
46
47 GOTARBALL_=DOES_NOT_EXIST
48 NODETARBALL_=DOES_NOT_EXIST
49 GOVERSION=$(shell grep 'const goversion =' ../../lib/install/deps.go |awk -F'"' '{print $$2}')
50 GOTARBALL_x86_64=go$(GOVERSION).linux-amd64.tar.gz
51 NODETARBALL_x86_64=node-v12.22.12-linux-x64.tar.xz
52 GOTARBALL_aarch64=go$(GOVERSION).linux-arm64.tar.gz
53 NODETARBALL_aarch64=node-v12.22.12-linux-arm64.tar.xz
54
55 # Get the bash variable $HOSTTYPE (this requires the SHELL line above)
56 HOSTTYPE=$(shell echo $${HOSTTYPE})
57
58 GOTARBALL=${GOTARBALL_$(HOSTTYPE)}
59 NODETARBALL=${NODETARBALL_$(HOSTTYPE)}
60
61 RVMKEY1=mpapis.asc
62 RVMKEY2=pkuczynski.asc
63
64 common-generated-all: common-generated/$(GOTARBALL) common-generated/$(NODETARBALL) common-generated/$(RVMKEY1) common-generated/$(RVMKEY2)
65
66 common-generated/$(GOTARBALL): common-generated
67         wget -cqO common-generated/$(GOTARBALL) https://dl.google.com/go/$(GOTARBALL)
68
69 common-generated/$(NODETARBALL): common-generated
70         wget -cqO common-generated/$(NODETARBALL) https://nodejs.org/dist/v12.22.12/$(NODETARBALL)
71
72 common-generated/$(RVMKEY1): common-generated
73         wget -cqO common-generated/$(RVMKEY1) https://rvm.io/mpapis.asc
74
75 common-generated/$(RVMKEY2): common-generated
76         wget -cqO common-generated/$(RVMKEY2) https://rvm.io/pkuczynski.asc
77
78 common-generated:
79         mkdir common-generated