diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index b87e755..a8336e0 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -55,19 +55,16 @@ echo "Handling asset at $asset_url" # Leave $src empty to ignore the asset case $asset_url in *"arm64.tgz"*) - src="app.arm64" - ;; - *"armel.tgz"*) - src="app.armel" + src="arm64" ;; *"armhf.tgz"*) - src="app.armhf" + src="armhf" ;; *"x86_64.tgz"*) - src="app.x86_64" + src="amd64" ;; *"x86.tgz"*) - src="app.x86" + src="i386" ;; *) src="" @@ -130,4 +127,4 @@ echo "$(jq -s --indent 4 ".[] | .upstream.version = \"$version\"" manifest.json) # The Action will proceed only if the PROCEED environment variable is set to true echo "PROCEED=true" >> $GITHUB_ENV -exit 0 \ No newline at end of file +exit 0 diff --git a/conf/app.x86_64.src b/conf/amd64.src similarity index 85% rename from conf/app.x86_64.src rename to conf/amd64.src index c55fd1c..43b34fe 100644 --- a/conf/app.x86_64.src +++ b/conf/amd64.src @@ -2,4 +2,5 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases SOURCE_SUM=1b009c7deb737641e173a0a82c0b105d8e33a4392de661562e156e4434a4ed17 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tgz -SOURCE_EXTRACT=false +SOURCE_EXTRACT=true +SOURCE_IN_SUBDIR=true diff --git a/conf/app.armel.src b/conf/app.armel.src deleted file mode 100644 index 841c778..0000000 --- a/conf/app.armel.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases/download/13.2.0/UMS-13.2.0-armel.tgz -SOURCE_SUM=622c1845996472137cd4a47898433ee995802edd6df3d7768f16336d79316452 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tgz -SOURCE_EXTRACT=false diff --git a/conf/app.arm64.src b/conf/arm64.src similarity index 84% rename from conf/app.arm64.src rename to conf/arm64.src index ac570d8..acbac5f 100644 --- a/conf/app.arm64.src +++ b/conf/arm64.src @@ -2,4 +2,5 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases SOURCE_SUM=f2b05cec5fa6e51b9b5e1884b1ecdb99ca4e11bc0793a5cbea66c0f5c7e03a1a SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tgz -SOURCE_EXTRACT=false +SOURCE_EXTRACT=true +SOURCE_IN_SUBDIR=true diff --git a/conf/app.armhf.src b/conf/armhf.src similarity index 84% rename from conf/app.armhf.src rename to conf/armhf.src index e207017..2b45f90 100644 --- a/conf/app.armhf.src +++ b/conf/armhf.src @@ -2,4 +2,5 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases SOURCE_SUM=5e478d40336600517a6f765c49c45bb81c627b76113b571d3ae09e9457429b3e SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tgz -SOURCE_EXTRACT=false +SOURCE_EXTRACT=true +SOURCE_IN_SUBDIR=true diff --git a/conf/app.x86.src b/conf/i386.src similarity index 84% rename from conf/app.x86.src rename to conf/i386.src index 44d24fa..428cfa1 100644 --- a/conf/app.x86.src +++ b/conf/i386.src @@ -2,4 +2,5 @@ SOURCE_URL=https://github.com/UniversalMediaServer/UniversalMediaServer/releases SOURCE_SUM=91a5c534664441064c772dcace5bcef02edac82d8d3c67155ddd803deabeb52c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tgz -SOURCE_EXTRACT=false +SOURCE_EXTRACT=true +SOURCE_IN_SUBDIR=true diff --git a/scripts/_common.sh b/scripts/_common.sh index 1b69d9d..f0e81ac 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,23 +6,3 @@ # dependencies used by the app pkg_dependencies="mediainfo dcraw p7zip" - -mach=`uname -m` - -case "$mach" in - "armv6l" ) mach="armel" - #for some reason, jre is not in the tarball - pkg_dependencies="$pkg_dependencies openjdk-17-jre" ;; - "armv7l" ) if [ $(dpkg --print-architecture) = "armhf" ]; then - mach="armhf" - else - mach="armel" - fi - pkg_dependencies="$pkg_dependencies openjdk-17-jre";; - "armv8l" ) mach="arm64" - pkg_dependencies="$pkg_dependencies openjdk-17-jre" ;; - "aarch64" ) mach="arm64" - pkg_dependencies="$pkg_dependencies openjdk-17-jre" ;; - "x86_64" ) mach="x86_64" ;; - * ) mach="x86" ;; -esac diff --git a/scripts/install b/scripts/install index 86ba412..ecf9788 100755 --- a/scripts/install +++ b/scripts/install @@ -101,16 +101,9 @@ ynh_multimedia_addaccess $app #================================================= ynh_script_progression --message="Setting up source files..." --weight=12 -# Download, check integrity, uncompress and patch the source from app.src -# Create an app.src for the correct compiled version of UMS -# match string are fulfilled in _common.sh -ynh_add_config --template="../conf/app.$mach.src" --destination="../conf/app.src" - ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" -tar xfvz $final_path/app.tgz --strip-component=1 --directory=$final_path/ -rm $final_path/app.tgz +ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH" chmod 750 "$final_path" chmod -R o-rwx "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index 43bbe47..8fa0aa3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,12 +87,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=5 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_add_config --template="../conf/app.$mach.src" --destination="../conf/app.src" - ynh_setup_source --dest_dir="$final_path" - tar xfvz $final_path/app.tgz --strip-component=1 --directory=$final_path/ - ynh_secure_remove $final_path/app.tgz + ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH" fi #=================================================