mirror of
https://github.com/YunoHost-Apps/weblate_ynh.git
synced 2024-10-01 13:35:04 +02:00
Fix #58
This commit is contained in:
parent
51b2378b16
commit
9e49defa24
5 changed files with 61 additions and 2 deletions
7
conf/libxxhash.src
Normal file
7
conf/libxxhash.src
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
SOURCE_URL=https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.1.tar.gz
|
||||||
|
SOURCE_SUM=3bb6b7d6f30c591dd65aaaff1c8b7a5b94d81687998ca9400082c739a690436c
|
||||||
|
SOURCE_SUM_PRG=sha256sum
|
||||||
|
SOURCE_FORMAT=tar.gz
|
||||||
|
SOURCE_IN_SUBDIR=true
|
||||||
|
SOURCE_FILENAME=
|
||||||
|
SOURCE_EXTRACT=true
|
|
@ -112,6 +112,19 @@ ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
|
#=================================================
|
||||||
|
# INSTALL XXHASH
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Installing xxHash..."
|
||||||
|
|
||||||
|
tempdir="$(mktemp -d)"
|
||||||
|
ynh_setup_source --dest_dir=$tempdir --source_id="libxxhash"
|
||||||
|
pushd $tempdir
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
ynh_secure_remove --file="$tempdir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE HUB
|
# CONFIGURE HUB
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -139,7 +152,7 @@ chown -R $app: "$final_path"
|
||||||
set -o nounset
|
set -o nounset
|
||||||
cd "${final_path}"
|
cd "${final_path}"
|
||||||
|
|
||||||
sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel pkgconfig
|
sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel pkgconfig xxhash
|
||||||
|
|
||||||
# Read the "Note" section in https://docs.weblate.org/en/weblate-4.11/admin/install/venv-debian.html#python-modules
|
# Read the "Note" section in https://docs.weblate.org/en/weblate-4.11/admin/install/venv-debian.html#python-modules
|
||||||
sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi
|
sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi
|
||||||
|
|
|
@ -90,6 +90,19 @@ ynh_script_progression --message="Removing dependencies..." --weight=10
|
||||||
# Remove metapackage and its dependencies
|
# Remove metapackage and its dependencies
|
||||||
ynh_exec_warn_less ynh_remove_app_dependencies
|
ynh_exec_warn_less ynh_remove_app_dependencies
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE XXHASH
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing xxHash..."
|
||||||
|
|
||||||
|
tempdir="$(mktemp -d)"
|
||||||
|
ynh_setup_source --dest_dir=$tempdir --source_id="libxxhash"
|
||||||
|
pushd $tempdir
|
||||||
|
make
|
||||||
|
make uninstall
|
||||||
|
popd
|
||||||
|
ynh_secure_remove --file="$tempdir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC REMOVE
|
# SPECIFIC REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -95,6 +95,19 @@ ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||||
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
|
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
|
||||||
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL XXHASH
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Installing xxHash..."
|
||||||
|
|
||||||
|
tempdir="$(mktemp -d)"
|
||||||
|
ynh_setup_source --dest_dir=$tempdir --source_id="libxxhash"
|
||||||
|
pushd $tempdir
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
ynh_secure_remove --file="$tempdir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE VARIOUS FILES
|
# RESTORE VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -113,6 +113,19 @@ ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
|
#=================================================
|
||||||
|
# INSTALL XXHASH
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Installing xxHash..."
|
||||||
|
|
||||||
|
tempdir="$(mktemp -d)"
|
||||||
|
ynh_setup_source --dest_dir=$tempdir --source_id="libxxhash"
|
||||||
|
pushd $tempdir
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
ynh_secure_remove --file="$tempdir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE HUB
|
# CONFIGURE HUB
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -165,7 +178,7 @@ upgrade() {
|
||||||
set -o nounset
|
set -o nounset
|
||||||
cd "${final_path}"
|
cd "${final_path}"
|
||||||
|
|
||||||
sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel pkgconfig
|
sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel pkgconfig xxhash
|
||||||
|
|
||||||
# Read the "Note" section in https://docs.weblate.org/en/weblate-4.11/admin/install/venv-debian.html#python-modules
|
# Read the "Note" section in https://docs.weblate.org/en/weblate-4.11/admin/install/venv-debian.html#python-modules
|
||||||
sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi
|
sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi
|
||||||
|
|
Loading…
Reference in a new issue