diff --git a/conf/roundcube-deps.control b/conf/roundcube-deps.control new file mode 100644 index 0000000..8b42827 --- /dev/null +++ b/conf/roundcube-deps.control @@ -0,0 +1,20 @@ +Section: misc +Priority: optional +Homepage: https://roundcube.net/ +Standards-Version: 3.9.2 + +Package: roundcube-deps +Version: 1.1.5-1 +Depends: php5-cli, php5-common, php5-intl, php5-json, php5-mcrypt + , php-pear, php-auth-sasl, php-mail-mime, php-patchwork-utf8 + , php-net-sieve, php-net-smtp, php-net-socket + , php-net-ldap2, php-net-ldap3, php-crypt-gpg +Architecture: all +Description: meta package for roundcube dependencies + RoundCube Webmail is a browser-based multilingual IMAP client with an + application-like user interface. It provides full functionality expected + from an e-mail client, including MIME support, address book, folder + manipulation and message filters. + . + . + This meta-package is only responsible of installing its dependencies. diff --git a/scripts/_common.sh b/scripts/_common.sh index 7e0feaf..4a69ba6 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,6 +5,9 @@ # Roundcube version VERSION=1.1.5 +# Package name for Roundcube dependencies +DEPS_PKG_NAME="roundcube-deps" + # Roundcube complete tarball checksum ROUNDCUBE_SOURCE_SHA256="ed50384c5ca0bcd9df08e1d0f2a46f2e7f468f583bcf410709f0a0659e00c453" diff --git a/scripts/install b/scripts/install index 4eab3e4..49ee240 100644 --- a/scripts/install +++ b/scripts/install @@ -31,6 +31,16 @@ DESTDIR="/var/www/$app" "The destination directory '$DESTDIR' already exists.\ You should safely delete it before installing this app." +# FIXME: jessie-backports is needed for php-net-ldap3 +grep -q -R 'jessie-backports' /etc/apt/sources.list{,.d} || { + echo "deb http://httpredir.debian.org/debian jessie-backports main" \ + | sudo tee -a /etc/apt/sources.list.d/backports.list >/dev/null +} + +# Install dependencies +ynh_package_install_from_equivs ../conf/${DEPS_PKG_NAME}.control \ + || ynh_die "Unable to install dependencies" + # Create tmp directory and install app inside TMPDIR=$(ynh_mkdir_tmp) extract_roundcube "$TMPDIR" diff --git a/scripts/remove b/scripts/remove index e88830b..ce4454e 100644 --- a/scripts/remove +++ b/scripts/remove @@ -26,3 +26,6 @@ sudo rm -f "/etc/php5/fpm/pool.d/${app}.conf" # Reload services sudo service php5-fpm restart || true sudo service nginx reload || true + +# Remove app dependencies +ynh_package_autoremove "$DEPS_PKG_NAME" || true diff --git a/scripts/upgrade b/scripts/upgrade index 135e669..f2de8cb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,6 +29,16 @@ DESTDIR="/var/www/$app" "The destination directory '$DESTDIR' does not exist.\ The app is not correctly installed, you should remove it first." +# FIXME: jessie-backports is needed for php-net-ldap3 +grep -q -R 'jessie-backports' /etc/apt/sources.list{,.d} || { + echo "deb http://httpredir.debian.org/debian jessie-backports main" \ + | sudo tee -a /etc/apt/sources.list.d/backports.list >/dev/null +} + +# Install dependencies +ynh_package_install_from_equivs ../conf/${DEPS_PKG_NAME}.control \ + || ynh_die "Unable to install dependencies" + # Create tmp directory and install app inside TMPDIR=$(ynh_mkdir_tmp) extract_roundcube "$TMPDIR" @@ -55,7 +65,6 @@ sudo chown -R www-data: "$DESTDIR" # Check if dependencies need to be updated with composer if [[ -f ${DESTDIR}/composer.json ]]; then - # TODO: update new Roundcube dependencies versions exec_composer www-data "$DESTDIR" update --no-dev else init_composer "$DESTDIR" www-data diff --git a/sources/composer.json-dist b/sources/composer.json-dist index b5af2a5..8656ba1 100644 --- a/sources/composer.json-dist +++ b/sources/composer.json-dist @@ -3,31 +3,13 @@ "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": { - "php": ">=5.3.7", - "pear-pear.php.net/net_socket": "~1.0.12", - "pear-pear.php.net/auth_sasl": "~1.0.6", - "pear-pear.php.net/net_idna2": "~0.1.1", - "pear-pear.php.net/net_sieve": "~1.3.4", - "pear-pear.php.net/mail_mime": "~1.9.0", - "pear-pear.php.net/net_smtp": "~1.7.1", - "patchwork/utf8": "~1.2.3", - "roundcube/plugin-installer": "dev-master", - "pear-pear.php.net/net_ldap2": "~2.1.0", - "kolab/net_ldap3": "dev-master" + "roundcube/plugin-installer": "dev-master" }, "minimum-stability": "dev" }