mirror of
https://github.com/YunoHost-Apps/mopidy_ynh.git
synced 2024-09-03 19:46:21 +02:00
commit
6938356765
9 changed files with 38 additions and 64 deletions
19
README.md
19
README.md
|
@ -1,7 +1,7 @@
|
|||
# Mopidy for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/mopidy)  
|
||||
[](https://install-app.yunohost.org/?app=mopidy)
|
||||
[](https://install-app.yunohost.org/?app=mopidy)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
|
@ -9,8 +9,7 @@
|
|||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||
|
||||
## Overview
|
||||
Mopidy - is an extensible music server.
|
||||
It plays music, podcasts and radio programs from local disk and various streaming services. You edit the playlist from any phone, tablet, or computer.
|
||||
Mopidy - is an extensible music server. It plays music, podcasts and radio programs from local disk and various streaming services. You edit the playlist from any phone, tablet, or computer.
|
||||
|
||||
**Shipped version:** 3.1.1
|
||||
|
||||
|
@ -42,13 +41,13 @@ This installation is shipped with various extensions:
|
|||
|
||||
#### Multi-user support
|
||||
|
||||
Are LDAP and HTTP auth supported? No \
|
||||
Can the app be used by multiple users? ??
|
||||
* Are LDAP and HTTP auth supported? **No**
|
||||
* Can the app be used by multiple users? ??
|
||||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/mopidy/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/mopidy/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/)
|
||||
|
||||
## Limitations
|
||||
|
||||
|
@ -57,12 +56,9 @@ Can the app be used by multiple users? ??
|
|||
## Additional information
|
||||
|
||||
* To list current settings enter `sudo mopidyctl config`.
|
||||
* Edit the file `/opt/yunohost/mopidy/mopidy.conf` to adjust mopidy's configuration.
|
||||
* Edit the file `/opt/yunohost/mopidy/mopidy.conf` to adjust Mopidy's configuration.
|
||||
* To rebuild the database of your local music collection enter `sudo mopidyctl local scan`.
|
||||
|
||||
**More info on the documentation page:**
|
||||
https://yunohost.org/packaging_apps
|
||||
|
||||
## Links
|
||||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/mopidy_ynh/issues
|
||||
|
@ -73,7 +69,6 @@ https://yunohost.org/packaging_apps
|
|||
|
||||
## Developer info
|
||||
|
||||
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
|
||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mopidy_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
|
|
18
README_fr.md
18
README_fr.md
|
@ -1,7 +1,7 @@
|
|||
# Mopidy pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/mopidy)  
|
||||
[](https://install-app.yunohost.org/?app=mopidy)
|
||||
[](https://install-app.yunohost.org/?app=mopidy)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
|
@ -9,8 +9,7 @@
|
|||
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
|
||||
|
||||
## Vue d'ensemble
|
||||
Mopidy - est un serveur de musique extensible.
|
||||
Mopidy lit de la musique, des podcasts et des programmes de radio à partir d'un disque local et de divers services de streaming.
|
||||
Mopidy - est un serveur de musique extensible. Mopidy lit de la musique, des podcasts et des programmes de radio à partir d'un disque local et de divers services de streaming.
|
||||
Vous pouvez modifier la liste de lecture à partir d'un téléphone, d'une tablette ou d'un ordinateur.
|
||||
|
||||
**Version incluse :** 3.1.1
|
||||
|
@ -40,17 +39,18 @@ Cette installation est livrée avec différentes extensions:
|
|||
## Documentation
|
||||
|
||||
* Documentation officielle : https://docs.mopidy.com/en/latest/
|
||||
|
||||
## Caractéristiques spécifiques YunoHost
|
||||
|
||||
#### Support multi-utilisateur
|
||||
|
||||
* L'authentification LDAP et HTTP est-elle prise en charge ? Non
|
||||
* L'authentification LDAP et HTTP est-elle prise en charge ? **Non**
|
||||
* L'application peut-elle être utilisée par plusieurs utilisateurs ?
|
||||
|
||||
#### Architectures supportées
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/mopidy/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/mopidy/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/)
|
||||
|
||||
## Limitations
|
||||
|
||||
|
@ -59,12 +59,9 @@ Cette installation est livrée avec différentes extensions:
|
|||
## Informations additionnelles
|
||||
|
||||
* Pour lister les paramètres actuels, entrez `sudo mopidyctl config`
|
||||
* Modifiez le fichier /opt/yunohost/mopidy/mopidy.conf pour ajuster la configuration de mopidy
|
||||
* Modifiez le fichier `/opt/yunohost/mopidy/mopidy.conf` pour ajuster la configuration de mopidy
|
||||
* Pour reconstruire la base de données de votre collection de musique locale, entrez `sudo mopidyctl local scan`
|
||||
|
||||
**Plus d'informations sur la page de documentation :**
|
||||
https://yunohost.org/packaging_apps
|
||||
|
||||
## Liens
|
||||
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/mopidy_ynh/issues
|
||||
|
@ -75,7 +72,6 @@ https://yunohost.org/packaging_apps
|
|||
|
||||
## Informations pour les développeurs
|
||||
|
||||
**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.**
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mopidy_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
setup_root=1
|
||||
setup_nourl=1
|
||||
setup_private=0
|
||||
setup_nourl=0
|
||||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
# upgrade=1 from_commit=CommitHash
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"email": "cyp@rouquin.me"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.0.8"
|
||||
"yunohost": ">= 4.1.7"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
@ -28,29 +28,21 @@
|
|||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain name for Mopidy"
|
||||
},
|
||||
"example": "example.com"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Choose a path for Mopidy"
|
||||
},
|
||||
"example": "/example",
|
||||
"default": "/mopidy"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Is it a public application?"
|
||||
"help": {
|
||||
"en": "Public app can be used by anonymous visitors",
|
||||
"fr": "L'application publique peut être utilisée par des visiteurs anonymes "
|
||||
},
|
||||
"help": {
|
||||
"en": "public app can be used by anonymous visitors"
|
||||
},
|
||||
"default": false
|
||||
}
|
||||
]
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
# dependencies used by the app
|
||||
pkg_dependencies="build-essential python3-dev python3-pip python3-venv git postgresql postgresql-contrib \
|
||||
pkg_dependencies="acl build-essential python3-dev python3-pip python3-venv git postgresql postgresql-contrib \
|
||||
gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly lsb-base \
|
||||
python3-gst-1.0 python3-tornado (>= 4.4) debconf python3-pkg-resources python3-pykka python3-requests \
|
||||
gstreamer1.0-alsa gstreamer1.0-pulseaudio gstreamer1.0-tools"
|
||||
|
@ -33,13 +33,13 @@ myynh_install() {
|
|||
$final_path/env/bin/python3 -m pip install vext
|
||||
$final_path/env/bin/python3 -m pip install --no-binary=:all: vext.gi
|
||||
|
||||
# install essential packages
|
||||
ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy==3.1.1
|
||||
# install essential packages
|
||||
ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy==3.1.1
|
||||
|
||||
# patch -u $final_path/env/lib/python$python_version/site-packages/mopidy/__main__.py -i ../sources/patches/__main__.patch --forward
|
||||
|
||||
|
||||
ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy-local==3.2.1
|
||||
ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy-local==3.2.1
|
||||
ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy-MusicBox-Webclient==3.1.0
|
||||
# ynh_script_progression --message="Installing Mopidy-YouTube..." --weight=7
|
||||
ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy-YouTube==3.2
|
||||
|
|
|
@ -105,8 +105,8 @@ then
|
|||
ynh_permission_url --permission="main" --add_url="$new_domain/mopidy/ws" --remove_url="$old_domain/mopidy/ws"
|
||||
ynh_permission_url --permission="main" --add_url="$new_domain/local" --remove_url="$old_domain/local"
|
||||
ynh_permission_url --permission="main" --add_url="$new_domain/musicbox_webclient" --remove_url="$old_domain/musicbox_webclient"
|
||||
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
|
|
|
@ -66,7 +66,8 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
|||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=30
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
@ -101,7 +102,7 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# CREATE YUNOHOST DIRECTORIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating yunohost directories..."
|
||||
ynh_script_progression --message="Creating YunoHost directories..."
|
||||
|
||||
ynh_multimedia_build_main_dir # /home/yunohost.multimedia
|
||||
|
||||
|
@ -151,7 +152,7 @@ chown $app: $final_path
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add $app --log_type systemd --description "this is mopidy, a music server"
|
||||
yunohost service add $app --description "Mopidy music server" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
@ -185,12 +186,12 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
#=================================================
|
||||
# PROVIDE ADDITIONAL SHELL COMAND
|
||||
#=================================================
|
||||
ynh_script_progression --message="Provide additional shell comand..."
|
||||
ynh_script_progression --message="Provide additional shell command..."
|
||||
|
||||
cp -a ../sources/extra_files/mopidyctl "$cmd_file"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="$cmd_file"
|
||||
ynh_replace_string --match_string="__FINAL_PATH__" --replace_string=$final_path --target_file="$cmd_file"
|
||||
ynh_replace_string --match_string="__CONF_FILE__" --replace_string=$conf_file --target_file="$cmd_file"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="$cmd_file"
|
||||
ynh_replace_string --match_string="__FINAL_PATH__" --replace_string=$final_path --target_file="$cmd_file"
|
||||
ynh_replace_string --match_string="__CONF_FILE__" --replace_string=$conf_file --target_file="$cmd_file"
|
||||
|
||||
chmod +x "$cmd_file"
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ ynh_restore_file --origin_path="$final_path" # /opt/yunohost/mopidy
|
|||
ynh_script_progression --message="Reinstalling dependencies..." --weight=50
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
|
@ -104,7 +104,7 @@ systemctl enable $app.service --quiet
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --log_type systemd --description "this is mopidy, a music server"
|
||||
yunohost service add $app --description "Mopidy music server" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# RESTORE VARIOUS FILES
|
||||
|
|
|
@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=2
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -27,17 +27,10 @@ work_dir="/home/yunohost.app/$app"
|
|||
conf_file="$final_path/$app.conf"
|
||||
cmd_file="/usr/local/bin/mopidyctl"
|
||||
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
||||
### This helper will compare the version of the currently installed app and the version of the upstream package.
|
||||
### $upgrade_type can have 2 different values
|
||||
### - UPGRADE_APP if the upstream app version has changed
|
||||
### - UPGRADE_PACKAGE if only the YunoHost package has changed
|
||||
### ynh_check_app_version_changed will stop the upgrade if the app is up to date.
|
||||
### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do.
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
|
@ -102,7 +95,7 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=11
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
@ -127,11 +120,8 @@ ynh_add_systemd_config --others_var="conf_file start_file" # substitute __CO
|
|||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
||||
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
||||
### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it.
|
||||
ynh_backup_if_checksum_is_different --file="$conf_file"
|
||||
|
||||
|
||||
cp ../conf/app.conf "$conf_file"
|
||||
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string=$port --target_file="$conf_file"
|
||||
|
@ -162,7 +152,7 @@ chown $app: $final_path
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --log_type systemd --description "this is mopidy, a music server"
|
||||
yunohost service add $app --description "Mopidy music server" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
Loading…
Add table
Reference in a new issue