diff --git a/README.md b/README.md index d4b6cb2..5f44ad8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Roundcube for YunoHost -[![Integration level](https://dash.yunohost.org/integration/roundcube.svg)](https://dash.yunohost.org/appci/app/roundcube) +[![Integration level](https://dash.yunohost.org/integration/roundcube.svg)](https://dash.yunohost.org/appci/app/roundcube) ![](https://ci-apps.yunohost.org/ci/badges/roundcube.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/roundcube.maintain.svg) [![Install Roundcube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=roundcube) > *This package allow you to install Roundcube quickly and simply on a YunoHost server. @@ -44,7 +44,7 @@ this package: corresponding and existing address book. #### Multi-users support -* Integrate with YunoHost users and SSO - i.e. logout button, YunoHost users +* Integrate with YunoHost users and SSO - i.e logout button, YunoHost users search #### Supported architectures diff --git a/scripts/_common.sh b/scripts/_common.sh index 218dae2..16d78b9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # Package dependencies -pkg_dependencies="php-cli php-common php-intl php-json php-mcrypt php-pear php-auth-sasl php-mail-mime php-patchwork-utf8 php-net-smtp php-net-socket php-net-ldap2 php-net-ldap3 php-zip php-gd php-mbstring php-curl" +pkg_dependencies="php-cli php-common php-intl php-json php-pear php-auth-sasl php-mail-mime php-patchwork-utf8 php-net-smtp php-net-socket php-zip php-gd php-mbstring php-curl" # Plugins version contextmenu_version=2.3 diff --git a/scripts/install b/scripts/install index 82334d0..38d9854 100644 --- a/scripts/install +++ b/scripts/install @@ -142,6 +142,9 @@ ynh_script_progression --message="Installing additional plugins..." --weight=60 # Create logs and temp directories mkdir -p "$final_path/"{logs,temp} +# Install net_LDAP +ynh_composer_exec --commands="require kolab/net_ldap3" + # Install contextmenu and automatic_addressbook plugins # https://plugins.roundcube.net/packages/sblaisot/automatic_addressbook # https://plugins.roundcube.net/packages/johndoh/contextmenu @@ -157,6 +160,7 @@ then ynh_composer_exec --commands="require roundcube/carddav $carddav_version" carddav_tmp_config="../conf/carddav.config.inc.php" + carddav_server=0 # Look for installed and supported CardDAV servers for carddav_app in "owncloud" "nextcloud" "baikal" @@ -165,6 +169,7 @@ then --output-as json | grep -Po '"id":[ ]?"\K.*?(?=")' | head -1) if [ -n "$carddav_app_id" ] then + carddav_server=1 # Retrieve app settings and enable relevant preset carddav_domain=$(ynh_app_setting_get --app=$carddav_app_id --key=domain) carddav_path=$(ynh_app_setting_get --app=$carddav_app_id --key=path) @@ -178,7 +183,11 @@ then # Copy the plugin configuration file cp "$carddav_tmp_config" ""$final_path/plugins/carddav/config.inc.php"" - installed_plugins+=" 'carddav'," + # Do not actualy add the carddav plugin if there's no carddav server available... + if [ $carddav_server -eq 1 ] + then + installed_plugins+=" 'carddav'," + fi fi # Install Enigma plugin diff --git a/scripts/upgrade b/scripts/upgrade index da248f8..748deb0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -184,6 +184,9 @@ then # Create logs and temp directories mkdir -p "$final_path/"{logs,temp} + # Install net_LDAP + ynh_composer_exec --commands="require kolab/net_ldap3" + # Update or install contextmenu and automatic_addressbook plugins # https://plugins.roundcube.net/packages/sblaisot/automatic_addressbook # https://plugins.roundcube.net/packages/johndoh/contextmenu @@ -199,6 +202,7 @@ then ynh_composer_exec --commands="require roundcube/carddav $carddav_version" carddav_tmp_config="../conf/carddav.config.inc.php" + carddav_server=0 # Look for installed and supported CardDAV servers for carddav_app in "owncloud" "nextcloud" "baikal" @@ -207,6 +211,7 @@ then --output-as json | grep -Po '"id":[ ]?"\K.*?(?=")' | head -1) if [ -n "$carddav_app_id" ] then + carddav_server=1 # Retrieve app settings and enable relevant preset carddav_domain=$(ynh_app_setting_get --app=$carddav_app_id --key=domain) carddav_path=$(ynh_app_setting_get --app=$carddav_app_id --key=path) @@ -220,7 +225,11 @@ then # Copy the plugin configuration file cp "$carddav_tmp_config" ""$final_path/plugins/carddav/config.inc.php"" - installed_plugins+=" 'carddav'," + # Do not actually add the carddav plugin if there's no carddav server available... + if [ $carddav_server -eq 1 ] + then + installed_plugins+=" 'carddav'," + fi fi # Install Enigma plugin