From 6f23679e9b5d829354d7fbe265f6f336126884c0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 1 Sep 2021 08:16:56 +0200 Subject: [PATCH] Upgrade package --- check_process | 8 ++--- conf/app.src | 4 +-- manifest.json | 2 +- scripts/_common.sh | 87 ++-------------------------------------------- 4 files changed, 10 insertions(+), 91 deletions(-) diff --git a/check_process b/check_process index 5990e26..51ee97e 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/ampache" (PATH) - admin="john" (USER) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/ampache" + admin="john" + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/conf/app.src b/conf/app.src index cc9961b..a896758 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ampache/ampache/archive/4.4.2.tar.gz -SOURCE_SUM=fadf5c9f9b6d59904979f3e109b7935c48fc2b8c04640a0503723cf31674bc99 +SOURCE_URL=https://github.com/ampache/ampache/archive/5.0.0.tar.gz +SOURCE_SUM=ed1deea622385b81e3d4078e7152f5b35489dcb148e64ee6e4a8a1289fc5c950 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index e72a894..b437658 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web based audio/video streaming application", "fr": "Application de streaming audio et vidéo" }, - "version": "4.4.2~ynh1", + "version": "5.0.0~ynh1", "url": "http://ampache.org", "license": "AGPL-3.0", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 981bf56..f6b73af 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,97 +9,16 @@ pkg_dependencies="libav-tools|ffmpeg" YNH_PHP_VERSION="7.3" +# Composer version +YNH_COMPOSER_VERSION="2.1.3" + extra_php_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-simplexml php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-ldap" #================================================= # EXPERIMENTAL HELPERS #================================================= -readonly YNH_DEFAULT_COMPOSER_VERSION=1.10.17 -# Declare the actual composer version to use. -# A packager willing to use another version of composer can override the variable into its _common.sh. -YNH_COMPOSER_VERSION=${YNH_COMPOSER_VERSION:-$YNH_DEFAULT_COMPOSER_VERSION} - -# Execute a command with Composer -# -# usage: ynh_composer_exec [--phpversion=phpversion] [--workdir=$final_path] --commands="commands" -# | arg: -v, --phpversion - PHP version to use with composer -# | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path. -# | arg: -c, --commands - Commands to execute. -ynh_composer_exec () { - # Declare an array to define the options of this helper. - local legacy_args=vwc - declare -Ar args_array=( [v]=phpversion= [w]=workdir= [c]=commands= ) - local phpversion - local workdir - local commands - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - workdir="${workdir:-$final_path}" - phpversion="${phpversion:-$YNH_PHP_VERSION}" - - COMPOSER_HOME="$workdir/.composer" \ - php${phpversion} "$workdir/composer.phar" $commands \ - -d "$workdir" --quiet --no-interaction -} - -# Install and initialize Composer in the given directory -# -# usage: ynh_install_composer [--phpversion=phpversion] [--workdir=$final_path] [--install_args="--optimize-autoloader"] [--composerversion=composerversion] -# | arg: -v, --phpversion - PHP version to use with composer -# | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path. -# | arg: -a, --install_args - Additional arguments provided to the composer install. Argument --no-dev already include -# | arg: -c, --composerversion - Composer version to install -ynh_install_composer () { - # Declare an array to define the options of this helper. - local legacy_args=vwa - declare -Ar args_array=( [v]=phpversion= [w]=workdir= [a]=install_args= [c]=composerversion=) - local phpversion - local workdir - local install_args - local composerversion - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - workdir="${workdir:-$final_path}" - phpversion="${phpversion:-$YNH_PHP_VERSION}" - install_args="${install_args:-}" - composerversion="${composerversion:-$YNH_COMPOSER_VERSION}" - - curl -sS https://getcomposer.org/installer \ - | COMPOSER_HOME="$workdir/.composer" \ - php${phpversion} -- --quiet --install-dir="$workdir" --version=$composerversion \ - || ynh_die "Unable to install Composer." - - # update dependencies to create composer.lock - ynh_composer_exec --phpversion="${phpversion}" --workdir="$workdir" --commands="install --no-dev $install_args" \ - || ynh_die "Unable to update core dependencies with Composer." -} - #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Install or update the main directory yunohost.multimedia -# -# usage: ynh_multimedia_build_main_dir -ynh_multimedia_build_main_dir () { - local ynh_media_release="v1.2" - local checksum="806a827ba1902d6911095602a9221181" - - # Download yunohost.multimedia scripts - wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz 2>&1 - - # Check the control sum - echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \ - || ynh_die "Corrupt source" - - # Check if the package acl is installed. Or install it. - ynh_package_is_installed 'acl' \ - || ynh_package_install acl - - # Extract - mkdir yunohost.multimedia-master - tar -xf ${ynh_media_release}.tar.gz -C yunohost.multimedia-master --strip-components 1 - ./yunohost.multimedia-master/script/ynh_media_build.sh -}