-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
64 lines (56 loc) · 2.68 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.PHONY: all clean download-amd64 podman-launcher-amd64 download-arm64 podman-launcher-arm64
all: clean download-amd64 podman-launcher-amd64 download-arm64 podman-launcher-arm64
CRUN_VERSION="1.14.4"
PODMAN_VERSION="4.9.3"
PODMAN_LAUNCHER_VERSION="0.0.5"
clean:
@rm -f podman-launcher-*
@rm -rf assets-*
@rm -f assets*.tar.gz
launcher: podman-launcher-arm64 podman-launcher-amd64
podman-launcher-amd64:
@rm -f podman-launcher-amd64
@cp assets-amd64.tar.gz assets.tar.gz
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w -X 'main.version=$${RELEASE_VERSION:-$(PODMAN_LAUNCHER_VERSION)}'" -o podman-launcher-amd64 main.go
sha256sum podman-launcher-amd64 > podman-launcher-amd64.sha256
podman-launcher-arm64:
@rm -f podman-launcher-arm64
@cp assets-arm64.tar.gz assets.tar.gz
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w -X 'main.version=$${RELEASE_VERSION:-$(PODMAN_LAUNCHER_VERSION)}'" -o podman-launcher-arm64 main.go
sha256sum podman-launcher-arm64 > podman-launcher-arm64.sha256
download-arm64:
rm -rf assets-arm64
rm -f assets-arm64.tar.gz
mkdir -p assets-arm64
curl -L \
"https://github.com/containers/crun/releases/download/$(CRUN_VERSION)/crun-$(CRUN_VERSION)-linux-arm64" \
-o "./assets-arm64/crun"
chmod +x assets-arm64/crun
curl -L \
"https://github.com/mgoltzsche/podman-static/releases/download/v$(PODMAN_VERSION)/podman-linux-arm64.tar.gz" \
-o ./assets-arm64/podman-linux-arm64.tar.gz
tar xvf ./assets-arm64/podman-linux-arm64.tar.gz -C assets-arm64
mv assets-arm64/podman-linux-arm64/usr/local/bin/ assets-arm64/bin
mv assets-arm64/podman-linux-arm64/usr/local/lib/ assets-arm64/lib
mv assets-arm64/podman-linux-arm64/etc/ assets-arm64/etc
mv assets-arm64/crun assets-arm64/bin/
rm -rf assets-arm64/podman-linux-arm64 assets-arm64/podman-linux-arm64.tar.gz
tar czfv assets-arm64.tar.gz -C assets-arm64 .
download-amd64:
rm -rf assets-amd64
rm -f assets-amd64.tar.gz
mkdir -p assets-amd64
curl -L \
"https://github.com/containers/crun/releases/download/$(CRUN_VERSION)/crun-$(CRUN_VERSION)-linux-amd64" \
-o "./assets-amd64/crun"
chmod +x assets-amd64/crun
curl -L \
"https://github.com/mgoltzsche/podman-static/releases/download/v$(PODMAN_VERSION)/podman-linux-amd64.tar.gz" \
-o ./assets-amd64/podman-linux-amd64.tar.gz
tar xvf ./assets-amd64/podman-linux-amd64.tar.gz -C assets-amd64
mv assets-amd64/podman-linux-amd64/usr/local/bin/ assets-amd64/bin
mv assets-amd64/podman-linux-amd64/usr/local/lib/ assets-amd64/lib
mv assets-amd64/podman-linux-amd64/etc/ assets-amd64/etc
mv assets-amd64/crun assets-amd64/bin/
rm -rf assets-amd64/podman-linux-amd64 assets-amd64/podman-linux-amd64.tar.gz
tar czfv assets-amd64.tar.gz -C assets-amd64 .