From f11fc2835151e467633dbb8fd905e2538b1555ab Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Mon, 19 Jul 2021 23:22:53 -0700 Subject: [PATCH] Ports: Add ScummVM game Flight of the Amazon Queen This adds the ScummVM game Flight of the Amazon Queen. Since all files are on the root of the zip file we utilize 'pre_fetch' to create the directory 'workdir'. In 'post_fetch' we move all the files into 'workdir' except for the zip file and 'package.sh'. Doing this lets us use the 'clean' command without any modifications. --- Ports/AvailablePorts.md | 1 + Ports/fotaq/package.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 Ports/fotaq/package.sh diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 976de0d4a08..71152af39aa 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -34,6 +34,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | [`figlet`](figlet/) | FIGlet | 2.2.5 | http://www.figlet.org/ | | [`flatbuffers`](flatbuffers/) | Flatbuffers | 1.12.0 | https://github.com/google/flatbuffers | | [`flex`](flex/) | flex | 2.6.4 | https://github.com/westes/flex | +| [`fotaq`](fotaq/) | Flight of the Amazon Queen | 1.0 | https://www.scummvm.org/games/#games-queen | | [`ffmpeg`](ffmpeg/) | ffmpeg | 4.4 | https://ffmpeg.org | | [`freeciv`](freeciv/) | Freeciv | 3.0.0-beta2 | http://freeciv.org/ | | [`freetype`](freetype/) | FreeType | 2.10.4 | https://www.freetype.org/ | diff --git a/Ports/fotaq/package.sh b/Ports/fotaq/package.sh new file mode 100755 index 00000000000..83edfbea34f --- /dev/null +++ b/Ports/fotaq/package.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port=fotaq +version="1.0" +files="https://downloads.scummvm.org/frs/extras/Flight%20of%20the%20Amazon%20Queen/FOTAQ_Talkie-original.zip ${port}-${version}.zip a298e68243f18a741d4816ef636a5a77a1593816fb2c9e23a09124c35a95dfec" +auth_type=sha256 +depends="scummvm" + +resource_path="/usr/local/share/games/${port}-${version}" + +launcher_name="Flight of the Amazon Queen" +launcher_category=Games +launcher_command="/usr/local/bin/scummvm --path=${resource_path} queen" + +build() { + : +} + +pre_fetch() { + run_nocd mkdir -p ${workdir} +} + +post_fetch() { + run_nocd rsync -a ./* ${workdir} --exclude=${workdir} --exclude=package.sh --exclude=${port}-${version}.zip --remove-source-files + run_nocd find . -depth -type d -empty -delete +} + +install() { + target_dir="${SERENITY_INSTALL_ROOT}${resource_path}" + run_nocd mkdir -p ${target_dir} + run_nocd cp ${workdir}/queen.1 ${target_dir} +}