[Libreoffice-commits] core.git: install_deps.sh
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 31 15:39:27 UTC 2021
install_deps.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
New commits:
commit 8da9f85abc508140b90e4f5be587aa05d4f1e5f4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Mar 30 10:35:05 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Mar 31 17:38:48 2021 +0200
Initial version of script to install dependencies
Change-Id: I2002d3c2c522a4cd027417f894bd03e03b85eeb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113336
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/install_deps.sh b/install_deps.sh
new file mode 100755
index 000000000000..7759527cf4a8
--- /dev/null
+++ b/install_deps.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This script attempts to install the necessary dependencies to do LibreOffice development.
+#
+# It should be kept in sync with the instructions at
+# https://wiki.documentfoundation.org/Development/BuildingOnLinux
+#
+
+# Detect OS (i.e. distro)
+if [ -f /etc/os-release ]; then
+ # freedesktop.org and systemd
+ . /etc/os-release
+ OS=$NAME
+ VER=$VERSION_ID
+elif type lsb_release >/dev/null 2>&1; then
+ # linuxbase.org
+ OS=$(lsb_release -si)
+ VER=$(lsb_release -sr)
+elif [ -f /etc/lsb-release ]; then
+ # For some versions of Debian/Ubuntu without lsb_release command
+ . /etc/lsb-release
+ OS=$DISTRIB_ID
+ VER=$DISTRIB_RELEASE
+elif [ -f /etc/debian_version ]; then
+ # Older Debian/Ubuntu/etc.
+ OS=Debian
+ VER=$(cat /etc/debian_version)
+elif [ -f /etc/SuSe-release ]; then
+ # Older SuSE/etc.
+ ...
+elif [ -f /etc/redhat-release ]; then
+ # Older Red Hat, CentOS, etc.
+ ...
+else
+ # Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
+ OS=$(uname -s)
+ VER=$(uname -r)
+fi
+
+echo "Detected OS/Distro/Version" $OS $VER
+
+if [ "$OS" = "Debian" -o "$OS" = "Ubuntu" ]; then
+ 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
+else
+ echo "Sorry, I don't know how to install dependencies for" $OS
+fi
More information about the Libreoffice-commits
mailing list