Update git submodules
[LibreOffice.git] / install_deps.sh
blobc16fd92517bfb1a17afc96864c94e960c8c19353
1 #!/usr/bin/env bash
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This script attempts to install the necessary dependencies to do LibreOffice development.
11 # It should be kept in sync with the instructions at
12 # https://wiki.documentfoundation.org/Development/BuildingOnLinux
15 # Detect OS (i.e. distro)
16 if [ -f /etc/os-release ]; then
17 # freedesktop.org and systemd
18 . /etc/os-release
19 OS=$NAME
20 VER=$VERSION_ID
21 elif type lsb_release >/dev/null 2>&1; then
22 # linuxbase.org
23 OS=$(lsb_release -si)
24 VER=$(lsb_release -sr)
25 elif [ -f /etc/lsb-release ]; then
26 # For some versions of Debian/Ubuntu without lsb_release command
27 . /etc/lsb-release
28 OS=$DISTRIB_ID
29 VER=$DISTRIB_RELEASE
30 elif [ -f /etc/debian_version ]; then
31 # Older Debian/Ubuntu/etc.
32 OS=Debian
33 VER=$(cat /etc/debian_version)
34 elif [ -f /etc/SuSe-release ]; then
35 # Older SuSE/etc.
36 ...
37 elif [ -f /etc/redhat-release ]; then
38 # Older Red Hat, CentOS, etc.
39 ...
40 else
41 # Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
42 OS=$(uname -s)
43 VER=$(uname -r)
46 echo "Detected OS/Distro/Version" $OS $VER
48 if [ "$OS" = "Debian" -o "$OS" = "Ubuntu" ]; then
49 apt-get install git build-essential zip ccache junit4 libkrb5-dev nasm graphviz python3 python3-dev qtbase5-dev libkf5coreaddons-dev libkf5i18n-dev libkf5config-dev libkf5windowsystem-dev libkf5kio-dev autoconf libcups2-dev libfontconfig1-dev gperf default-jdk doxygen libxslt1-dev xsltproc libxml2-utils libxrandr-dev bison flex libgtk-3-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev ant ant-optional
50 else
51 echo "Sorry, I don't know how to install dependencies for" $OS