From aa06cfa0a31fa2f4b9be4363869faa505e8b2c9d Mon Sep 17 00:00:00 2001 From: rosbeef andino Date: Tue, 12 Apr 2022 23:14:43 -0400 Subject: [PATCH] add install support for armv7l i can not test for armv7h --- scripts/install | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/scripts/install b/scripts/install index 102e153..794c083 100644 --- a/scripts/install +++ b/scripts/install @@ -126,6 +126,46 @@ gpasswd --add www-data $app #================================================= ynh_script_progression --message="Setting up source files..." +if [ $(uname -m) == "armv7l" ] +then + # prepare openjdk8 installation + mkdir /tmp/jitsi-install/ + cd /tmp/jitsi-install/ + + #install openjdk 8 because javah is used by jitsi and not supported in higher versions + wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jre_8u322-b06-1~deb9u1_armhf.deb + wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jre-headless_8u322-b06-1~deb9u1_armhf.deb + wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jdk_8u322-b06-1~deb9u1_armhf.deb + wget http://security.debian.org/debian-security/pool/updates/main/o/openjdk-8/openjdk-8-jdk-headless_8u322-b06-1~deb9u1_armhf.deb + + sudo apt install \ + ./openjdk-8-jre_8u322-b06-1~deb9u1_armhf.deb \ + ./openjdk-8-jre-headless_8u322-b06-1~deb9u1_armhf.deb \ + ./openjdk-8-jdk_8u322-b06-1~deb9u1_armhf.deb \ + ./openjdk-8-jdk-headless_8u322-b06-1~deb9u1_armhf.deb + + # ser openjdk as default + sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java + + # stop related services if exist + sudo systemctl stop prosody jitsi-videobridge jitsi-jicofo + + # prepare jniwrapper comppilation + export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-armhf + sudo apt update + sudo apt install automake autoconf build-essential libtool git maven m4 + git clone https://github.com/sctplab/usrsctp.git + git clone https://github.com/jitsi/jitsi-sctp + mv ./usrsctp ./jitsi-sctp/usrsctp/ + cd ./jitsi-sctp + # needed to make compile works + mkdir -p ./jniwrapper/native/src/main/resources/lib/linux-arm/ + + # compile + mvn package -DbuildSctp -DbuildNativeWrapper -DdeployNewJnilib -DskipTests + mvn package +fi + ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src declare -A packages @@ -146,6 +186,15 @@ do ynh_secure_remove --file="$final_path/${package}_temp" done +if [ $(uname -m) == "armv7l" ] +then + # rm official jniwrapper to copy + rm "$final_path/jitsi-videobridge/lib/jniwrapper-native-1.0-*" + cp "./jniwrapper/native/target/jniwrapper-native-1.0-SNAPSHOT.jar" "$final_path/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar" + chmod 640 jniwrapper-native-1.0-SNAPSHOT.jar + chown $app:$app jniwrapper-native-1.0-SNAPSHOT.jar +fi + ynh_setup_source --dest_dir="$final_path/jitsi-meet-prosody" --source_id=mod_auth_ldap chmod 750 "$final_path"