1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jitsi_ynh.git synced 2024-09-03 19:35:57 +02:00

Merge pull request #76 from YunoHost-Apps/testing

jitsi support for armhf
This commit is contained in:
yalh76 2022-04-18 12:42:08 +02:00 committed by GitHub
commit afbc84d313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 103 additions and 8 deletions

View file

@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Jitsi Meet is a libre software (Apache) WebRTC JavaScript app that uses Jitsi Videobridge to provide high quality, secure, and scalable video conferences.
**Shipped version:** 1.0.5913~ynh2
**Shipped version:** 1.0.5913~ynh3
**Demo:** https://meet.jit.si/

View file

@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Jitsi Meet est un logiciel libre (Apache) dont Jitsi Videobridge, avec WebRTC Javascript, propose des vidéos-conférences de haute qualité, sécurisées et évolutives.
**Version incluse :** 1.0.5913~ynh2
**Version incluse :** 1.0.5913~ynh3
**Démo :** https://meet.jit.si/

6
conf/jitsi-sctp.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/jitsi/jitsi-sctp/archive/04269a7342fbd3bd66dd40ed892cfc80559d62d4.tar.gz
SOURCE_SUM=2aa4f596e96186d43f4beb3e9db9907d23b993d974e15dd051031f4d00423bf2
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_EXTRACT=true

6
conf/usrsctp.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/sctplab/usrsctp/archive/c138bc04bbb20b34fc10fd50e34c1723c40896c4.tar.gz
SOURCE_SUM=ff4808da7c4bbd886feeb03a74eee1cb235a7d4c9a20c16a37581fe10d55dd4b
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_EXTRACT=true

View file

@ -11,4 +11,4 @@ services = ["__APP__-jicofo","__APP__-videobridge"]
bind = "null"
ask.en = "Max memory to use for VM"
type = "number"
help = "One user consume about 1,5 Mib memory, for example if plan to have max 50 simultaneous users this parameter should be set to 75 mb"
help = "One user consume about 1,5 Mib memory ,with no user jitsi consume 120 MiB. For example if plan to have max 50 simultaneous users this parameter should be set to 200 mb"

View file

@ -6,7 +6,7 @@
"en": "Video conferencing web application",
"fr": "Application web de conférence vidéo"
},
"version": "1.0.5913~ynh2",
"version": "1.0.5913~ynh3",
"url": "https://jitsi.org/Projects/JitMeet",
"upstream": {
"license": "Apache-2.0",

View file

@ -7,6 +7,13 @@
# dependencies used by the app
pkg_dependencies="openjdk-8-jre-headless|openjdk-11-jre-headless debconf|debconf-2.0 procps uuid-runtime lua-ldap"
if [ $YNH_ARCH == "armhf" ]
then
pkg_dependencies_arm="automake autoconf build-essential libtool git maven m4"
pkg_dependencies="$pkg_dependencies $pkg_dependencies_arm"
pkg_extra_depedencies_arm="openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk openjdk-8-jdk-headless"
fi
#=================================================
# PERSONAL HELPERS
#=================================================
@ -16,6 +23,49 @@ ynh_version_gt ()
dpkg --compare-versions "$1" gt "$2"
}
ynh_jniwrapper_armhf ()
{
# set openjdk-8 as default
# update-alternatives --set java /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java
tempdir="$(mktemp -d)"
# prepare jniwrapper compilation
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-armhf
declare -A packages_arm
packages_arm[jitsi-sctp]="jitsi-sctp"
packages_arm[usrsctp]="jitsi-sctp/usrsctp/usrsctp"
for package_arm in "${!packages_arm[@]}"
do
ynh_setup_source --dest_dir="$tempdir/${packages_arm[$package_arm]}" --source_id=$package_arm
done
# needed to make compile works
if [ ! -d "$tempdir/jitsi-sctp/jniwrapper/native/src/main/resources/lib/linux-arm/" ]
then
mkdir -p $tempdir/jitsi-sctp/jniwrapper/native/src/main/resources/lib/linux-arm/
fi
pushd "$tempdir/jitsi-sctp"
mvn package -DbuildSctp -DbuildNativeWrapper -DdeployNewJnilib -DskipTests
mvn package
popd
# rm official jniwrapper to copy
original_jniwrapper=$(ls $final_path/jitsi-videobridge/lib/jniwrapper-native-*.jar)
ynh_secure_remove --file="$original_jniwrapper"
mv "$tempdir/jitsi-sctp/jniwrapper/native/target/jniwrapper-native-1.0-SNAPSHOT.jar" "$final_path/jitsi-videobridge/lib/"
chmod 640 "$final_path/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar"
chown -R $app:$app "$final_path/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar"
ynh_secure_remove --file="$tempdir"
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -42,7 +42,7 @@ focus_user="focus"
videobridge_user="jvb"
max_memory=75
max_memory=200 #125 mib with no user +1,5*50 users=75 mib
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
@ -99,6 +99,12 @@ ynh_app_setting_set --app=$app --key=port_component --value=$port_component
ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies
if [ $YNH_ARCH == "armhf" ]
then
ynh_script_progression --message="Installing specific arm dependencies..."
ynh_install_extra_app_dependencies --repo="deb http://security.debian.org/debian-security stretch/updates main" --package="$pkg_extra_depedencies_arm" --key="https://ftp-master.debian.org/keys/archive-key-9-security.asc"
fi
if ! yunohost app list | grep -q "prosody"
then
@ -214,6 +220,17 @@ ynh_add_config --template="../conf/jitsi-videobridge-sip-communicator.properties
ynh_add_config --template="../conf/jitsi-videobridge.config" --destination="/etc/$app/videobridge/config"
#=================================================
# REPLACE JNIWRAPPER FOR ARMHF ARCHITECTURE IN JITSI-VIDEOBRIDGE
#=================================================
if [ $YNH_ARCH == "armhf" ]
then
ynh_script_progression --message="Configuring jniwrapper for armhf ..."
ynh_jniwrapper_armhf
fi
#=================================================
# CONFIGURE JITSI-JICOFO
#=================================================
@ -265,8 +282,6 @@ ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files
chown -R $app: /etc/$app
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP LOGROTATE
#=================================================

View file

@ -82,7 +82,7 @@ fi
# If max_memory doesn't exist, create it and set to default 75 mb value
if [ -z "$max_memory" ]; then
max_memory=75
max_memory=200
ynh_app_setting_set --app=$app --key=max_memory --value=$max_memory
fi
@ -145,6 +145,12 @@ ynh_script_progression --message="Upgrading dependencies..."
ynh_install_app_dependencies $pkg_dependencies
if [ $YNH_ARCH == "armhf" ]
then
ynh_script_progression --message="Installing specific arm dependencies..."
ynh_install_extra_app_dependencies --repo="deb http://security.debian.org/debian-security stretch/updates main" --package="$pkg_extra_depedencies_arm" --key="https://ftp-master.debian.org/keys/archive-key-9-security.asc"
fi
if ! yunohost app list | grep -q "prosody"
then
yunohost tools update
@ -200,6 +206,18 @@ then
ynh_add_config --template="../conf/jitsi-videobridge.config" --destination="/etc/$app/videobridge/config"
fi
#=================================================
# REPLACE JNIWRAPPER FOR ARMHF ARCHITECTURE IN JITSI-VIDEOBRIDGE
#=================================================
if [ $YNH_ARCH == "armhf" ]
then
ynh_script_progression --message="Configuring jniwrapper for armhf ..."
ynh_jniwrapper_armhf
fi
#=================================================
# CONFIGURE JITSI-JICOFO
#=================================================