From ed2ff72f7c30009efdc822c34e66b1af09bb9331 Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jackpot51@gmail.com> Date: Wed, 13 Dec 2023 15:54:09 -0700 Subject: [PATCH] freedoom: convert to toml --- recipes/games/freedoom/recipe.sh | 41 ------------------------------ recipes/games/freedoom/recipe.toml | 33 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 41 deletions(-) delete mode 100644 recipes/games/freedoom/recipe.sh create mode 100644 recipes/games/freedoom/recipe.toml diff --git a/recipes/games/freedoom/recipe.sh b/recipes/games/freedoom/recipe.sh deleted file mode 100644 index 6ff61e46c..000000000 --- a/recipes/games/freedoom/recipe.sh +++ /dev/null @@ -1,41 +0,0 @@ -GIT=https://gitlab.redox-os.org/redox-os/freedoom.git -DEPENDS=(ion prboom) - -function recipe_version { - echo "0.11.3" - skip=1 -} - -function recipe_build { - echo "skipping build" - skip=1 -} - -function recipe_clean { - echo "skipping clean" - skip=1 -} - -function recipe_stage { - mkdir -pv "$1/games" "$1/share/games/doom" "$1/ui/apps" "$1/ui/icons/apps" - for file in ./*.wad - do - game="$(basename "$file" .wad)" - - wad="/share/games/doom/$game.wad" - cp -v "$file" "$1$wad" - - bin="/games/$game" - echo "#!/bin/ion" > "$1$bin" - echo "/games/prboom -geom 800x600 -vidmode 32 -iwad $wad" >> "$1$bin" - chmod +x "$1$bin" - - echo "name=$game" | sed 's/freedoom/FreeDOOM: Phase /' | sed 's/doom1/DOOM (Shareware)/' > "$1/ui/apps/$game" - echo "category=Games" >> "$1/ui/apps/$game" - echo "binary=/games/$game" >> "$1/ui/apps/$game" - echo "icon=/ui/icons/apps/$game.png" >> "$1/ui/apps/$game" - - cp -v "$game.png" "$1/ui/icons/apps/$game.png" - done - skip=1 -} diff --git a/recipes/games/freedoom/recipe.toml b/recipes/games/freedoom/recipe.toml new file mode 100644 index 000000000..3a4be6ed4 --- /dev/null +++ b/recipes/games/freedoom/recipe.toml @@ -0,0 +1,33 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/freedoom.git" + +[build] +template = "custom" +script = """ +mkdir -pv "${COOKBOOK_STAGE}/games" "${COOKBOOK_STAGE}/share/games/doom" "${COOKBOOK_STAGE}/ui/apps" "${COOKBOOK_STAGE}/ui/icons/apps" +for file in "${COOKBOOK_SOURCE}/"*.wad +do + game="$(basename "$file" .wad)" + + wad="/share/games/doom/$game.wad" + cp -v "$file" "${COOKBOOK_STAGE}$wad" + + bin="/games/$game" + echo "#!/bin/ion" > "${COOKBOOK_STAGE}$bin" + echo "/games/prboom -geom 800x600 -vidmode 32 -iwad $wad" >> "${COOKBOOK_STAGE}$bin" + chmod +x "${COOKBOOK_STAGE}$bin" + + echo "name=$game" | sed 's/freedoom/FreeDOOM: Phase /' | sed 's/doom1/DOOM (Shareware)/' > "${COOKBOOK_STAGE}/ui/apps/$game" + echo "category=Games" >> "${COOKBOOK_STAGE}/ui/apps/$game" + echo "binary=/games/$game" >> "${COOKBOOK_STAGE}/ui/apps/$game" + echo "icon=/ui/icons/apps/$game.png" >> "${COOKBOOK_STAGE}/ui/apps/$game" + + cp -v "${COOKBOOK_SOURCE}/$game.png" "${COOKBOOK_STAGE}/ui/icons/apps/$game.png" +done +""" + +[package] +dependencies = [ + "ion", + "prboom", +] -- GitLab