1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/libreerp_ynh.git synced 2024-09-03 19:36:13 +02:00

[fix] Missing backports and othe python3 dependencies

This commit is contained in:
ljf 2018-05-21 12:02:01 +02:00
parent 19e965c235
commit 4723c5c67a
2 changed files with 33 additions and 3 deletions

View file

@ -7,7 +7,11 @@ APPNAME="odoo"
function define_paths() {
# In odoo 10 some file change
if [ $(echo "$odoo_version >= 10" | bc) -ne 0 ]; then
export source_path=/usr/lib/python2.7/dist-packages/odoo/
if [ $(echo "$odoo_version >= 11" | bc) -ne 0 ]; then
export source_path=/usr/lib/python3/dist-packages/odoo/
else
export source_path=/usr/lib/python2.7/dist-packages/odoo/
fi
export conf_file=/etc/odoo/odoo.conf
bin_file=/usr/bin/odoo
else
@ -78,9 +82,13 @@ function install_dependencies() {
# TODO if 8.0 install https://www.odoo.com/apps/modules/8.0/shell/
fi
if is_jessie ; then
sudo echo "deb http://http.debian.net/debian jessie-backports main" | sudo tee /etc/apt/sources.list.d/jessie-backport.list
fi
apt-get update
ynh_install_app_dependencies curl postgresql odoo xfonts-75dpi xfonts-base wkhtmltopdf node-less python-xlrd
ynh_install_app_dependencies curl postgresql odoo xfonts-75dpi xfonts-base wkhtmltopdf node-less python-xlrd python3-dev gcc libldap2-dev libssl-dev libsasl2-dev
pip3 install pyldap
if ! wkhtmltopdf --version | grep "wkhtmltopdf 0.12.4 (with patched qt)"; then
# The debian package has a bug so we deploy a more recent version
@ -113,7 +121,6 @@ function add_services() {
yunohost service stop odoo
yunohost service start odoo
yunohost service enable odoo
systemctl enable odoo
fi
}

View file

@ -203,3 +203,26 @@ exec_as() {
sudo sudo -u "$USER" "$@"
fi
}
ynh_debian_release () {
lsb_release --codename --short
}
is_stretch () {
if [ "$(ynh_debian_release)" == "stretch" ]
then
return 0
else
return 1
fi
}
is_jessie () {
if [ "$(ynh_debian_release)" == "jessie" ]
then
return 0
else
return 1
fi
}