mirror of
https://github.com/YunoHost-Apps/radarr_ynh.git
synced 2024-09-03 20:16:13 +02:00
Support other arm architectures
This commit is contained in:
parent
e15d9570fd
commit
3749a27cb2
5 changed files with 22 additions and 7 deletions
|
@ -6,7 +6,7 @@
|
|||
"en": "A movie collection manager for Usenet and BitTorrent users.",
|
||||
"fr": "Un gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent."
|
||||
},
|
||||
"version": "3.1.1.4954~ynh1",
|
||||
"version": "3.1.1.4954~ynh2",
|
||||
"url": "https://radarr.video",
|
||||
"upstream": {
|
||||
"license": "GPL-3.0-only",
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
#=================================================
|
||||
|
||||
version="3.1.1.4954"
|
||||
architecture=$(dpkg --print-architecture)
|
||||
if [ $architecture = "amd64" ]; then
|
||||
architecture="x64"
|
||||
fi
|
||||
|
||||
# Supported architectures
|
||||
supported_architectures=("arm" "arm64" "x64")
|
||||
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="curl mediainfo sqlite3"
|
||||
|
@ -17,6 +16,19 @@ pkg_dependencies="curl mediainfo sqlite3"
|
|||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
get_architecture() {
|
||||
architecture=$(dpkg --print-architecture)
|
||||
if [ $architecture = "amd64" ]; then
|
||||
architecture="x64"
|
||||
elif [[ $architecture = arm* ]] && [[ $(getconf LONG_BIT) = 32 ]]; then
|
||||
architecture="arm"
|
||||
elif [[ $architecture = arm* ]] && [[ $(getconf LONG_BIT) = 64 ]]; then
|
||||
architecture="arm64"
|
||||
elif [[ $(echo ${supported_architectures[@]} | grep -ow "$architecture" | wc -w) = 0 ]]; then
|
||||
ynh_die --message="Unsupported architecture $architecture"
|
||||
fi
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -81,6 +81,8 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..." --weight=3
|
||||
|
||||
get_architecture
|
||||
|
||||
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" --source_id="app.$architecture"
|
||||
|
|
|
@ -58,8 +58,7 @@ prepare_source () {
|
|||
echo "$destination updated"
|
||||
}
|
||||
|
||||
architectures=("arm" "arm64" "x64")
|
||||
for architecture in "${architectures[@]}"; do
|
||||
for architecture in "${supported_architectures[@]}"; do
|
||||
prepare_source --template="../conf/app.src.default" --destination="../conf/app.$architecture.src" --architecture="$architecture"
|
||||
done
|
||||
|
||||
|
|
|
@ -83,6 +83,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||
|
||||
get_architecture
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="app.$architecture"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue