1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/collabora_ynh.git synced 2024-09-03 18:16:25 +02:00

Use ynh_install_extra_app_dep to manage the custom source.list

This commit is contained in:
Alexandre Aubin 2020-07-01 17:36:52 +02:00
parent 03b6f0d80b
commit 38dd4d0884
4 changed files with 17 additions and 41 deletions

View file

@ -6,7 +6,7 @@
"en": "A LibreOffice-based online office suite with collaborative editing",
"fr": "Une suite office en ligne et collaborative, basée sur LibreOffice"
},
"version": "4.0.0~ynh1",
"version": "4.0.0~ynh2",
"url": "https://www.libreoffice.org/download/libreoffice-online/",
"license": "MPL-2.0",
"maintainer": {
@ -15,7 +15,7 @@
"url": "https://collaboraoffice.com"
},
"requirements": {
"yunohost": ">= 3.5"
"yunohost": ">= 3.8.1"
},
"multi_instance": false,
"services": [
@ -32,9 +32,7 @@
},
"example": "example.com"
},
{
{
"name": "password",
"type": "password",
"ask": {
@ -44,7 +42,7 @@
"example": "password"
},
{
{
"name": "nextcloud_domain",
"type": "string",
"ask": {
@ -54,7 +52,7 @@
"example": "example.com",
"default": ""
}
}
]

View file

@ -63,18 +63,11 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#===============================================
# ADD COLLABORA REPOSITORY
#===============================================
ynh_print_info --message="Add Collabora repository..."
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .)
echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" | tee -a /etc/apt/sources.list.d/collabora.list
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_print_info --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies
DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .)
ynh_install_extra_app_dependencies --repo="deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" --package="$pkg_dependencies" --key="https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D"
#=================================================
# NGINX CONFIGURATION

View file

@ -51,19 +51,11 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#===============================================
# ADD COLLABORA REPOSITORY
#===============================================
ynh_print_info --message="Add Collabora repository..."
ynh_print_info --message="Installing dependencies..."
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .)
echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" | tee -a /etc/apt/sources.list.d/collabora.list
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_print_info --message="Reinstalling dependencies..."
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
ynh_install_extra_app_dependencies --repo="deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" --package="$pkg_dependencies" --key="https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D"
#=================================================
# RESTORE CONFIGURATION

View file

@ -74,21 +74,14 @@ ynh_print_info --message="Upgrading nginx web server configuration..."
# Create a dedicated nginx config
ynh_add_nginx_config
#===============================================
# ADD COLLABORA REPOSITORY
#===============================================
ynh_print_info --message="Add Collabora repository..."
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .)
echo "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" | tee -a /etc/apt/sources.list.d/collabora.list
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_print_info --message="Upgrading dependencies..."
ynh_install_app_dependencies $pkg_dependencies
DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .)
ynh_install_extra_app_dependencies --repo="deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./" --package="$pkg_dependencies" --key="https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D"
#=================================================
# SPECIFIC UPGRADE