1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/UMS_ynh.git synced 2024-10-01 13:35:01 +02:00

Fix ynh_setup_source unecessarily complex because not using IN_SUBDIR=true ...

This commit is contained in:
Alexandre Aubin 2023-03-13 20:41:20 +01:00
parent 25f557eb5b
commit 2f1d38e0c4
9 changed files with 15 additions and 51 deletions

View file

@ -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
exit 0

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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
#=================================================