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
21 elif type lsb_release
>/dev
/null
2>&1; then
24 VER
=$
(lsb_release
-sr)
25 elif [ -f /etc
/lsb-release
]; then
26 # For some versions of Debian/Ubuntu without lsb_release command
30 elif [ -f /etc
/debian_version
]; then
31 # Older Debian/Ubuntu/etc.
33 VER
=$
(cat /etc
/debian_version
)
34 elif [ -f /etc
/SuSe-release
]; then
37 elif [ -f /etc
/redhat-release
]; then
38 # Older Red Hat, CentOS, etc.
41 # Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
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
51 echo "Sorry, I don't know how to install dependencies for" $OS