diff --git a/scripts/_common.sh b/scripts/_common.sh index 6a694d0..70a4873 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,10 +6,10 @@ VERSION=1.1.4 # Roundcube complete tarball checksum -ROUNDCUBE_COMPLETE_MD5="260686b4894896744bffa2d8bb259995" +ROUNDCUBE_SOURCE_MD5="051c0a07e744006c57fab7a5db79b5bc" # Remote URL to fetch Roundcube complete tarball -ROUNDCUBE_COMPLETE_URL="https://downloads.sourceforge.net/project/roundcubemail/roundcubemail/${VERSION}/roundcubemail-${VERSION}-complete.tar.gz" +ROUNDCUBE_SOURCE_URL="https://downloads.sourceforge.net/project/roundcubemail/roundcubemail/${VERSION}/roundcubemail-${VERSION}.tar.gz" # App package root directory should be the parent folder PKGDIR=$(cd ../; pwd) @@ -32,9 +32,9 @@ extract_roundcube() { # retrieve and extract Roundcube tarball rc_tarball="${DESTDIR}/roundcube.tar.gz" - wget -q -O "$rc_tarball" "$ROUNDCUBE_COMPLETE_URL" \ + wget -q -O "$rc_tarball" "$ROUNDCUBE_SOURCE_URL" \ || die "Unable to download Roundcube tarball" - echo "$ROUNDCUBE_COMPLETE_MD5 $rc_tarball" | md5sum -c >/dev/null \ + echo "$ROUNDCUBE_SOURCE_MD5 $rc_tarball" | md5sum -c >/dev/null \ || die "Invalid checksum of downloaded tarball" tar xf "$rc_tarball" -C "$DESTDIR" --strip-components 1 \ || die "Unable to extract Roundcube tarball" diff --git a/scripts/install b/scripts/install index 6826433..ac8f758 100644 --- a/scripts/install +++ b/scripts/install @@ -61,8 +61,9 @@ sudo chown -R www-data: "${DESTDIR}/plugins/ldapAliasSync" installed_plugins=" 'ldapAliasSync'," # Install additional plugins -exec_composer www-data "$DESTDIR" require "johndoh/contextmenu dev-release-2.1" -exec_composer www-data "$DESTDIR" require "sblaisot/automatic_addressbook" +exec_composer www-data "$DESTDIR" require \ + "johndoh/contextmenu dev-release-2.1" \ + "sblaisot/automatic_addressbook" installed_plugins+=" 'contextmenu', 'automatic_addressbook'," # Update Roundcube configuration diff --git a/scripts/upgrade b/scripts/upgrade index 33d86a8..37b6ce0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,15 +29,6 @@ DESTDIR="/var/www/$app" TMPDIR=$(ynh_mkdir_tmp) extract_roundcube "$TMPDIR" -# Check if composer is already used -if [[ -f ${DESTDIR}/composer.json ]]; then - # FIXME: Keep the installed roundcube plugin-installer and so installed.json - # composer file since 0.1.7 shipped version is buggy - cp -a "${DESTDIR}/vendor/composer/installed.json" "${TMPDIR}/vendor/composer" - cp -a "${DESTDIR}/vendor/roundcube/plugin-installer" \ - "${TMPDIR}/vendor/roundcube" -fi - # Install the new Roundcube version sudo php "${TMPDIR}/bin/installto.sh" "$DESTDIR" --force --accept \ || die "Unable to update Roundcube installation" @@ -73,8 +64,9 @@ sudo chown -R www-data: "${DESTDIR}/plugins/ldapAliasSync" installed_plugins=" 'ldapAliasSync'," # Update or install additional plugins -exec_composer www-data "$DESTDIR" require "johndoh/contextmenu dev-release-2.1" -exec_composer www-data "$DESTDIR" require "sblaisot/automatic_addressbook" +exec_composer www-data "$DESTDIR" require \ + "johndoh/contextmenu dev-release-2.1" \ + "sblaisot/automatic_addressbook" installed_plugins+=" 'contextmenu', 'automatic_addressbook'," # Update Roundcube configuration diff --git a/sources/composer.json-dist b/sources/composer.json-dist index 6b687b5..2b95243 100644 --- a/sources/composer.json-dist +++ b/sources/composer.json-dist @@ -3,9 +3,17 @@ "description": "The Roundcube Webmail suite", "license": "GPL-3.0+", "repositories": [ + { + "type": "pear", + "url": "https://pear.php.net/" + }, { "type": "composer", "url": "https://plugins.roundcube.net/" + }, + { + "type": "vcs", + "url": "https://git.kolab.org/diffusion/PNL/php-net_ldap.git" } ], "require": {