1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/discourse_ynh.git synced 2024-09-03 18:26:18 +02:00

Install oxipng, cleanup magick after install

This commit is contained in:
Félix Piédallu 2024-08-30 13:41:34 +02:00
parent 411a6be993
commit 255d41a0e7
4 changed files with 28 additions and 2 deletions

View file

@ -66,6 +66,18 @@ ram.runtime = "1G"
autoupdate.strategy = "latest_github_tag" autoupdate.strategy = "latest_github_tag"
autoupdate.upstream = "https://github.com/ImageMagick/ImageMagick" autoupdate.upstream = "https://github.com/ImageMagick/ImageMagick"
[resources.sources.oxipng]
amd64.url = "https://github.com/shssoichiro/oxipng/releases/download/v9.1.2/oxipng-9.1.2-x86_64-unknown-linux-gnu.tar.gz"
amd64.sha256 = "6d47453f623d7d12499e206fe089fe96d76bc6f01a00962b91e4ee3e6845e1a6"
arm64.url = "https://github.com/shssoichiro/oxipng/releases/download/v9.1.2/oxipng-9.1.2-aarch64-unknown-linux-gnu.tar.gz"
arm64.sha256 = "9716b3aba89e7ed9fa9fa07aef4867a7b65a9dd26516e6b16f8ae5a56006cafa"
autoupdate.strategy = "latest_github_release"
autoupdate.upstream = "https://github.com/shssoichiro/oxipng"
autoupdate.asset.amd64 = "^oxipng-.*-x86_64-unknown-linux-gnu\\.tar\\.gz$"
autoupdate.asset.arm64 = "^oxipng-.*-aarch64-unknown-linux-gnu\\.tar\\.gz$"
[resources.system_user] [resources.system_user]
[resources.install_dir] [resources.install_dir]

View file

@ -94,6 +94,14 @@ install_imagemagick() {
ynh_exec_as "$app" make all -j"$(nproc)" ynh_exec_as "$app" make all -j"$(nproc)"
ynh_exec_as "$app" LIBTOOLFLAGS=-Wnone make install ynh_exec_as "$app" LIBTOOLFLAGS=-Wnone make install
popd popd
ynh_secure_remove --file="$install_dir/imagemagick_source"
}
install_oxipng() {
ynh_setup_source --source_id="oxipng" --dest_dir="$install_dir/oxipng_source"
mkdir -p "$tools_prefix/bin"
mv "$install_dir/oxipng_source/oxipng" "$tools_prefix/bin/oxipng"
ynh_secure_remove --file="$install_dir/oxipng_source"
} }
ynh_maintenance_mode_ON () { ynh_maintenance_mode_ON () {

View file

@ -41,17 +41,18 @@ ynh_app_setting_set --app="$app" --key=unicorn_workers --value=$unicorn_workers
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
ynh_script_progression --message="Installing Ruby..." ynh_script_progression --message="Installing Ruby..."
ynh_exec_warn_less ynh_install_ruby --ruby_version="$ruby_version" ynh_exec_warn_less ynh_install_ruby --ruby_version="$ruby_version"
ynh_use_ruby ynh_use_ruby
ynh_script_progression --message="Installing NodeJS..." ynh_script_progression --message="Installing NodeJS..."
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_script_progression --message="Building and installing ImageMagick v7..." ynh_script_progression --message="Building and installing ImageMagick v7..."
install_imagemagick install_imagemagick
ynh_script_progression --message="Installing Oxipng..."
install_oxipng
#================================================= #=================================================
# CONFIGURE A POSTGRESQL DATABASE # CONFIGURE A POSTGRESQL DATABASE
#================================================= #=================================================

View file

@ -72,6 +72,11 @@ ynh_exec_warn_less ynh_install_ruby --ruby_version="$ruby_version"
ynh_script_progression --message="Upgrading NodeJS..." ynh_script_progression --message="Upgrading NodeJS..."
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_script_progression --message="Building and upgrading ImageMagick v7..."
install_imagemagick
ynh_script_progression --message="Upgrading Oxipng..."
install_oxipng
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================