source: trunk/SH/arb_installubuntu4arb.sh

Last change on this file was 19492, checked in by westram, 12 months ago
  • mention libgomp1 (required by FastTreeMP)
  • Property svn:executable set to *
File size: 4.3 KB
Line 
1#!/bin/bash
2#
3# Installs tools and libraries needed to run, compile or develop ARB on Ubuntu.
4#
5# Tested with:
6#       * Ubuntu 20.04 LTS
7#       * Debian 11
8#
9# Previous versions of this script are available at
10#     http://bugs.arb-home.de/export/18373/trunk/SH/arb_installubuntu4arb.sh      (Linux Mint 19; Ubuntu 18.04 LTS)
11#     http://bugs.arb-home.de/export/14798/trunk/SH/arb_installubuntu4arb.sh      (Ubuntu 16.04 LTS)
12#     http://bugs.arb-home.de/export/14409/trunk/SH/arb_installubuntu4arb.sh      (older)
13#
14# [ May as well work with other ubuntu flavors or debian.
15#   Please report working tests and/or send needed changes to devel@arb-home.de
16# ]
17
18listwords() {
19    if [ ! -z "$1" ]; then
20        echo "    $1"
21        shift
22        listwords $*
23    fi
24}
25
26SELF=${0}
27CMD=${1:-}
28
29if [ -z ${CMD} ]; then
30    echo ""
31    echo "Usage: arb_installubuntu4arb.sh what [openGL]"
32    echo ""
33    echo "If optional parameter 'openGL' is specified,"
34    echo "packages needed for ARB with openGL get installed."
35    echo "(Note: currently does only work with what=arb and old os version)"
36    echo ""
37    echo "what      installs"
38    echo "-------   ---------------------------------------------------"
39    echo "arb       things needed to run ARB"
40    echo "compile   things needed to compile and run ARB"
41    echo "develop   like 'compile' plus some optional development tools"
42    echo "devdox    like 'develop' plus things needed for doxygen (big)"
43    echo ""
44    echo "(Note: script contains pointers to older versions of itself)"
45    echo ""
46else
47    # other parameters
48    if [ "$CMD" == "echo" ]; then
49        shift
50    fi
51
52    WHAT=${1:-}
53    OPENGL=${2:-}
54
55    if [ "$CMD" == "echo" ]; then
56        if [ "$WHAT" == "arb" ]; then
57            echo \
58              gnuplot \
59              gv \
60              libmotif-common \
61              libxerces-c-dev \
62              libgomp1 \
63              transfig \
64              xfig \
65              xterm \
66
67            # dependency for motif library itself (e.g. libxm4) is handled either via libglw1-mesa or via libmotif-dev below.
68
69            if [ "$OPENGL" == "openGL" ]; then
70                echo \
71                  libpng16-16 \
72                  libglw1-mesa \
73
74            else
75                echo \
76                    libmotif-dev \
77
78            fi
79
80        elif [ "$WHAT" == "compile" ]; then
81            ${SELF} echo arb ${OPENGL}
82            echo \
83              autoconf \
84              automake \
85              g++ \
86              libboost-filesystem-dev \
87              libboost-iostreams-dev \
88              libboost-program-options-dev \
89              libboost-random-dev \
90              libboost-system-dev \
91              libboost-thread-dev \
92              libboost-test-dev \
93              libglib2.0-dev \
94              libreadline-dev \
95              libtbb-dev \
96              libtiff5-dev \
97              libtool \
98              libx11-dev \
99              libxaw7-dev \
100              libxext-dev \
101              libxml2-utils \
102              libxpm-dev \
103              libxt-dev \
104              lynx \
105              make \
106              time \
107              xsltproc \
108
109            if [ "$OPENGL" == "openGL" ]; then
110                echo \
111                  freeglut3-dev \
112                  libglew-dev \
113                  libpng-dev \
114                  libglw1-mesa-dev \
115
116            fi
117
118            # the following package no longer works for ubuntu 20.04:
119            # x11proto-print-dev
120
121        elif [ "$WHAT" == "develop" ]; then
122            ${SELF} echo compile ${OPENGL}
123            echo \
124              valgrind \
125              pixmap \
126              exuberant-ctags \
127              xutils-dev \
128
129        elif [ "$WHAT" == "devdox" ]; then
130            ${SELF} echo develop ${OPENGL}
131            echo \
132              doxygen \
133              texlive-latex-base \
134              texlive-base-bin \
135
136        else
137            echo error_unknown_target_${WHAT}
138        fi
139    else
140        echo "Ubuntu for ARB installer"
141        PACKAGES=`$SELF echo $WHAT $OPENGL`
142        SHOWWHAT=$WHAT
143        if [ ! -z ${OPENGL} ]; then
144            SHOWWHAT="${WHAT}+${OPENGL}"
145        fi
146        echo "Packages needed for '${SHOWWHAT}': `echo $PACKAGES | wc -w`"
147        # listwords $PACKAGES
148
149        echo '-------------------- [apt start]'
150        sudo apt-get install $PACKAGES
151        echo '-------------------- [apt end]'
152    fi
153fi
154
Note: See TracBrowser for help on using the repository browser.