mirror of
https://github.com/a2-4am/4sports.git
synced 2025-04-07 03:37:12 +00:00
attempt reproducible build
This commit is contained in:
parent
df2f3b6d10
commit
b352db49ca
9
Makefile
9
Makefile
@ -12,6 +12,7 @@
|
||||
|
||||
DISK=4sports.hdv
|
||||
VOLUME=INSTANT.REPLAY
|
||||
SHELL := /bin/bash
|
||||
|
||||
# third-party tools required to build
|
||||
|
||||
@ -107,6 +108,8 @@ FINDER.ROOT=res/Finder.Root
|
||||
HELP=res/HELP
|
||||
JOYSTICK=res/JOYSTICK
|
||||
TITLE=res/TITLE
|
||||
SOURCE_DATE := $(shell git log -1 --format=%cD | bin/rfc2822_to_touch.py)
|
||||
export SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct)
|
||||
|
||||
.PHONY: compress attract cache clean mount all al
|
||||
|
||||
@ -114,15 +117,21 @@ TITLE=res/TITLE
|
||||
$(HDV): $(PROBOOTHD) $(LAUNCHER.SYSTEM) $(PRELAUNCH) $(X) $(TOTAL.DATA) $(TITLE.ANIMATED.SOURCES) $(ICONS) $(FINDER.DATA) $(FINDER.ROOT) $(PREFS.CONF)
|
||||
cp res/blank.hdv "$@"
|
||||
cp res/_FileInformation.txt "$(BUILDDIR)"/
|
||||
touch -d"$(SOURCE_DATE)" "$(LAUNCHER.SYSTEM)"
|
||||
$(CADIUS) ADDFILE "$@" "/$(VOLUME)/" "$(LAUNCHER.SYSTEM)" -C >> "$(CADIUS.LOG)"
|
||||
for f in "$(TOTAL.DATA)" "$(PREFS.CONF)" "$(FINDER.DATA)" "$(FINDER.ROOT)"; do \
|
||||
touch -d"$(SOURCE_DATE)" "$$f"; \
|
||||
$(CADIUS) ADDFILE "$@" "/$(VOLUME)/" "$$f" -C >> "$(CADIUS.LOG)"; \
|
||||
done
|
||||
cp src/prelaunch/_FileInformation.txt "$(PRELAUNCH)"/
|
||||
for f in "$(PRELAUNCH)"/*; do \
|
||||
touch -d"$(SOURCE_DATE)" "$$f"; \
|
||||
done
|
||||
for f in res/TITLE.ANIMATED "$(ICONS.SOURCE.DIR)" "$(PRELAUNCH)" "$(X)"; do \
|
||||
rm -f "$$f"/.DS_Store; \
|
||||
$(CADIUS) ADDFOLDER "$@" "/$(VOLUME)/$$(basename $$f)" "$$f" -C >> "$(CADIUS.LOG)"; \
|
||||
done
|
||||
[[ $$(grep -c "Error(s) : [^0]" "$(CADIUS.LOG)") == 0 ]] || exit 1
|
||||
bin/changebootloader.sh "$@" $(PROBOOTHD)
|
||||
@touch "$@"
|
||||
|
||||
|
8
bin/rfc2822_to_touch.py
Executable file
8
bin/rfc2822_to_touch.py
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from email.utils import parsedate_to_datetime
|
||||
from datetime import UTC
|
||||
from sys import stdin, stdout
|
||||
|
||||
d = parsedate_to_datetime(stdin.readline())
|
||||
stdout.write(d.astimezone(UTC).strftime("%Y-%m-%dT%H:%M:%SZ\n"))
|
Loading…
x
Reference in New Issue
Block a user