From e186f11f08c29ec8d662454539330ddbeb1417d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 May 2024 11:50:17 +0200 Subject: [PATCH 1/4] cleaning --- scripts/install | 12 +----------- scripts/upgrade | 21 ++++----------------- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/scripts/install b/scripts/install index 65fc7af..ad0e1cc 100755 --- a/scripts/install +++ b/scripts/install @@ -24,17 +24,7 @@ chown -R $app:$app "$install_dir" #================================================= ynh_script_progression --message="Building Minetest..." -# Install the game -if [ $game = "capturetheflag" ]; then - # Download Capture The Flag - ynh_setup_source --dest_dir=$install_dir/games/capturetheflag --source_id=capturetheflag -elif [ $game = "mineclonia" ]; then - # Download Mineclonia - ynh_setup_source --dest_dir=$install_dir/games/mineclonia --source_id=mineclonia -else - # Download Minetest Game - ynh_setup_source --dest_dir=$install_dir/games/minetest_game --source_id=minetest_game -fi +ynh_setup_source --dest_dir=$install_dir/games/$game --source_id=$game # Install IrrlichtMt ynh_setup_source --dest_dir=$install_dir/lib/irrlichtmt --source_id=irrlichtmt diff --git a/scripts/upgrade b/scripts/upgrade index f0a3307..313e2f3 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,14 +38,10 @@ fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --full_replace=1 -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -58,16 +54,7 @@ chown -R $app:$app "$install_dir" ynh_script_progression --message="Building Minetest..." # Install the game -if [ $game = "capturetheflag" ]; then - # Download Capture The Flag - ynh_setup_source --dest_dir=$install_dir/games/capturetheflag --source_id=capturetheflag -elif [ $game = "mineclonia" ]; then - # Download Mineclonia - ynh_setup_source --dest_dir=$install_dir/games/mineclonia --source_id=mineclonia -else - # Download Minetest Game - ynh_setup_source --dest_dir=$install_dir/games/minetest_game --source_id=minetest_game -fi +ynh_setup_source --dest_dir=$install_dir/games/$game --source_id=$game # Install IrrlichtMt ynh_setup_source --dest_dir=$install_dir/lib/irrlichtmt --source_id=irrlichtmt From 5f47cfc4cfb4b316eab95aa63a71912e6c976b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 May 2024 11:54:07 +0200 Subject: [PATCH 2/4] Update upgrade --- scripts/upgrade | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 313e2f3..8588770 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= From 6b625eb939291dbb91d4742aa510f6b386248f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 May 2024 11:55:43 +0200 Subject: [PATCH 3/4] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 8588770..e728913 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." -ynh_systemd_action --service_name=$app --action="stop" +ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" #================================================= # ENSURE DOWNWARD COMPATIBILITY From 4e579b1a95e4c57edcd827d210d8072c669f072a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 May 2024 12:29:45 +0200 Subject: [PATCH 4/4] add mineclone2 --- manifest.toml | 6 ++++++ tests.toml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/manifest.toml b/manifest.toml index a9db551..d0fe4d8 100644 --- a/manifest.toml +++ b/manifest.toml @@ -97,6 +97,12 @@ ram.runtime = "50M" autoupdate.upstream = "https://codeberg.org/mineclonia/mineclonia" autoupdate.strategy = "latest_forgejo_release" + [resources.sources.mineclone2] + url = "https://git.minetest.land/VoxeLibre/VoxeLibre/archive/0.86.2.tar.gz" + sha256 = "97536a9e36482363112185ab936532d034163e3dc1ebd3cb365d018fc14b810d" + autoupdate.upstream = "https://git.minetest.land/VoxeLibre/VoxeLibre" + autoupdate.strategy = "latest_forgejo_release" + [resources.system_user] [resources.install_dir] diff --git a/tests.toml b/tests.toml index d2e4846..22d6335 100644 --- a/tests.toml +++ b/tests.toml @@ -33,3 +33,9 @@ test_format = 1.0 only = ["install.root", "backup_restore", "upgrade"] args.game = "mineclonia" + + + ["Test-mineclone2"] + + only = ["install.root", "backup_restore", "upgrade"] + args.game = "mineclone2" \ No newline at end of file