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
|
VERSION=1.1.4
|
||||||
|
|
||||||
# Roundcube complete tarball checksum
|
# Roundcube complete tarball checksum
|
||||||
ROUNDCUBE_COMPLETE_MD5="260686b4894896744bffa2d8bb259995"
|
ROUNDCUBE_SOURCE_MD5="051c0a07e744006c57fab7a5db79b5bc"
|
||||||
|
|
||||||
# Remote URL to fetch Roundcube complete tarball
|
# 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
|
# App package root directory should be the parent folder
|
||||||
PKGDIR=$(cd ../; pwd)
|
PKGDIR=$(cd ../; pwd)
|
||||||
|
@ -32,9 +32,9 @@ extract_roundcube() {
|
||||||
|
|
||||||
# retrieve and extract Roundcube tarball
|
# retrieve and extract Roundcube tarball
|
||||||
rc_tarball="${DESTDIR}/roundcube.tar.gz"
|
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"
|
|| 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"
|
|| die "Invalid checksum of downloaded tarball"
|
||||||
tar xf "$rc_tarball" -C "$DESTDIR" --strip-components 1 \
|
tar xf "$rc_tarball" -C "$DESTDIR" --strip-components 1 \
|
||||||
|| die "Unable to extract Roundcube tarball"
|
|| die "Unable to extract Roundcube tarball"
|
||||||
|
|
|
@ -61,8 +61,9 @@ sudo chown -R www-data: "${DESTDIR}/plugins/ldapAliasSync"
|
||||||
installed_plugins=" 'ldapAliasSync',"
|
installed_plugins=" 'ldapAliasSync',"
|
||||||
|
|
||||||
# Install additional plugins
|
# Install additional plugins
|
||||||
exec_composer www-data "$DESTDIR" require "johndoh/contextmenu dev-release-2.1"
|
exec_composer www-data "$DESTDIR" require \
|
||||||
exec_composer www-data "$DESTDIR" require "sblaisot/automatic_addressbook"
|
"johndoh/contextmenu dev-release-2.1" \
|
||||||
|
"sblaisot/automatic_addressbook"
|
||||||
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
||||||
|
|
||||||
# Update Roundcube configuration
|
# Update Roundcube configuration
|
||||||
|
|
|
@ -29,15 +29,6 @@ DESTDIR="/var/www/$app"
|
||||||
TMPDIR=$(ynh_mkdir_tmp)
|
TMPDIR=$(ynh_mkdir_tmp)
|
||||||
extract_roundcube "$TMPDIR"
|
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
|
# Install the new Roundcube version
|
||||||
sudo php "${TMPDIR}/bin/installto.sh" "$DESTDIR" --force --accept \
|
sudo php "${TMPDIR}/bin/installto.sh" "$DESTDIR" --force --accept \
|
||||||
|| die "Unable to update Roundcube installation"
|
|| die "Unable to update Roundcube installation"
|
||||||
|
@ -73,8 +64,9 @@ sudo chown -R www-data: "${DESTDIR}/plugins/ldapAliasSync"
|
||||||
installed_plugins=" 'ldapAliasSync',"
|
installed_plugins=" 'ldapAliasSync',"
|
||||||
|
|
||||||
# Update or install additional plugins
|
# Update or install additional plugins
|
||||||
exec_composer www-data "$DESTDIR" require "johndoh/contextmenu dev-release-2.1"
|
exec_composer www-data "$DESTDIR" require \
|
||||||
exec_composer www-data "$DESTDIR" require "sblaisot/automatic_addressbook"
|
"johndoh/contextmenu dev-release-2.1" \
|
||||||
|
"sblaisot/automatic_addressbook"
|
||||||
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
||||||
|
|
||||||
# Update Roundcube configuration
|
# Update Roundcube configuration
|
||||||
|
|
|
@ -3,9 +3,17 @@
|
||||||
"description": "The Roundcube Webmail suite",
|
"description": "The Roundcube Webmail suite",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"repositories": [
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "pear",
|
||||||
|
"url": "https://pear.php.net/"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "composer",
|
"type": "composer",
|
||||||
"url": "https://plugins.roundcube.net/"
|
"url": "https://plugins.roundcube.net/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://git.kolab.org/diffusion/PNL/php-net_ldap.git"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue