mirror of
https://github.com/YunoHost-Apps/writefreely_ynh.git
synced 2024-09-03 20:36:02 +02:00
Add arm support
This commit is contained in:
parent
14801bd4a0
commit
f40cb10dee
6 changed files with 41 additions and 20 deletions
6
conf/arm.src
Normal file
6
conf/arm.src
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.10.0/writefreely_0.10.0_linux_arm7.tar.gz
|
||||||
|
SOURCE_SUM=a746db116272d5ded74cd5556b56ed2f2c4f6af1785f44e6254b63adee0a7d92
|
||||||
|
SOURCE_SUM_PRG=sha256sum
|
||||||
|
SOURCE_FORMAT=tar.gz
|
||||||
|
SOURCE_IN_SUBDIR=false
|
||||||
|
SOURCE_FILENAME=
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.10.0/writefreely_0.10.0_linux_amd64.tar.gz
|
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.10.0/writefreely_0.10.0_linux_amd64.tar.gz
|
||||||
SOURCE_SUM=6dea841d2f81abd0569915011f183aa818a6f2750da1f953848e05bc49073f3d
|
SOURCE_SUM=11498cfc579b94326bdae0b61a992ba4ee3a0200a83920043c1d8ea3bdce8380
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=false
|
SOURCE_IN_SUBDIR=false
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
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 86)" ]; then
|
|
||||||
architecture="i386"
|
|
||||||
elif [ -n "$(uname -m | grep arm)" ]; then
|
|
||||||
architecture="arm"
|
|
||||||
else
|
|
||||||
ynh_die "Unable to detect your achitecture, please open a bug describing \
|
|
||||||
your hardware and the result of the command \"uname -m\"." 1
|
|
||||||
fi
|
|
|
@ -7,7 +7,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source detect_arch
|
source ynh_detect_arch__2
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -33,6 +33,8 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
single_user=$YNH_APP_ARG_SINGLE_USER
|
single_user=$YNH_APP_ARG_SINGLE_USER
|
||||||
|
|
||||||
|
architecture=$(ynh_detect_arch)
|
||||||
|
|
||||||
# Bypass package_checker name not compatible with writefreely
|
# Bypass package_checker name not compatible with writefreely
|
||||||
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
||||||
admin="test"
|
admin="test"
|
||||||
|
@ -45,10 +47,10 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Validating installation parameters..."
|
ynh_print_info --message="Validating installation parameters..."
|
||||||
|
|
||||||
# Check machine architecture (in particular, we don't support ARM and 32bit machines)
|
# Check machine architecture, we don't support 32bit machines
|
||||||
if [ $architecture == "x86_64" ] || [ $architecture == "arm" ]
|
if [ $architecture = "i386" ]
|
||||||
then
|
then
|
||||||
ynh_die --message="Sorry, but this app can only be installed on a x86, 64 bits machine :("
|
ynh_die --message="Sorry, but this app cannot be installed on a i386 32 bits machine :("
|
||||||
fi
|
fi
|
||||||
|
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source detect_arch
|
source ynh_detect_arch__2
|
||||||
source ynh_check_app_version_changed
|
source ynh_check_app_version_changed
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
|
|
||||||
|
architecture=$(ynh_detect_arch)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
25
scripts/ynh_detect_arch__2
Normal file
25
scripts/ynh_detect_arch__2
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# 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 86)" ]; then
|
||||||
|
architecture="i386"
|
||||||
|
elif [ -n "$(uname -m | grep arm)" ]; then
|
||||||
|
architecture="arm"
|
||||||
|
else
|
||||||
|
architecture="unknown"
|
||||||
|
fi
|
||||||
|
echo $architecture
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue