mirror of
https://github.com/YunoHost-Apps/listmonk_ynh.git
synced 2024-09-03 19:36:15 +02:00
build all archs
This commit is contained in:
parent
5e9462de37
commit
133ff32455
3 changed files with 38 additions and 55 deletions
|
@ -46,13 +46,8 @@ ram.runtime = "50M"
|
||||||
[resources.sources]
|
[resources.sources]
|
||||||
|
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
amd64.url = "https://github.com/knadh/listmonk/releases/download/v2.4.0/listmonk_2.4.0_linux_amd64.tar.gz"
|
url = "https://github.com/knadh/listmonk/archive/refs/tags/v2.4.0.tar.gz"
|
||||||
amd64.sha256 = "acdfd0f4549c15e3cd77a28778ac9904cc54abf3bec98074ee96edc64242971b"
|
sha256 = "0a1fb22b485369fd47e8f19830e41c4fe5f6cf839f701fac0f6500071968faf8"
|
||||||
armhf.url = "https://github.com/knadh/listmonk/archive/refs/tags/v2.4.0.tar.gz"
|
|
||||||
armhf.sha256 = "0a1fb22b485369fd47e8f19830e41c4fe5f6cf839f701fac0f6500071968faf8"
|
|
||||||
arm64.url = "https://github.com/knadh/listmonk/archive/refs/tags/v2.4.0.tar.gz"
|
|
||||||
arm64.sha256 = "0a1fb22b485369fd47e8f19830e41c4fe5f6cf839f701fac0f6500071968faf8"
|
|
||||||
in_subdir = false
|
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
||||||
|
|
|
@ -27,14 +27,11 @@ ynh_app_setting_set --app=$app --key=password --value="$password"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing dependencies..." --weight=12
|
ynh_script_progression --message="Installing dependencies..." --weight=12
|
||||||
|
|
||||||
if [ $YNH_ARCH == "armhf" ] || [ $YNH_ARCH == "arm64" ]
|
# Install Nodejs
|
||||||
then
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
# Install Nodejs
|
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
|
||||||
|
|
||||||
# Install Go
|
# Install Go
|
||||||
ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION
|
ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -42,24 +39,20 @@ fi
|
||||||
ynh_script_progression --message="Setting up source files..." --weight=3
|
ynh_script_progression --message="Setting up source files..." --weight=3
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
if [ $YNH_ARCH == "armhf" ] || [ $YNH_ARCH == "arm64" ]
|
ynh_setup_source --dest_dir="$install_dir/build"
|
||||||
then
|
pushd "$install_dir/build"
|
||||||
ynh_setup_source --dest_dir="$install_dir/build"
|
# Build the sources
|
||||||
pushd "$install_dir/build"
|
ynh_use_go
|
||||||
# Build the sources
|
export GOPATH="$install_dir/build/go"
|
||||||
ynh_use_go
|
export GOCACHE="$install_dir/build/.cache"
|
||||||
export GOPATH="$install_dir/build/go"
|
ynh_use_nodejs
|
||||||
export GOCACHE="$install_dir/build/.cache"
|
make dist
|
||||||
ynh_use_nodejs
|
mv listmonk ..
|
||||||
make dist
|
popd
|
||||||
mv listmonk ..
|
|
||||||
popd
|
ynh_remove_go
|
||||||
ynh_remove_go
|
ynh_remove_nodejs
|
||||||
ynh_remove_nodejs
|
ynh_secure_remove --file="$install_dir/build"
|
||||||
ynh_secure_remove --file="$install_dir/build"
|
|
||||||
else
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
|
@ -34,28 +34,23 @@ then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
if [ $YNH_ARCH == "armhf" ] || [ $YNH_ARCH == "arm64" ]
|
ynh_setup_source --dest_dir="$install_dir/build" --keep="$install_dir/config.toml"
|
||||||
then
|
# Install Nodejs
|
||||||
ynh_setup_source --dest_dir="$install_dir/build" --keep="$install_dir/config.toml"
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
# Install Nodejs
|
# Install Go
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION
|
||||||
# Install Go
|
pushd "$install_dir/build"
|
||||||
ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION
|
# Build the sources
|
||||||
pushd "$install_dir/build"
|
ynh_use_go
|
||||||
# Build the sources
|
export GOPATH="$install_dir/build/go"
|
||||||
ynh_use_go
|
export GOCACHE="$install_dir/build/.cache"
|
||||||
export GOPATH="$install_dir/build/go"
|
ynh_use_nodejs
|
||||||
export GOCACHE="$install_dir/build/.cache"
|
make dist
|
||||||
ynh_use_nodejs
|
mv listmonk ..
|
||||||
make dist
|
popd
|
||||||
mv listmonk ..
|
ynh_remove_go
|
||||||
popd
|
ynh_remove_nodejs
|
||||||
ynh_remove_go
|
ynh_secure_remove --file="$install_dir/build"
|
||||||
ynh_remove_nodejs
|
|
||||||
ynh_secure_remove --file="$install_dir/build"
|
|
||||||
else
|
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep="$install_dir/config.toml"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
|
|
Loading…
Add table
Reference in a new issue