mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
[fix] Install all dependencies with composer to ease the upgrade
This commit is contained in:
parent
a81b670579
commit
7d916856b9
4 changed files with 18 additions and 17 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Add table
Reference in a new issue