1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/streama_ynh.git synced 2024-09-03 20:26:30 +02:00
* Add templates
This commit is contained in:
Éric Gaspar 2021-06-06 19:54:47 +02:00 committed by GitHub
parent 80f5a89946
commit d3a6e05dd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 260 additions and 138 deletions

55
.github/ISSUE_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,55 @@
---
name: Bug report
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
---
**How to post a meaningful bug report**
1. *Read this whole template first.*
2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
- *When in doubt, post here and we will figure it out together.*
3. *Delete the italic comments as you write over them below, and remove this guide.*
---
### Describe the bug
*A clear and concise description of what the bug is.*
### Context
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
- If yes, please explain:
- Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
### Steps to reproduce
- *If you performed a command from the CLI, the command itself is enough. For example:*
```sh
sudo yunohost app install the_app
```
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:*
1. *Go to '...'*
2. *Click on '...'*
3. *Scroll down to '...'*
4. *See error*
### Expected behavior
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
### Logs
*When an operation fails, YunoHost provides a simple way to share the logs.*
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
*If applicable and useful, add screenshots to help explain your problem.*

16
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,16 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished and ready to be reviewed/tested
- [ ] The fix/enhancement were manually tested (if applicable)
## Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

View file

@ -1,3 +1,8 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# Streama for YunoHost
[![Integration level](https://dash.yunohost.org/integration/streama.svg)](https://dash.yunohost.org/appci/app/streama) ![](https://ci-apps.yunohost.org/ci/badges/streama.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/streama.maintain.svg)
@ -5,24 +10,22 @@
*[Lire ce readme en français.](./README_fr.md)*
> *This package allows you to install Streama quickly and simply on a YunoHost server.
> *This package allows you to install Streama quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview
Streama is a free self hosted media streaming server running on Java, that you can install on your Linux distribution. Its features are similar to those of Kodi and Plex and it is simply a matter of personal choice which one you would like to use.
**Shipped version:** 1.10.3
Self hosted streaming media server
**Shipped version:** 1.10.3~ynh2
**Demo:** https://streama.demo-version.net
## Screenshots
![](https://user-images.githubusercontent.com/51749973/96721577-9f216280-13ac-11eb-935c-d083f4b010a2.jpg)
![](./doc/screenshots/screenshot.jpg)
## Demo
* [Official demo](https://streama.demo-version.net)
**User**: demoUser
**Password**: demoUser
## Disclaimers / important information
## Installation guide
@ -32,22 +35,6 @@ Default upload directory is: `/home/yunohost.app/streama` (must be mentioned in
Default local video directory is: `/home/yunohost.app/streama/upload` (must be mentioned in *Settings* page or can be changed)
## Documentation
* Official documentation: https://docs.streama-project.com/ or https://github.com/streamaserver/streama/wiki
#### Multi-user support
* Are LDAP and HTTP auth supported? **No**
* Can the app be used by multiple users? **Yes**
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/streama%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/streama/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/streama%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/streama/)
## Limitations
## Additional information
* After install:
@ -80,14 +67,13 @@ This can be changed in settings.
$ sudo dpkg -i libaften-dev_0.0.8svn20100103-dmo2_amd64.deb
$ bash bootStrap.bash --deb --without-qt --with-cli
## Links
## Documentation and resources
* Report a bug: https://github.com/YunoHost-Apps/streama_ynh/issues
* App website: https://docs.streama-project.com/
* Upstream app repository: https://github.com/streamaserver/streama
* YunoHost website: https://yunohost.org/
---
* Official app website: https://streamaserver.org/
* Official admin documentation: https://docs.streama-project.com/
* Upstream app code repository: https://github.com/streamaserver/streama
* YunoHost documentation for this app: https://yunohost.org/app_streama
* Report a bug: https://github.com/YunoHost-Apps/streama_ynh/issues
## Developer info
@ -99,3 +85,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/streama_ynh/tree/test
or
sudo yunohost app upgrade streama -u https://github.com/YunoHost-Apps/streama_ynh/tree/testing --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps

View file

@ -1,28 +1,27 @@
# Streama pour YunoHost
[![Integration level](https://dash.yunohost.org/integration/streama.svg)](https://dash.yunohost.org/appci/app/streama) ![](https://ci-apps.yunohost.org/ci/badges/streama.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/streama.maintain.svg)
[![Install Streama with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=streama)
[![Niveau d'intégration](https://dash.yunohost.org/integration/streama.svg)](https://dash.yunohost.org/appci/app/streama) ![](https://ci-apps.yunohost.org/ci/badges/streama.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/streama.maintain.svg)
[![Installer Streama avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=streama)
*[Read this readme in english.](./README.md)*
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Streama rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
> *Ce package vous permet d'installer Streama rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
## Vue d'ensemble
Streama est un serveur de streaming multimédia auto-hébergé gratuit fonctionnant sur Java, que vous pouvez installer sur votre distribution Linux. Ses fonctionnalités sont similaires à celles de Kodi et Plex et c'est simplement une question de choix personnel que vous souhaitez utiliser.
**Version incluse :** 1.10.3
Serveur de streaming auto-hébergé
**Version incluse :** 1.10.3~ynh2
**Démo :** https://streama.demo-version.net
## Captures d'écran
![](https://user-images.githubusercontent.com/51749973/96721577-9f216280-13ac-11eb-935c-d083f4b010a2.jpg)
![](./doc/screenshots/screenshot.jpg)
## Démo
* [Démo officielle](https://streama.demo-version.net)
**Nom dutilisateur**: demoUser
**Mot de passe**: demoUser
## Avertissements / informations importantes
## Guide dinstallation
@ -32,22 +31,6 @@ Le répertoire de téléchargement par défaut est : `/home/yunohost.app/streama
Le répertoire vidéo local par défaut est : `/home/yunohost.app/streama/upload` (doit être mentionné dans la page *Paramètres* ou peut être modifié)
## Documentation
* Documentation officielle : https://docs.streama-project.com/ ou https://github.com/streamaserver/streama/wiki
#### Support multi-utilisateur
* L'authentification LDAP et HTTP est-elle prise en charge ? **Non**
* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui**
#### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/streama%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/streama/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/streama%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/streama/)
## Limitations
## Informations additionnelles
* Après linstallation :
@ -80,14 +63,13 @@ Ceci pourra être changé dans les paramètres.
$ sudo dpkg -i libaften-dev_0.0.8svn20100103-dmo2_amd64.deb
$ bash bootStrap.bash --deb --without-qt --with-cli
## Liens
## Documentations et ressources
* Signaler un bug : https://github.com/YunoHost-Apps/streama_ynh/issues
* Site de l'application : https://docs.streama-project.com/
* Dépôt de l'application principale : https://github.com/streamaserver/streama
* Site web YunoHost : https://yunohost.org/
---
* Site officiel de l'app : https://streamaserver.org/
* Documentation officielle de l'admin : https://docs.streama-project.com/
* Dépôt de code officiel de l'app : https://github.com/streamaserver/streama
* Documentation YunoHost pour cette app : https://yunohost.org/app_streama
* Signaler un bug : https://github.com/YunoHost-Apps/streama_ynh/issues
## Informations pour les développeurs
@ -99,3 +81,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/streama_ynh/tree/test
ou
sudo yunohost app upgrade streama -u https://github.com/YunoHost-Apps/streama_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps

39
doc/DISCLAIMER.md Normal file
View file

@ -0,0 +1,39 @@
## Installation guide
> :warning: Streama must be installed in the root domain or subdomain.
Default upload directory is: `/home/yunohost.app/streama` (must be mentioned in *Settings* page or can be changed)
Default local video directory is: `/home/yunohost.app/streama/upload` (must be mentioned in *Settings* page or can be changed)
## Additional information
* After install:
- **Username**: admin
- **Password**: admin
This can be changed in settings.
### Convert video:
$ convert_movies -ffmpeg
$ convert_movies -avidemux
$ convert_movies -mencoder
$ convert_movies -avconv
### Avidemux compilation:
$ git clone https://github.com/mean00/avidemux2/
$ cd avidemux2
$ sudo apt-get install build-essential cmake \
pkg-config yasm libsqlite3-dev libfontconfig1-dev \
libfribidi-dev libxvdev libvdpau-dev libva-dev \
libasound2-dev libpulse-dev libfdk-aac-dev \
libpng-dev libmp3lame-dev libx264-dev \
libxvidcore-dev libfaad-dev libfaac-dev libopus-dev \
libvorbis-dev libogg-dev libdca-dev libx265-dev
$ wget https://www.deb-multimedia.org/pool/main/a/aften/libaften0_0.0.8svn20100103-dmo2_amd64.deb
$ wget https://www.deb-multimedia.org/pool/main/a/aften/libaften-dev_0.0.8svn20100103-dmo2_amd64.deb
$ sudo dpkg -i libaften0_0.0.8svn20100103-dmo2_amd64.deb
$ sudo dpkg -i libaften-dev_0.0.8svn20100103-dmo2_amd64.deb
$ bash bootStrap.bash --deb --without-qt --with-cli

39
doc/DISCLAIMER_fr.md Normal file
View file

@ -0,0 +1,39 @@
## Guide dinstallation
> :warning: Streama doit être installé dans le domaine racine ou un sous-domaine dédié.
Le répertoire de téléchargement par défaut est : `/home/yunohost.app/streama` (doit être mentionné dans la page *Paramètres* ou peut être modifié)
Le répertoire vidéo local par défaut est : `/home/yunohost.app/streama/upload` (doit être mentionné dans la page *Paramètres* ou peut être modifié)
## Informations additionnelles
* Après linstallation :
- **Nom dutilisateur**: admin
- **Mot de passe**: admin
Ceci pourra être changé dans les paramètres.
### Convertir des vidéos :
$ convert_movies -ffmpeg
$ convert_movies -avidemux
$ convert_movies -mencoder
$ convert_movies -avconv
### Compilation avidemux :
$ git clone https://github.com/mean00/avidemux2/
$ cd avidemux2
$ sudo apt-get install build-essential cmake \
pkg-config yasm libsqlite3-dev libfontconfig1-dev \
libfribidi-dev libxvdev libvdpau-dev libva-dev \
libasound2-dev libpulse-dev libfdk-aac-dev \
libpng-dev libmp3lame-dev libx264-dev \
libxvidcore-dev libfaad-dev libfaac-dev libopus-dev \
libvorbis-dev libogg-dev libdca-dev libx265-dev
$ wget https://www.deb-multimedia.org/pool/main/a/aften/libaften0_0.0.8svn20100103-dmo2_amd64.deb
$ wget https://www.deb-multimedia.org/pool/main/a/aften/libaften-dev_0.0.8svn20100103-dmo2_amd64.deb
$ sudo dpkg -i libaften0_0.0.8svn20100103-dmo2_amd64.deb
$ sudo dpkg -i libaften-dev_0.0.8svn20100103-dmo2_amd64.deb
$ bash bootStrap.bash --deb --without-qt --with-cli

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 KiB

View file

@ -6,15 +6,22 @@
"en": "Self hosted streaming media server",
"fr": "Serveur de streaming auto-hébergé"
},
"version": "1.10.3~ynh1",
"version": "1.10.3~ynh2",
"url": "https://streamaserver.org/",
"upstream": {
"license": "MIT",
"website": "https://streamaserver.org/",
"demo": "https://streama.demo-version.net",
"admindoc": "https://docs.streama-project.com/",
"code": "https://github.com/streamaserver/streama"
},
"license": "MIT",
"maintainer": {
"name": "liberodark",
"email": "liberodark@gmail.com"
},
"requirements": {
"yunohost": ">= 4.1.0"
"yunohost": ">= 4.2.4"
},
"multi_instance": false,
"services": [
@ -25,19 +32,11 @@
"install": [{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain name for Streama",
"fr": "Choisissez un nom de domaine pour Streama"
},
"example": "streama.example.com"
},
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public site?",
"fr": "Est-ce un site public ?"
},
"help": {
"en": "If enabled, Streama will be accessible by people who do not have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, Streama sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."

View file

@ -64,6 +64,14 @@ ynh_print_info "Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -73,6 +81,11 @@ 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"
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod +x $final_path/streama.jar
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -81,22 +94,11 @@ ynh_script_progression --message="Configuring NGNX web server..." --weight=3
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
# This can be removed as the variable is dynamically replaced by ynh_add_systemd_config helper
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/systemd.service"
ynh_add_systemd_config
#=================================================
@ -108,17 +110,8 @@ ynh_add_systemd_config
# Set permissions to app files
mkdir -p $final_path/data/streama
ln -s $final_path/data/streama /home/yunohost.app/streama
cp "../conf/convert.sh" /usr/bin/convert_movies
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
chown -R $app: $final_path
chmod +x /usr/bin/convert_movies
chmod +x $final_path/streama.jar
ynh_add_config --template="../conf/convert.sh" --destination="/usr/bin/convert_movies"
chmod +x "/usr/bin/convert_movies"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST

View file

@ -48,6 +48,14 @@ test ! -d "$final_path" \
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -55,13 +63,9 @@ ynh_script_progression --message="Restoring Streama main directory..." --weight=
ynh_restore_file --origin_path="$final_path"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# INSTALL DEPENDENCIES

View file

@ -28,17 +28,6 @@ port=$(ynh_app_setting_get --app=$app --key=port)
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -53,6 +42,18 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -62,14 +63,30 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=20
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=3
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"
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
fi
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod +x $final_path/streama.jar
#=================================================
# NGINX CONFIGURATION
@ -91,9 +108,6 @@ ynh_install_app_dependencies $pkg_dependencies
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=3
# This can be removed as the variable is dynamically replaced by ynh_add_systemd_config helper
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/systemd.service"
ynh_add_systemd_config
#=================================================
@ -104,17 +118,8 @@ ynh_add_systemd_config
# Set permissions to app files
mkdir -p $final_path/data/streama
cp -a "../conf/convert.sh" /usr/bin/convert_movies
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
chown -R $app: $final_path
chmod +x /usr/bin/convert_movies
chmod +x $final_path/streama.jar
ynh_add_config --template="../conf/convert.sh" --destination="/usr/bin/convert_movies"
chmod +x "/usr/bin/convert_movies"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST