diff --git a/conf/libxxhash.src b/conf/libxxhash.src new file mode 100644 index 0000000..5d4f0c6 --- /dev/null +++ b/conf/libxxhash.src @@ -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 diff --git a/scripts/install b/scripts/install index 0cbeb4c..f376c45 100755 --- a/scripts/install +++ b/scripts/install @@ -112,6 +112,19 @@ ynh_add_nginx_config #================================================= # 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 #================================================= @@ -139,7 +152,7 @@ chown -R $app: "$final_path" set -o nounset 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 sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi diff --git a/scripts/remove b/scripts/remove index e831757..40bb765 100755 --- a/scripts/remove +++ b/scripts/remove @@ -90,6 +90,19 @@ ynh_script_progression --message="Removing dependencies..." --weight=10 # Remove metapackage and its 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 #================================================= diff --git a/scripts/restore b/scripts/restore index fb55dac..79712aa 100755 --- a/scripts/restore +++ b/scripts/restore @@ -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_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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c1620c9..1d0351e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -113,6 +113,19 @@ ynh_add_nginx_config #================================================= # 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 #================================================= @@ -165,7 +178,7 @@ upgrade() { set -o nounset 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 sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi