summaryrefslogtreecommitdiff
path: root/install/ishtar-install
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-02-25 14:59:07 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-04-24 19:38:57 +0200
commita3cfba27310530c4552eff14bd43b23f9d99c53a (patch)
treea8afb231d18525cea63efe2679fcec409ca076c2 /install/ishtar-install
parent93b3a9c5efe0d066a2a103895afd2da9cb0acf58 (diff)
downloadIshtar-a3cfba27310530c4552eff14bd43b23f9d99c53a.tar.bz2
Ishtar-a3cfba27310530c4552eff14bd43b23f9d99c53a.zip
Prepare the use of libreoffice UNO
Diffstat (limited to 'install/ishtar-install')
-rwxr-xr-xinstall/ishtar-install90
1 files changed, 30 insertions, 60 deletions
diff --git a/install/ishtar-install b/install/ishtar-install
index 49920fc66..9b9f29d2d 100755
--- a/install/ishtar-install
+++ b/install/ishtar-install
@@ -280,6 +280,30 @@ EOF
exit 1
fi
+ install_libreoffice=''
+ cat >&2 <<-'EOF'
+
+-------------------------------------------------------------------------------
+ An headless version of libreoffice must be install to manage complex
+ generation of documents such as ODS export with QR-codes. The installation
+ of libreoffice uses ~500mo and is not advisable for installation on low-end
+ devices such as raspeberry-pi.
+
+EOF
+ MSG=""
+ while [ "$install_libreoffice" == '' ]
+ do
+ cecho y '* Install libreoffice? ([no]/yes) '
+ read choice
+ case "$choice" in
+ yes ) install_libreoffice="yes";;
+ y ) install_libreoffice="yes";;
+ no ) install_libreoffice="no";;
+ n ) install_libreoffice="no";;
+ '' ) install_libreoffice="no";;
+ esac
+ done
+
echo ""
cecho g "*******************************************************************************"
echo ""
@@ -287,7 +311,7 @@ EOF
# Run setup for each distro accordingly
case "$lsb_dist" in
ubuntu|debian|raspbian)
- if [ "$dist_version" != "stretch" ] && [ "$dist_version" != "jessie" ]; then
+ if [ "$dist_version" != "stretch" ] ; then
echo ""
cecho r " Sorry this script cannot manage your version of Debian/Ubuntu."
echo ""
@@ -343,65 +367,6 @@ EOF
( set -x; $sh_c 'sleep 3; apt-get install -y -q uwsgi uwsgi-plugin-python nginx' )
fi
- if [ "$dist_version" == "jessie" ]; then
- if [ "$backports_activated" != 'true' ]; then
- echo ""
- cecho r " In order to install Ishtar you have to activate Debian backports with the contrib section."
- echo " To do that:"
- echo ""
- echo " echo 'deb http://ftp.debian.org/debian jessie-backports main contrib non-free' >> /etc/apt/sources.list"
- echo ""
- cecho p " Run again Ishtar installation script after that."
- exit 1
- fi
-
- if [ "$default_db" == '127.0.0.1' ]; then
- echo "-------------------------------------------------------------------------------";
- cecho y "Installing postgresql"
- echo ""
- POSTGIS=postgresql-9.4-postgis-2.3
- ( set -x; $sh_c 'sleep 3; apt-get install -y -q postgresql '$POSTGIS )
- fi
- echo "-------------------------------------------------------------------------------";
- cecho y "Installing Ishtar dependencies"
- echo "";
- ( set -x; $sh_c 'sleep 3; apt-get install -t jessie-backports -y -q python python-django\
- python-django-registration python-cffi' )
- ( set -x; $sh_c 'sleep 3; apt-get install -y -q \
- python-bs4 libpangocairo-1.0-0 pandoc \
- python-tidylib python-lxml python-imaging python-html5lib \
- python-psycopg2 python-gdal gettext python-unicodecsv memcached \
- python-django-extra-views python-memcache python-dbf python-markdown python-unidecode' )
- echo "-------------------------------------------------------------------------------";
- cecho y "Installing django-simple-history"
- echo "";
- ( set -x; $sh_c 'pip install git+https://github.com/treyhunner/django-simple-history.git@1.8.2#egg=django-simple-history' )
- echo "-------------------------------------------------------------------------------";
- cecho y "Installing python-secretary"
- echo "";
- ( set -x; $sh_c 'pip install secretary==0.2.14' )
- cecho y "Installing python-ajax-select (available version in Debian is not compatible with backported Django)"
- echo "";
- ( set -x; $sh_c 'pip install django-ajax-selects==1.6.0' )
- cecho y "Installing weasyprint"
- echo "";
- ( set -x; $sh_c 'pip install WeasyPrint==0.41' )
- cecho y "Installing django-formtools"
- echo "";
- ( set -x; $sh_c 'pip install django-formtools==2.1' )
- cecho y "Installing django-compressor"
- echo "";
- ( set -x; $sh_c 'pip install django-compressor==2.1' )
- cecho y "Installing python-virtualtime"
- echo "";
- ( set -x; $sh_c 'pip install virtualtime==1.6' )
- ## not mandatory
- # cecho y "Installing python-django-background-tasks"
- # echo "";
- #( set -x; $sh_c 'pip install django-background-tasks==1.1.11' )
-
- fi
-
if [ "$dist_version" == "stretch" ]; then
if [ "$lsb_dist" == 'debian' ]; then
@@ -452,6 +417,11 @@ EOF
python-memcache python-dbf python-markdown \
python-reportlab python-unidecode' )
fi
+
+ if [ "$install_libreoffice" == 'yes' ]; then
+ ( set -x; $sh_c 'sleep 3; apt-get --no-install-recommends install -y -q \
+ libreoffice libreoffice-script-provider-python python3-uno' )
+ fi
echo "-------------------------------------------------------------------------------";
cecho y "Installing django-simple-history"
echo "";