joeylib2/installer/components/emutos.sh

36 lines
1 KiB
Bash

# EmuTOS 1.4 (GPL): a free TOS replacement for the Atari ST emulator, the
# 512 KB US-English image. The gates and joey-run boot it instead of
# Atari's copyrighted TOS.
compDescription="Atari ST firmware: EmuTOS 1.4 (free TOS replacement)"
compGroups="emulator:atarist"
compRequires="host"
compHostDeps="unzip"
compUrl="https://sourceforge.net/projects/emutos/files/emutos/1.4/emutos-512k-1.4.zip/download"
compSha256="1ef7bd25f61bcfc66d19debc2f0ebb0d5e5ba811ccd7f0fddfcb105bb72d1663"
compPin="$compSha256"
imgPath="$JOEY_FIRMWARE/atarist/emutos-512k.img"
compInstall() {
local tmp
tmp="$(freshBuildDir "$compId")"
unzip -oq "$(fetchFile "$compUrl" "$compSha256" emutos-512k-1.4.zip)" 'emutos-512k-1.4/etos512us.img' -d "$tmp"
install -D -m 644 "$tmp/emutos-512k-1.4/etos512us.img" "$imgPath"
dropBuildDir "$compId"
}
compInstalled() {
[ -f "$imgPath" ]
}
compVerify() {
[ "$(sha1sum "$imgPath" | cut -d' ' -f1)" = "7d28ee58f00854954073198983572e6921b87a21" ]
}
compEnv() {
envVar EMUTOS_IMG "$imgPath"
}