1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00

Add ARM sources

This commit is contained in:
ericgaspar 2021-01-12 09:25:41 +01:00
parent 7586f58759
commit 1ca62a2ec1
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 43 additions and 2 deletions

6
conf/arm.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v5.30.1/mattermost-v5.30.1-linux-arm.tar.gz
SOURCE_SUM=2292157939eb5be0ac5e1d58bc690d8f359040f1ae55f37f1f90cab422d11e2d
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=mattermost-v5.30.1-linux-arm.tar.gz

6
conf/arm64.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v5.30.1/mattermost-v5.30.1-linux-arm64.tar.gz
SOURCE_SUM=cbd150100947686c2d177db6067e98a36859e7da2fe4c173b89925a2fd1415d1
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=mattermost-5.30.1-linux-amd64.tar.gz

View file

@ -12,6 +12,33 @@
# EXPERIMENTAL 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"
elif [ -n "$(uname -m | grep armv7)" ]; then
architecture="arm"
elif [ -n "$(uname -m | grep armv6)" ]; then
architecture="arm"
elif [ -n "$(uname -m | grep armv5)" ]; then
architecture="arm"
else
architecture="unknown"
fi
echo $architecture
}
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================

View file

@ -31,6 +31,7 @@ email=$(ynh_user_get_info "$admin" mail)
password=$YNH_APP_ARG_PASSWORD
language=$YNH_APP_ARG_LANGUAGE
team_display_name=$YNH_APP_ARG_TEAM_DISPLAY_NAME
architecture=$(ynh_detect_arch)
app=$YNH_APP_INSTANCE_NAME
@ -93,7 +94,7 @@ 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"
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
#=================================================
# CREATE DIRECTORY FOR DATA

View file

@ -33,6 +33,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
language=$(ynh_app_setting_get --app=$app --key=language)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
architecture=$(ynh_detect_arch)
#=================================================
# CHECK VERSION
@ -100,7 +101,7 @@ then
ynh_secure_remove --file="$final_path"
# 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" --source_id="$architecture"
# Copy the admin saved settings from tmp directory to final path
cp -a "$tmpdir/config.json" "$final_path/config/config.json"