diff --git a/conf/arm64.src b/conf/arm64.src new file mode 100644 index 0000000..66cba76 --- /dev/null +++ b/conf/arm64.src @@ -0,0 +1,7 @@ +SOURCE_URL=url of app's source +SOURCE_SUM=sha256 checksum +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.gz +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= +SOURCE_EXTRACT=true \ No newline at end of file diff --git a/conf/systemd.service b/conf/systemd.service index cc2d126..ddc546d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Galene: videoconferencing server +Description=Galène: videoconferencing server After=network.target [Service] @@ -11,4 +11,4 @@ ExecStart=__FINALPATH__/galene LimitNOFILE=65536 [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/conf/x86-64.src b/conf/x86-64.src new file mode 100644 index 0000000..66cba76 --- /dev/null +++ b/conf/x86-64.src @@ -0,0 +1,7 @@ +SOURCE_URL=url of app's source +SOURCE_SUM=sha256 checksum +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.gz +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= +SOURCE_EXTRACT=true \ No newline at end of file diff --git a/scripts/_common.sh b/scripts/_common.sh index ecd263f..52781d8 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -18,3 +18,22 @@ pkg_dependencies="" #================================================= # FUTURE OFFICIAL HELPERS #================================================= + +# Check the architecture +# +# example: architecture=$(ynh_detect_arch) +# +# usage: ynh_detect_arch +# +# Requires YunoHost version 2.2.4 or higher. +ynh_detect_arch(){ + local architecture + if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then + architecture="arm64" + elif [ -n "$(uname -m | grep 64)" ]; then + architecture="x86-64" + else + architecture="unknown" + fi + echo $architecture +} \ No newline at end of file diff --git a/scripts/backup b/scripts/backup index 95950f9..94a5224 100755 --- a/scripts/backup +++ b/scripts/backup @@ -6,7 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -15,8 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/install b/scripts/install index fcf5a1b..2571d75 100755 --- a/scripts/install +++ b/scripts/install @@ -14,8 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -30,6 +29,7 @@ admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC password=$YNH_APP_ARG_PASSWORD group_name=$YNH_APP_ARG_GROUP_NAME +architecture=$(ynh_detect_arch) app=$YNH_APP_INSTANCE_NAME @@ -83,9 +83,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1 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" -mkdir -p $final_path -cp -R ../sources_2/* $final_path/ +ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" #================================================= # CREATE A SERVER CERTIFICATE diff --git a/scripts/restore b/scripts/restore index f46aaba..43e1834 100755 --- a/scripts/restore +++ b/scripts/restore @@ -15,8 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - #### Remove this function if there's nothing to clean before calling the remove script. - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors