mirror of
https://github.com/YunoHost-Apps/minetest_ynh.git
synced 2024-09-03 20:36:00 +02:00
commit
38366963b0
10 changed files with 80 additions and 217 deletions
36
README.md
36
README.md
|
@ -1,18 +1,17 @@
|
||||||
# Minetest for YunoHost
|
# Minetest for YunoHost
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/minetest.svg)](https://dash.yunohost.org/appci/app/minetest)
|
[![Integration level](https://dash.yunohost.org/integration/minetest.svg)](https://dash.yunohost.org/appci/app/minetest) ![](https://ci-apps.yunohost.org/ci/badges/minetest.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/minetest.maintain.svg)
|
||||||
|
|
||||||
[![Install Minetest with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=minetest)
|
[![Install Minetest with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=minetest)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
> *This package allow you to install Minetest quickly and simply on a YunoHost server.
|
> *This package allow you to install Minetest quickly and simply on a YunoHost server.
|
||||||
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
If you don’t have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
Minetest is a free open-source voxel game engine with easy modding and game creation.
|
Minetest is a free open-source voxel game engine with easy modding and game creation.
|
||||||
|
|
||||||
**Shipped version:** 5.1.0
|
**Shipped version:** 5.2.0
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
@ -29,21 +28,19 @@ How to configure this app: by SSH
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
* Official documentation: https://wiki.minetest.net/
|
* Official documentation: https://wiki.minetest.net/
|
||||||
* YunoHost documentation: https://yunohost.org/#/minetest
|
* YunoHost documentation: https://yunohost.org/#/app_minetest
|
||||||
|
|
||||||
## YunoHost specific features
|
## YunoHost specific features
|
||||||
|
|
||||||
#### Multi-users support
|
#### Multi-users support
|
||||||
|
|
||||||
Are LDAP and HTTP auth supported? No
|
* Are LDAP and HTTP auth supported? **No**
|
||||||
|
* Can the app be used by multiple users? **Yes**
|
||||||
Can the app be used by multiple users? Yes
|
|
||||||
|
|
||||||
#### Supported architectures
|
#### Supported architectures
|
||||||
|
|
||||||
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/minetest%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/minetest/)
|
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/minetest%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/minetest/)
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/minetest%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/minetest/)
|
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/minetest%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/minetest/)
|
||||||
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/minetest%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/minetest/)
|
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
|
@ -52,7 +49,8 @@ Can the app be used by multiple users? Yes
|
||||||
## Additional information
|
## Additional information
|
||||||
|
|
||||||
* Migration from old package
|
* Migration from old package
|
||||||
You can't migrate directly with an update.
|
|
||||||
|
* You can’t migrate directly with an update.
|
||||||
* Before installing the new package you need to download this folder from your server `/var/games/minetest-server/.minetest/worlds/world` (this folder contains all world data)
|
* Before installing the new package you need to download this folder from your server `/var/games/minetest-server/.minetest/worlds/world` (this folder contains all world data)
|
||||||
* Uninstall the old package `sudo yunohost app remove minetest`
|
* Uninstall the old package `sudo yunohost app remove minetest`
|
||||||
* Install the new one `sudo yunohost app install https://github.com/YunoHost-Apps/minetest_ynh`
|
* Install the new one `sudo yunohost app install https://github.com/YunoHost-Apps/minetest_ynh`
|
||||||
|
@ -61,20 +59,18 @@ You can't migrate directly with an update.
|
||||||
* Start the Minetest service `sudo systemctl start minetest`
|
* Start the Minetest service `sudo systemctl start minetest`
|
||||||
|
|
||||||
* Installing mods
|
* Installing mods
|
||||||
* For installing mods you need to create a worldmods folder in /home/yunohost.app/minetest/.minetest/worlds/world/.
|
* For installing mods you need to create a `worldmods` folder in `/home/yunohost.app/minetest/.minetest/worlds/world/`
|
||||||
* Clone the repo of the mod in this folder (ex: git clone https://github.com/minetest-mods/mesecons)
|
* Clone the repo of the mod in this folder (ex: `git clone https://github.com/minetest-mods/mesecons`)
|
||||||
* Edit /home/yunohost.app/minetest/.minetest/worlds/world/world.mt and add at the end ```load_mod_mesecons = true```
|
* Edit `/home/yunohost.app/minetest/.minetest/worlds/world/world.mt` and add at the end `load_mod_mesecons = true`
|
||||||
* Restart Minetest with ```sudo systemctl restart minetest```
|
* Restart Minetest with `sudo systemctl restart minetest`
|
||||||
* The mod is now installed :)
|
* The mod is now installed :)
|
||||||
|
|
||||||
|
|
||||||
**More information on the documentation page:**
|
|
||||||
https://yunohost.org/packaging_apps
|
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/minetest_ynh/issues
|
* Report a bug: https://github.com/YunoHost-Apps/minetest_ynh/issues
|
||||||
* App website: https://minetest.net/
|
* App website: https://www.minetest.net/
|
||||||
|
* Upstream app repository: https://github.com/minetest/minetest
|
||||||
* YunoHost website: https://yunohost.org/
|
* YunoHost website: https://yunohost.org/
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -82,7 +78,6 @@ https://yunohost.org/packaging_apps
|
||||||
Developers info
|
Developers info
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
|
|
||||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/minetest_ynh/tree/testing).
|
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/minetest_ynh/tree/testing).
|
||||||
|
|
||||||
To try the testing branch, please proceed like that.
|
To try the testing branch, please proceed like that.
|
||||||
|
@ -91,4 +86,3 @@ sudo yunohost app install https://github.com/YunoHost-Apps/minetest_ynh/tree/tes
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade minetest -u https://github.com/YunoHost-Apps/minetest_ynh/tree/testing --debug
|
sudo yunohost app upgrade minetest -u https://github.com/YunoHost-Apps/minetest_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
76
README_fr.md
76
README_fr.md
|
@ -1,26 +1,25 @@
|
||||||
# Minetest for YunoHost
|
# Minetest for YunoHost
|
||||||
|
|
||||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/minetest.svg)](https://dash.yunohost.org/appci/app/minetest)
|
[![Niveau d’intégration](https://dash.yunohost.org/integration/minetest.svg)](https://dash.yunohost.org/appci/app/minetest) ![](https://ci-apps.yunohost.org/ci/badges/minetest.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/minetest.maintain.svg)
|
||||||
|
|
||||||
[![Installer Minetest avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=minetest)
|
[![Installer Minetest avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=minetest)
|
||||||
|
|
||||||
*[Read this readme in English.](./README.md)*
|
*[Read this readme in English.](./README.md)*
|
||||||
|
|
||||||
> *Ce package vous permet d'installer Minetest rapidement et simplement sur un serveur YunoHost.
|
> *Ce package vous permet d’installer Minetest rapidement et simplement sur un serveur YunoHost.
|
||||||
Si vous n'avez pas YunoHost, veuillez consulter [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
Si vous n’avez pas YunoHost, veuillez consulter [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.*
|
||||||
|
|
||||||
## Aperçu
|
## Aperçu
|
||||||
Minetest est un moteur de jeu voxel open-source gratuit avec modding et création de jeu faciles.
|
Minetest est un moteur de jeu voxel open-source avec modding et création de jeux faciles.
|
||||||
|
|
||||||
**Version livrée:** 5.1.0
|
**Version incluse:** 5.2.0
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d’écran
|
||||||
|
|
||||||
![](https://www.minetest.net/media/gallery/1.jpg)
|
![](https://www.minetest.net/media/gallery/1.jpg)
|
||||||
|
|
||||||
## Démo
|
## Démo
|
||||||
|
|
||||||
Pas de démo mais vous pouvez tester avec des serveurs sur https://servers.minetest.net/
|
Il n'y a pas de démo mais vous pouvez tester avec des serveurs sur https://servers.minetest.net/
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
@ -29,65 +28,60 @@ Comment configurer cette application : par SSH
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
* Documentation officielle : https://wiki.minetest.net/
|
* Documentation officielle : https://wiki.minetest.net/
|
||||||
* Documentation YunoHost : https://yunohost.org/#/minetest
|
* Documentation YunoHost : https://yunohost.org/#/app_minetest_fr
|
||||||
|
|
||||||
## Caractéristiques spécifiques de YunoHost
|
## Caractéristiques spécifiques YunoHost
|
||||||
|
|
||||||
#### Support multi-utilisateurs
|
#### Support multi-utilisateurs
|
||||||
|
|
||||||
Les authentifications LDAP et HTTP sont-elles prises en charge ? Non
|
* Les authentifications LDAP et HTTP sont-elles prises en charge ? **Non**
|
||||||
|
* L’application peut-elle être utilisée par plusieurs utilisateurs ? **Oui**
|
||||||
L'application peut-elle être utilisée par plusieurs utilisateurs ? Oui
|
|
||||||
|
|
||||||
##### Architectures supportées
|
##### Architectures supportées
|
||||||
|
|
||||||
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/minetest%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/minetest/)
|
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/minetest%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/minetest/)
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/minetest%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/minetest/)
|
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/minetest%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/minetest/)
|
||||||
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/minetest%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/minetest/)
|
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
* Cette application n'est pas compatible avec LDAP.
|
* Cette application n’est pas compatible avec LDAP.
|
||||||
|
|
||||||
## Renseignements supplémentaires
|
## Renseignements supplémentaires
|
||||||
|
|
||||||
* Migration de l'ancien paquet
|
* Migration de l’ancien paquet
|
||||||
Vous ne pouvez pas migrer directement avec une mise à jour.
|
|
||||||
* Avant d'installer le nouveau paquetage, vous devez télécharger ce dossier depuis votre serveur `/var/games/minetest-server/.minetest/worlds/world` (ce dossier contient toutes les données mondiales)
|
|
||||||
* Désinstallez l'ancien paquetage `sudo yunohost application remove minetest`.
|
|
||||||
* Installez le nouveau `sudo yunohost yunohost application install https://github.com/YunoHost-Apps/minetest_ynh``
|
|
||||||
* Stop Minetest service `sudo systemctl systemctl stop minetest`
|
|
||||||
* Copiez le dossier que vous avez copié auparavant dans `/home/yunohost.app/minetest/.minetest/.worlds'.
|
|
||||||
* Démarrer le service Minetest `sudo systemctl démarre minetest`.
|
|
||||||
|
|
||||||
* Installer les mods
|
* Vous ne pouvez pas migrer directement avec une mise à jour.
|
||||||
* Pour installer les mods, vous devez créer un dossier worldmods dans /home/yunohost.app/minetest/.minetest/worlds/world/.
|
* Avant d’installer le nouveau paquet, vous devez télécharger ce dossier depuis votre serveur `/var/games/minetest-server/.minetest/worlds/world` (ce dossier contient toutes les données des mondes)
|
||||||
* Cloner le repo du mod dans ce dossier (ex : git clone https://github.com/minetest-mods/mesecons)
|
* Désinstallez l’ancien paquet `sudo yunohost app remove minetest`
|
||||||
* Editez /home/yunohost.app/minetest/.minetest/worlds/world/world/world.mt et ajoutez à la fin ````load_mod_mesecons = true```.
|
* Installez le nouveau `sudo yunohost app install https://github.com/YunoHost-Apps/minetest_ynh`
|
||||||
* Redémarrer Minetest avec ```sudo systemctl restart minetest```
|
* Stoppez le service Minetest `sudo systemctl stop minetest`
|
||||||
|
* Copiez le dossier que vous avez copié auparavant dans `/home/yunohost.app/minetest/.minetest/.worlds`
|
||||||
|
* Démarrez le service Minetest `sudo systemctl start minetest`
|
||||||
|
|
||||||
|
* Installation des mods
|
||||||
|
* Pour installer des mods, vous devez créer un dossier `worldmods` dans `/home/yunohost.app/minetest/.minetest/worlds/world/`
|
||||||
|
* Clonez le repo du mod dans ce dossier (ex : `git clone https://github.com/minetest-mods/mesecons`)
|
||||||
|
* Éditez `/home/yunohost.app/minetest/.minetest/worlds/world/world/world.mt` et ajoutez à la fin `load_mod_mesecons = true`
|
||||||
|
* Redémarrez Minetest avec `sudo systemctl restart minetest`
|
||||||
* Le mod est maintenant installé :)
|
* Le mod est maintenant installé :)
|
||||||
|
|
||||||
|
|
||||||
**Plus d'informations sur la page documentation:**
|
|
||||||
https://yunohost.org/packaging_apps
|
|
||||||
|
|
||||||
## Liens
|
## Liens
|
||||||
|
|
||||||
* Signaler un bug : https://github.com/YunoHost-Apps/minetest_ynh/issues
|
* Signaler un bug : https://github.com/YunoHost-Apps/minetest_ynh/issues
|
||||||
* Site Web de l'application : https://minetest.net/
|
* Site de l’application : https://www.minetest.net/
|
||||||
|
* Dépôt de l’application principale : https://github.com/minetest/minetest
|
||||||
* Site web de YunoHost : https://yunohost.org/
|
* Site web de YunoHost : https://yunohost.org/
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Infos développeurs
|
Informations pour les développeurs
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
**Uniquement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans le master.**
|
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/minetest_ynh/tree/testing).
|
||||||
Veuillez faire votre demande de tirage à la[succursale de test] (https://github.com/YunoHost-Apps/minetest_ynh/tree/testing).
|
|
||||||
|
|
||||||
Pour essayer la branche testing, procédez comme suit.
|
Pour essayer la branche testing, procédez comme suit.
|
||||||
```
|
```
|
||||||
sudo yunohost installent l'application https://github.com/YunoHost-Apps/minetest_ynh/tree/testing --debug
|
sudo yunohost app install https://github.com/YunoHost-Apps/minetest_ynh/tree/testing --debug
|
||||||
ou
|
ou
|
||||||
sudo yunohost mise à jour de l'application minetest -u https://github.com/YunoHost-Apps/minetest_ynh/tree/testing --debug
|
sudo yunohost app upgrade minetest -u https://github.com/YunoHost-Apps/minetest_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
SOURCE_URL=https://github.com/minetest/minetest/archive/5.1.0.tar.gz
|
SOURCE_URL=https://github.com/minetest/minetest/archive/5.2.0.tar.gz
|
||||||
SOURCE_SUM=ca53975eecf6a39383040658f41d697c8d7f8d5fe9176460f564979c73b53906
|
SOURCE_SUM=4996c7c50a6600d0c7140680d4bd995cb9aae910f216b46373953b49d6b13a5d
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=minetest
|
SOURCE_FILENAME=minetest-5.2.0.tar.gz
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
SOURCE_URL=https://github.com/minetest/minetest_game/archive/5.1.0.tar.gz
|
SOURCE_URL=https://github.com/minetest/minetest_game/archive/5.2.0.tar.gz
|
||||||
SOURCE_SUM=f165fac0081bf4797cf9094282cc25034b2347b3ea94e6bb8d9329c5ee63f41b
|
SOURCE_SUM=0c49fd6e310de1aba2e8cb8ae72efe0e06bb6bc8d7c5efea23bc201b6a80ce94
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=minetest_game-5.1.0.tar.gz
|
SOURCE_FILENAME=minetest_game-5.2.0.tar.gz
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "Minetest",
|
"name": "Minetest",
|
||||||
"id": "minetest",
|
"id": "minetest",
|
||||||
"version": "5.1.0~ynh1",
|
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Minetest is a free, open source voxel game engine and game. Fully extendable. Need a client to connect to the server.",
|
"en": "Free, open source voxel game engine and game. Need a client to connect to the server.",
|
||||||
"fr": "Minetest est un moteur de jeu de type « bac à sable » gratuit et open source. Entièrement extensible. Nécessite un client pour se connecter au serveur."
|
"fr": "Moteur de jeu de type « bac à sable » gratuit et open source. Nécessite un client pour se connecter au serveur."
|
||||||
},
|
},
|
||||||
|
"version": "5.2.0~ynh1",
|
||||||
"url": "http://www.minetest.net/",
|
"url": "http://www.minetest.net/",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -32,8 +32,8 @@
|
||||||
"name": "server_domain",
|
"name": "server_domain",
|
||||||
"type": "domain",
|
"type": "domain",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Choose a domain for your minetest server",
|
"en": "Choose a domain for your Minetest server",
|
||||||
"fr": "Choisissez un domaine pour votre serveur minetest"
|
"fr": "Choisissez un domaine pour votre serveur Minetest"
|
||||||
},
|
},
|
||||||
"example": "domain.org"
|
"example": "domain.org"
|
||||||
},
|
},
|
||||||
|
|
18
pull_request_template.md
Normal file
18
pull_request_template.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
## Problem
|
||||||
|
- *Description of why you made this PR*
|
||||||
|
|
||||||
|
## Solution
|
||||||
|
- *And how do you fix that problem*
|
||||||
|
|
||||||
|
## PR Status
|
||||||
|
- [ ] Code finished.
|
||||||
|
- [ ] Tested with Package_check.
|
||||||
|
- [ ] Fix or enhancement tested.
|
||||||
|
- [ ] Upgrade from last version tested.
|
||||||
|
- [ ] Can be reviewed and tested.
|
||||||
|
|
||||||
|
## Package_check results
|
||||||
|
---
|
||||||
|
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
|
||||||
|
|
||||||
|
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/minetest_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/minetest_ynh%20PR-NUM-%20(USERNAME)/)
|
|
@ -8,82 +8,10 @@
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies="build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libluajit-5.1-dev"
|
pkg_dependencies="build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libluajit-5.1-dev"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# PERSONAL HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# To remove once https://github.com/YunoHost/yunohost/pull/827 get merged
|
|
||||||
ynh_find_port () {
|
|
||||||
# Declare an array to define the options of this helper.
|
|
||||||
local legacy_args=p
|
|
||||||
declare -Ar args_array=( [p]=port= )
|
|
||||||
local port
|
|
||||||
# Manage arguments with getopts
|
|
||||||
ynh_handle_getopts_args "$@"
|
|
||||||
|
|
||||||
test -n "$port" || ynh_die --message="The argument of ynh_find_port must be a valid port."
|
|
||||||
while ss -nltu | grep -q -w :$port # Check if the port is free
|
|
||||||
do
|
|
||||||
port=$((port+1)) # Else, pass to next port
|
|
||||||
done
|
|
||||||
echo $port
|
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Need also the helper https://github.com/YunoHost-Apps/Experimental_helpers/blob/master/ynh_handle_getopts_args/ynh_handle_getopts_args
|
|
||||||
|
|
||||||
# Read the value of a key in a ynh manifest file
|
|
||||||
#
|
|
||||||
# usage: ynh_read_manifest manifest key
|
|
||||||
# | arg: -m, --manifest= - Path of the manifest to read
|
|
||||||
# | arg: -k, --key= - Name of the key to find
|
|
||||||
ynh_read_manifest () {
|
|
||||||
# Declare an array to define the options of this helper.
|
|
||||||
declare -Ar args_array=( [m]=manifest= [k]=key= )
|
|
||||||
local manifest
|
|
||||||
local key
|
|
||||||
# Manage arguments with getopts
|
|
||||||
ynh_handle_getopts_args "$@"
|
|
||||||
|
|
||||||
python3 -c "import sys, json;print(json.load(open('$manifest', encoding='utf-8'))['$key'])"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Read the upstream version from the manifest
|
|
||||||
# The version number in the manifest is defined by <upstreamversion>~ynh<packageversion>
|
|
||||||
# For example : 4.3-2~ynh3
|
|
||||||
# This include the number before ~ynh
|
|
||||||
# In the last example it return 4.3-2
|
|
||||||
#
|
|
||||||
# usage: ynh_app_upstream_version
|
|
||||||
ynh_app_upstream_version () {
|
|
||||||
manifest_path="../manifest.json"
|
|
||||||
if [ ! -e "$manifest_path" ]; then
|
|
||||||
manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place
|
|
||||||
fi
|
|
||||||
version_key=$(ynh_read_manifest --manifest="$manifest_path" --key="version")
|
|
||||||
echo "${version_key/~ynh*/}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Read package version from the manifest
|
|
||||||
# The version number in the manifest is defined by <upstreamversion>~ynh<packageversion>
|
|
||||||
# For example : 4.3-2~ynh3
|
|
||||||
# This include the number after ~ynh
|
|
||||||
# In the last example it return 3
|
|
||||||
#
|
|
||||||
# usage: ynh_app_package_version
|
|
||||||
ynh_app_package_version () {
|
|
||||||
manifest_path="../manifest.json"
|
|
||||||
if [ ! -e "$manifest_path" ]; then
|
|
||||||
manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place
|
|
||||||
fi
|
|
||||||
version_key=$(ynh_read_manifest --manifest="$manifest_path" --key="version")
|
|
||||||
echo "${version_key/*~ynh/}"
|
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# FUTURE OFFICIAL HELPERS
|
# FUTURE OFFICIAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
|
@ -31,16 +31,6 @@ creative=$YNH_APP_ARG_CREATIVE
|
||||||
damage=$YNH_APP_ARG_DAMAGE
|
damage=$YNH_APP_ARG_DAMAGE
|
||||||
servername=$YNH_APP_ARG_SERVERNAME
|
servername=$YNH_APP_ARG_SERVERNAME
|
||||||
|
|
||||||
### If it's a multi-instance app, meaning it can be installed several times independently
|
|
||||||
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
|
||||||
### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...)
|
|
||||||
### The app instance name is available as $YNH_APP_INSTANCE_NAME
|
|
||||||
### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample
|
|
||||||
### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2
|
|
||||||
### - ynhexample__{N} for the subsequent installations, with N=3,4, ...
|
|
||||||
### The app instance name is probably what interests you most, since this is
|
|
||||||
### guaranteed to be unique. This is a good unique identifier to define installation path,
|
|
||||||
### db names, ...
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
path_url="/"
|
path_url="/"
|
||||||
|
|
||||||
|
@ -49,8 +39,6 @@ path_url="/"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Validating installation parameters..."
|
ynh_print_info --message="Validating installation parameters..."
|
||||||
|
|
||||||
### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app".
|
|
||||||
### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app"
|
|
||||||
final_path=/opt/yunohost/$app
|
final_path=/opt/yunohost/$app
|
||||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||||
|
|
||||||
|
@ -74,11 +62,6 @@ ynh_app_setting_set --app=$app --key=servername --value=$servername
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Configuring firewall..."
|
ynh_print_info --message="Configuring firewall..."
|
||||||
|
|
||||||
### Use these lines if you have to open a port for the application
|
|
||||||
### `ynh_find_port` will find the first available port starting from the given port.
|
|
||||||
### If you're not using these lines:
|
|
||||||
### - Remove the section "CLOSE A PORT" in the remove script
|
|
||||||
|
|
||||||
# Find a free port
|
# Find a free port
|
||||||
port=$(ynh_find_port 30000)
|
port=$(ynh_find_port 30000)
|
||||||
# Open this port
|
# Open this port
|
||||||
|
@ -90,14 +73,6 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Installing dependencies..."
|
ynh_print_info --message="Installing dependencies..."
|
||||||
|
|
||||||
### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package.
|
|
||||||
### Those deb packages will be installed as dependencies of this package.
|
|
||||||
### If you're not using this helper:
|
|
||||||
### - Remove the section "REMOVE DEPENDENCIES" in the remove script
|
|
||||||
### - Remove the variable "pkg_dependencies" in _common.sh
|
|
||||||
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
|
|
||||||
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
|
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -105,10 +80,6 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Setting up source files..."
|
ynh_print_info --message="Setting up source files..."
|
||||||
|
|
||||||
### `ynh_setup_source` is used to install an app from a zip or tar.gz file,
|
|
||||||
### downloaded from an upstream source, like a git repository.
|
|
||||||
### `ynh_setup_source` use the file conf/app.src
|
|
||||||
|
|
||||||
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"
|
||||||
|
@ -136,17 +107,6 @@ cp -a ../conf/minetest.conf $home_path/.minetest/
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Configuring a systemd service..."
|
ynh_print_info --message="Configuring a systemd service..."
|
||||||
|
|
||||||
### `ynh_systemd_config` is used to configure a systemd script for an app.
|
|
||||||
### It can be used for apps that use sysvinit (with adaptation) or systemd.
|
|
||||||
### Have a look at the app to be sure this app needs a systemd script.
|
|
||||||
### `ynh_systemd_config` will use the file conf/systemd.service
|
|
||||||
### If you're not using these lines:
|
|
||||||
### - You can remove those files in conf/.
|
|
||||||
### - Remove the section "BACKUP SYSTEMD" in the backup script
|
|
||||||
### - Remove also the section "STOP AND REMOVE SERVICE" in the remove script
|
|
||||||
### - As well as the section "RESTORE SYSTEMD" in the restore script
|
|
||||||
### - And the section "SETUP SYSTEMD" in the upgrade script
|
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
|
@ -180,7 +140,6 @@ ynh_replace_string --match_string="__PVP__" --replace_string="$pvp" --target_fil
|
||||||
ynh_replace_string --match_string="__CREATIVE__" --replace_string="$creative" --target_file="$home_path/.minetest/minetest.conf"
|
ynh_replace_string --match_string="__CREATIVE__" --replace_string="$creative" --target_file="$home_path/.minetest/minetest.conf"
|
||||||
ynh_replace_string --match_string="__DAMAGE__" --replace_string="$damage" --target_file="$home_path/.minetest/minetest.conf"
|
ynh_replace_string --match_string="__DAMAGE__" --replace_string="$damage" --target_file="$home_path/.minetest/minetest.conf"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE WORLD
|
# CREATE WORLD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -194,10 +153,6 @@ chown -R $app:$app /var/log/$app
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
### `ynh_store_file_checksum` is used to store the checksum of a file.
|
|
||||||
### That way, during the upgrade script, by using `ynh_backup_if_checksum_is_different`,
|
|
||||||
### you can make a backup of this file before modifying it again if the admin had modified it.
|
|
||||||
|
|
||||||
# Calculate and store the config file checksum into the app settings
|
# Calculate and store the config file checksum into the app settings
|
||||||
ynh_store_file_checksum --file="$home_path/.minetest/minetest.conf"
|
ynh_store_file_checksum --file="$home_path/.minetest/minetest.conf"
|
||||||
|
|
||||||
|
@ -207,10 +162,6 @@ ynh_store_file_checksum --file="$home_path/.minetest/minetest.conf"
|
||||||
# SECURE FILES AND DIRECTORIES
|
# SECURE FILES AND DIRECTORIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
### For security reason, any app should set the permissions to root: before anything else.
|
|
||||||
### Then, if write authorization is needed, any access should be given only to directories
|
|
||||||
### that really need such authorization.
|
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R root: $final_path
|
chown -R root: $final_path
|
||||||
chown -R $app: $home_path
|
chown -R $app: $home_path
|
||||||
|
@ -220,14 +171,6 @@ chown -R $app: $home_path
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Configuring log rotation..."
|
ynh_print_info --message="Configuring log rotation..."
|
||||||
|
|
||||||
### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app.
|
|
||||||
### Use this helper only if there is effectively a log file for this app.
|
|
||||||
### If you're not using this helper:
|
|
||||||
### - Remove the section "BACKUP LOGROTATE" in the backup script
|
|
||||||
### - Remove also the section "REMOVE LOGROTATE CONFIGURATION" in the remove script
|
|
||||||
### - As well as the section "RESTORE THE LOGROTATE CONFIGURATION" in the restore script
|
|
||||||
### - And the section "SETUP LOGROTATE" in the upgrade script
|
|
||||||
|
|
||||||
# Use logrotate to manage application logfile(s)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate
|
ynh_use_logrotate
|
||||||
|
|
||||||
|
@ -235,17 +178,7 @@ ynh_use_logrotate
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
### `yunohost service add` is a CLI yunohost command to add a service in the admin panel.
|
|
||||||
### You'll find the service in the 'services' section of YunoHost admin panel.
|
|
||||||
### This CLI command would be useless if the app does not have any services (systemd or sysvinit)
|
|
||||||
### If you're not using these lines:
|
|
||||||
### - You can remove these files in conf/.
|
|
||||||
### - Remove the section "REMOVE SERVICE FROM ADMIN PANEL" in the remove script
|
|
||||||
### - As well as the section "ADVERTISE SERVICE IN ADMIN PANEL" in the restore script
|
|
||||||
|
|
||||||
yunohost service add $app --log "/var/log/$app/minetest.log"
|
yunohost service add $app --log "/var/log/$app/minetest.log"
|
||||||
# if using yunohost version 3.2 or more in the 'manifest.json', a description can be added
|
|
||||||
#yunohost service add $app --description "$app daemon for XXX" --log "/var/log/$app/$app.log"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD MINETEST
|
# RELOAD MINETEST
|
||||||
|
|
|
@ -61,7 +61,6 @@ ynh_secure_remove --file="$home_path"
|
||||||
# Remove the log files
|
# Remove the log files
|
||||||
ynh_secure_remove "/var/log/$app"
|
ynh_secure_remove "/var/log/$app"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE LOGROTATE CONFIGURATION
|
# REMOVE LOGROTATE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -133,7 +133,6 @@ make -j$(nproc)
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -164,8 +163,6 @@ ynh_print_info --message="Upgrading logrotate configuration..."
|
||||||
# Use logrotate to manage app-specific logfile(s)
|
# Use logrotate to manage app-specific logfile(s)
|
||||||
ynh_use_logrotate --non-append
|
ynh_use_logrotate --non-append
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue