Add arm64 support

This commit is contained in:
Josué Tille 2021-03-06 09:49:36 +01:00
parent dcdbd5e2b5
commit 05e2a99c15
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
6 changed files with 49 additions and 13 deletions

11
conf/arm64.src Normal file
View file

@ -0,0 +1,11 @@
SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v7.1.5/seafile-server-7.1.5-buster-armv7.tar.gz
SOURCE_SUM=4baec21c1acaec6f50c7a1b229a728417d8fbf87fe3be98f128bc9d2ad399681
# (Optional) Program to check the integrity (sha256sum, md5sum...)
# default: sha256
SOURCE_SUM_PRG=sha256sum
# (Optional) Archive format
# default: tar.gz
SOURCE_FORMAT=tar.gz
# (Optional) Put false if sources are directly in the archive root
# default: true
SOURCE_IN_SUBDIR=true

11
conf/arm64_7_0.src Normal file
View file

@ -0,0 +1,11 @@
SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v7.0.5/seafile-server_7.0.5_stable_pi.tar.gz
SOURCE_SUM=dae9ab5d232a2b56f129aa29e7e54d2de05d838f0479955543cebcb14c9417db
# (Optional) Program to check the integrity (sha256sum, md5sum...)
# default: sha256
SOURCE_SUM_PRG=sha256sum
# (Optional) Archive format
# default: tar.gz
SOURCE_FORMAT=tar.gz
# (Optional) Put false if sources are directly in the archive root
# default: true
SOURCE_IN_SUBDIR=true

View file

@ -1,16 +1,27 @@
# Detect the system architecture to download the right tarball
# NOTE: `uname -m` is more accurate and universal than `arch`
# See https://en.wikipedia.org/wiki/Uname
if [ -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 --message "Unable to detect your achitecture, please open a bug describing \
your hardware and the result of the command \"uname -m\"." 1
fi
# 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
}
# Add swap

View file

@ -27,6 +27,7 @@ final_path=/opt/yunohost/$app
seafile_user=$app
admin_password=$YNH_APP_ARG_ADMIN_PASSWORD
seafile_version=$(ynh_app_upstream_version)
architecture=$(ynh_detect_arch)
# Create special path with / at the end
if [[ $path_url == '/' ]]

View file

@ -23,6 +23,7 @@ seafile_data=/home/yunohost.app/seafile-data
db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd)
final_path=$(ynh_app_setting_get --app $app --key final_path)
seafile_user=$app
architecture=$(ynh_detect_arch)
# Check domain/path availability
ynh_webpath_available --domain $domain --path_url $path_url || ynh_die --message "$domain/$path_url is not available, please use an other domain or path."

View file

@ -27,6 +27,7 @@ seafile_user=$app
seafile_data=/home/yunohost.app/seafile-data
installed_version=${YNH_APP_CURRENT_VERSION/~ynh*/}
seafile_version=$(ynh_app_upstream_version)
architecture=$(ynh_detect_arch)
if [ "$YNH_APP_CURRENT_VERSION" == '-' ]; then
YNH_APP_CURRENT_VERSION="6.0.9~ynh0"