1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/roundcube_ynh.git synced 2024-09-03 20:16:28 +02:00

[fix] Rely on debian packages for PEAR dependencies

This commit is contained in:
Jérôme Lebleu 2016-05-17 13:15:38 +02:00
parent 1a498d69e5
commit 53e7356e0b
6 changed files with 47 additions and 20 deletions

View file

@ -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.

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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"
}