1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/navidrome_ynh.git synced 2024-09-03 19:46:30 +02:00

Arch support (#4)

* Bring support to arm64, armv5, armv6, armv7 and i386 binary installs
This commit is contained in:
Éric Gaspar 2020-08-17 12:18:11 +02:00 committed by GitHub
parent 5be01342bb
commit 3a90243be3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 70 additions and 8 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View file

@ -23,7 +23,7 @@ Navidrome is an open source web-based music collection server and streamer. It g
## Configuration ## Configuration
You can configure Navidrome by editing this file `/var/lib/navidrome/navidrome.toml` using the [documentation](https://www.navidrome.org/docs/usage/configuration-options/) You can configure Navidrome by editing this file `/var/lib/navidrome/navidrome.toml` using the [documentation](https://www.navidrome.org/docs/usage/configuration-options/);
The music is to be stored in the folder `/home/yunohost.navidrome/Music`. The music is to be stored in the folder `/home/yunohost.navidrome/Music`.
@ -47,6 +47,7 @@ The music is to be stored in the folder `/home/yunohost.navidrome/Music`.
## Links ## Links
* Report a bug: https://github.com/YunoHost-Apps/navidrome_ynh/issues * Report a bug: https://github.com/YunoHost-Apps/navidrome_ynh/issues
* App website: https://www.navidrome.org/
* Upstream app repository: https://github.com/deluan/navidrome/ * Upstream app repository: https://github.com/deluan/navidrome/
* YunoHost website: https://yunohost.org/ * YunoHost website: https://yunohost.org/

View file

@ -23,7 +23,7 @@ Navidrome est un serveur et un streamer de collection de musique en ligne open s
## Configuration ## Configuration
Vous pouvez configurer Navidrome en modifiant le fichier `/var/lib/navidrome/navidrome.toml` et en vous aidant de la [documentation](https://www.navidrome.org/docs/usage/configuration-options/) Vous pouvez configurer Navidrome en modifiant le fichier `/var/lib/navidrome/navidrome.toml` et en vous aidant de la [documentation](https://www.navidrome.org/docs/usage/configuration-options/).
La musique est à stocker dans le dossier `/home/yunohost.navidrome/Music`. La musique est à stocker dans le dossier `/home/yunohost.navidrome/Music`.
@ -47,6 +47,7 @@ La musique est à stocker dans le dossier `/home/yunohost.navidrome/Music`.
## Liens ## Liens
* Signaler un bug : https://github.com/YunoHost-Apps/navidrome_ynh/issues * Signaler un bug : https://github.com/YunoHost-Apps/navidrome_ynh/issues
* Site de l'application : https://www.navidrome.org/
* Dépôt de l'application principale : https://github.com/deluan/navidrome/ * Dépôt de l'application principale : https://github.com/deluan/navidrome/
* Site web YunoHost : https://yunohost.org/ * Site web YunoHost : https://yunohost.org/

BIN
conf/.DS_Store vendored Normal file

Binary file not shown.

6
conf/arm64.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.30.1/navidrome_0.30.1_Linux_arm64.tar.gz
SOURCE_SUM=ab788c6fd3f907e4a392978ea81f0d36546b3914ac3c7c83721e03ea2827c5ce
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=

6
conf/armv5.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.30.1/navidrome_0.30.1_Linux_armv5.tar.gz
SOURCE_SUM=17ca329f806d35aef2adf67f1d58800105d25fe455a8fbb1380f714a5c7a843f
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=

6
conf/armv6.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.30.1/navidrome_0.30.1_Linux_armv6.tar.gz
SOURCE_SUM=b9787f83be29cbb0bb5e1b17fb05b9490eccabf056c7a94f2790da16a44dbdb5
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=

6
conf/armv7.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.30.1/navidrome_0.30.1_Linux_armv7.tar.gz
SOURCE_SUM=222900948d5b0ef30604eb6a1126467f72c5dcb96b54c548d7c595cd2d38edd8
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=

6
conf/i386.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.30.1/navidrome_0.30.1_Linux_i386.tar.gz
SOURCE_SUM=45972ab2c3254d724286060179c8bf77807feac7c612aa8107b0d56c89c7f518
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=

View file

@ -1,7 +1,7 @@
LogLevel = "INFO" LogLevel = "INFO"
Address = "127.0.0.1" Address = "127.0.0.1"
Port = "__PORT__" Port = "__PORT__"
BaseURL = "/__APP__" BaseURL = "__PATH_URL__"
ScanInterval = "90s" ScanInterval = "90s"
TranscodingCacheSize = "150MiB" TranscodingCacheSize = "150MiB"
MusicFolder = "/home/yunohost.__APP__/Music" MusicFolder = "/home/yunohost.navidrome/Music"

View file

@ -19,6 +19,34 @@ pkg_dependencies="ffmpeg"
# FUTURE OFFICIAL HELPERS # FUTURE OFFICIAL HELPERS
#================================================= #=================================================
# Check the architecture
#
# example: architecture=$(ynh_detect_arch)
#
# usage: ynh_detect_arch
#
# Requires YunoHost version 2.2.4 or higher.
ynh_detect_arch(){
local architecture
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep 86)" ]; then
architecture="i386"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep armv7)" ]; then
architecture="armv7"
elif [ -n "$(uname -m | grep armv6)" ]; then
architecture="armv6"
elif [ -n "$(uname -m | grep armv5)" ]; then
architecture="armv5"
else
architecture="unknown"
fi
echo $architecture
}
# Install or update the main directory yunohost.multimedia # Install or update the main directory yunohost.multimedia
# #

View file

@ -26,6 +26,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC is_public=$YNH_APP_ARG_IS_PUBLIC
architecture=$(ynh_detect_arch)
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -83,7 +84,7 @@ ynh_script_progression --message="Setting up source files..." --weight=4
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir=$final_path ynh_setup_source --dest_dir=$final_path --source_id="$architecture"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -117,7 +118,7 @@ cp ../conf/navidrome.toml "$config_path/navidrome.toml"
# Main config File # Main config File
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/navidrome.toml" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/navidrome.toml"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$config_path/navidrome.toml" ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$config_path/navidrome.toml"
ynh_store_file_checksum --file="$config_path/navidrome.toml" ynh_store_file_checksum --file="$config_path/navidrome.toml"

View file

@ -21,6 +21,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public) is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port) port=$(ynh_app_setting_get --app=$app --key=port)
architecture=$(ynh_detect_arch)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
@ -64,7 +65,7 @@ then
ynh_secure_remove --file=$final_path ynh_secure_remove --file=$final_path
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir=$final_path ynh_setup_source --dest_dir=$final_path --source_id="$architecture"
fi fi
#================================================= #=================================================
@ -114,7 +115,7 @@ cp ../conf/navidrome.toml "$config_path/navidrome.toml"
# Main config File # Main config File
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/navidrome.toml" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/navidrome.toml"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$config_path/navidrome.toml" ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$config_path/navidrome.toml"
ynh_store_file_checksum --file="$config_path/navidrome.toml" ynh_store_file_checksum --file="$config_path/navidrome.toml"