-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (30 loc) · 1.5 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
TAG ?= v2.31.2
BUILD_DATE := "$(shell date -u +%FT%TZ)"
PAK_NAME := $(shell jq -r .label config.json)
PLATFORMS := tg5040 rg35xxplus
MINUI_LIST_VERSION := 0.4.0
clean:
rm -f bin/filebrowser || true
rm -f bin/minui-list-* || true
rm -f bin/sdl2imgshow || true
rm -f res/fonts/BPreplayBold.otf || true
build: $(foreach platform,$(PLATFORMS),bin/minui-list-$(platform)) bin/filebrowser bin/sdl2imgshow res/fonts/BPreplayBold.otf
bin/filebrowser:
curl -sL https://github.com/filebrowser/filebrowser/releases/download/$(TAG)/linux-arm64-filebrowser.tar.gz | tar -xz -C bin
bin/minui-list-%:
curl -f -o bin/minui-list-$* -sSL https://github.com/josegonzalez/minui-list/releases/download/$(MINUI_LIST_VERSION)/minui-list-$*
chmod +x bin/minui-list-$*
bin/sdl2imgshow:
docker buildx build --platform linux/arm64 --load -f Dockerfile.sdl2imgshow --progress plain -t app/sdl2imgshow:$(TAG) .
docker container create --name extract app/sdl2imgshow:$(TAG)
docker container cp extract:/go/src/github.com/kloptops/sdl2imgshow/build/sdl2imgshow bin/sdl2imgshow
docker container rm extract
chmod +x bin/sdl2imgshow
res/fonts/BPreplayBold.otf:
mkdir -p res/fonts
curl -sSL -o res/fonts/BPreplayBold.otf "https://raw.githubusercontent.com/shauninman/MinUI/refs/heads/main/skeleton/SYSTEM/res/BPreplayBold-unhinted.otf"
release: build
mkdir -p dist
git archive --format=zip --output "dist/$(PAK_NAME).pak.zip" HEAD
while IFS= read -r file; do zip -r "dist/$(PAK_NAME).pak.zip" "$$file"; done < .gitarchiveinclude
ls -lah dist