283
by Toby Schneider
updated DEPENDENCIES to be a script again |
1 |
#!/bin/bash
|
2 |
# Dependencies installation script for Goby
|
|
184
by Toby Schneider
removed old MOOS modules and started writing a better DEPENDENCIES file. Also made Crypto++ optional |
3 |
#
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
4 |
# At a minimum, Goby can be built in a C++ development environment
|
184
by Toby Schneider
removed old MOOS modules and started writing a better DEPENDENCIES file. Also made Crypto++ optional |
5 |
# that also includes Google Protocol Buffers (http://code.google.com/p/protobuf/)
|
6 |
# and Boost (http://www.boost.org/). Both of these will readily compile on most
|
|
7 |
# embedded systems. The other dependencies add useful functionality.
|
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
8 |
function usage() |
9 |
{
|
|
10 |
echo "usage: ./DEPENDENCIES distribution [ALL] [DOC]"; |
|
11 |
echo ""; |
|
12 |
echo "distribution can be:"; |
|
13 |
echo "debian" |
|
14 |
echo "ubuntu" |
|
284
by Toby Schneider
1. Added basic Fedora and OpenSuse to DEPENDENCIES file; 2. fixed bug where loss of double precision was occuring in moos_translator due to standard's 6 digit of significant figures for streams |
15 |
echo "fedora" |
16 |
echo "opensuse" |
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
17 |
echo;
|
18 |
echo "Other distributions should determine their dependencies" |
|
19 |
echo "by reading this file (less DEPENDENCIES). Please improve this script" |
|
20 |
echo "by adding your distribution." |
|
21 |
||
22 |
echo "option ALL installs all optional code dependencies"; |
|
23 |
echo "option DOC installs all dependencies for generating documentation (doxygen, latex, etc.)"; |
|
24 |
}
|
|
25 |
||
26 |
if [ $# -lt 1 ]; then usage; exit 1; fi; |
|
27 |
if [[ $UID -ne 0 ]]; then printf "You must run this script as root. Use 'sudo' in Ubuntu. \n" 1>&2; exit 1; fi |
|
28 |
||
29 |
||
30 |
echo "Installing dependencies for $1 ..."; |
|
31 |
install_doc=0; if [[ $2 == "DOC" || $3 == "DOC" ]]; then install_doc=1; fi; |
|
32 |
if [ $install_doc -ne 0 ]; then echo "Installing documentation dependencies ..."; fi |
|
33 |
install_all=0; if [[ $2 == "ALL" || $3 == "ALL" ]]; then install_all=1; fi; |
|
34 |
if [ $install_all -ne 0 ]; then echo "Installing all dependencies ..."; fi |
|
35 |
||
36 |
set -u -e
|
|
37 |
||
38 |
case $1 in |
|
39 |
ubuntu|debian) |
|
40 |
# additionally, debian will require:
|
|
588
by Toby Schneider
Updated dependencies script for DCCL |
41 |
# DCCL3 from source: http://libdccl.org
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
42 |
|
43 |
if [[ -e "`which aptitude`" ]]; then |
|
44 |
package_manager=aptitude |
|
45 |
else
|
|
46 |
package_manager=apt-get |
|
47 |
fi
|
|
48 |
||
49 |
install_command="install" |
|
50 |
||
51 |
packages="build-essential |
|
636.1.2
by Stephanie Kemna
whitespace |
52 |
cmake
|
53 |
libboost-dev
|
|
54 |
libboost-system-dev
|
|
55 |
libboost-date-time-dev
|
|
56 |
libboost-thread-dev
|
|
57 |
libboost-program-options-dev
|
|
58 |
libboost-filesystem-dev
|
|
59 |
libboost-signals-dev
|
|
60 |
libboost-regex-dev
|
|
61 |
libprotobuf-dev
|
|
62 |
libprotoc-dev
|
|
63 |
protobuf-compiler
|
|
64 |
libgmp3-dev"
|
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
65 |
if [ $install_all -ne 0 ]; then |
66 |
packages="${packages} |
|
636.1.2
by Stephanie Kemna
whitespace |
67 |
libcrypto++-dev
|
68 |
libncurses-dev
|
|
69 |
libzmq-dev
|
|
70 |
libwt-dev
|
|
71 |
libwtdbo-dev
|
|
72 |
libwtdbosqlite-dev
|
|
73 |
libwthttp-dev
|
|
74 |
libsqlite3-dev"
|
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
75 |
fi
|
588
by Toby Schneider
Updated dependencies script for DCCL |
76 |
|
77 |
if [[ $1 == "ubuntu" ]]; then |
|
607
by Toby Schneider
Minor updates to build correctly on Ubuntu 16.04 beta |
78 |
add-apt-repository ppa:dccl-dev/ppa -s -y |
588
by Toby Schneider
Updated dependencies script for DCCL |
79 |
apt-get update -qq |
80 |
set +x
|
|
81 |
packages="${packages} |
|
636.1.2
by Stephanie Kemna
whitespace |
82 |
libdccl3-dev"
|
588
by Toby Schneider
Updated dependencies script for DCCL |
83 |
fi
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
84 |
|
85 |
if [ $install_doc -ne 0 ]; then |
|
86 |
packages="${packages} |
|
636.1.2
by Stephanie Kemna
whitespace |
87 |
graphviz
|
88 |
doxygen
|
|
89 |
texlive-xetex
|
|
90 |
ttf-sil-gentium
|
|
91 |
imagemagick
|
|
92 |
texlive-fonts-recommended
|
|
93 |
texlive-font-utils
|
|
94 |
ghostscript
|
|
95 |
lmodern
|
|
96 |
texlive-latex-recommended
|
|
97 |
texlive-latex-extra"
|
|
636.1.1
by Stephanie Kemna
replace tabs, same whitespacing after packages |
98 |
fi
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
99 |
|
100 |
# PPA dependencies
|
|
101 |
if [[ $1 == "ubuntu" && $install_all -ne 0 ]]; then |
|
102 |
set -x
|
|
607
by Toby Schneider
Minor updates to build correctly on Ubuntu 16.04 beta |
103 |
add-apt-repository ppa:goby-dev/ppa -s -y |
104 |
add-apt-repository ppa:tes/lamss-moos10 -s -y |
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
105 |
apt-get update -qq |
106 |
set +x
|
|
107 |
||
108 |
# override and use build-dep if ALL and DOC are requested
|
|
109 |
if [ $install_doc -ne 0 ]; then |
|
110 |
package_manager="apt-get" |
|
111 |
install_command="build-dep" |
|
636.1.2
by Stephanie Kemna
whitespace |
112 |
packages="libgoby2" |
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
113 |
else
|
114 |
packages="${packages} |
|
636.1.2
by Stephanie Kemna
whitespace |
115 |
libmoos10-dev
|
116 |
libproj-dev"
|
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
117 |
fi
|
118 |
fi
|
|
119 |
;;
|
|
284
by Toby Schneider
1. Added basic Fedora and OpenSuse to DEPENDENCIES file; 2. fixed bug where loss of double precision was occuring in moos_translator due to standard's 6 digit of significant figures for streams |
120 |
fedora)
|
121 |
package_manager=yum |
|
122 |
install_command="install" |
|
123 |
packages="cmake |
|
636.1.2
by Stephanie Kemna
whitespace |
124 |
protobuf-devel
|
125 |
boost-devel"
|
|
284
by Toby Schneider
1. Added basic Fedora and OpenSuse to DEPENDENCIES file; 2. fixed bug where loss of double precision was occuring in moos_translator due to standard's 6 digit of significant figures for streams |
126 |
|
127 |
if [[ $install_all -ne 0 || $install_doc -ne 0 ]]; then |
|
128 |
echo "Warning: ALL and DOC are not yet supported for $1" |
|
129 |
fi
|
|
130 |
;;
|
|
131 |
opensuse)
|
|
132 |
package_manager=zypper |
|
133 |
install_command="install" |
|
134 |
packages="make gcc gcc-c++ |
|
636.1.2
by Stephanie Kemna
whitespace |
135 |
protobuf-devel
|
136 |
boost-devel"
|
|
284
by Toby Schneider
1. Added basic Fedora and OpenSuse to DEPENDENCIES file; 2. fixed bug where loss of double precision was occuring in moos_translator due to standard's 6 digit of significant figures for streams |
137 |
|
138 |
if [[ $install_all -ne 0 || $install_doc -ne 0 ]]; then |
|
139 |
echo "Warning: ALL and DOC are not yet supported for $1" |
|
140 |
fi
|
|
141 |
||
142 |
;;
|
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
143 |
*)
|
144 |
echo -e "Invalid distribution: $1\n"; usage; exit 1;; |
|
145 |
esac
|
|
146 |
||
636.1.2
by Stephanie Kemna
whitespace |
147 |
echo "Installing: ${packages}..." |
148 |
||
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
149 |
set -x
|
636.1.2
by Stephanie Kemna
whitespace |
150 |
|
283
by Toby Schneider
updated DEPENDENCIES to be a script again |
151 |
${package_manager} ${install_command} ${packages} |
152 |
||
57
by toby
made NCurses optional: working on building for Windows |
153 |
|
284
by Toby Schneider
1. Added basic Fedora and OpenSuse to DEPENDENCIES file; 2. fixed bug where loss of double precision was occuring in moos_translator due to standard's 6 digit of significant figures for streams |
154 |
# Fedora notes
|
155 |
# - base
|
|
156 |
# yum install cmake
|
|
157 |
# yum install protobuf-devel
|
|
158 |
# yum install boost-devel
|
|
159 |
||
60.2.45
by toby
Made minor changes to CMake build system to allow building with MacPorts on OS X |
160 |
# OpenSuSe Notes
|
284
by Toby Schneider
1. Added basic Fedora and OpenSuse to DEPENDENCIES file; 2. fixed bug where loss of double precision was occuring in moos_translator due to standard's 6 digit of significant figures for streams |
161 |
# - base
|
60.2.45
by toby
Made minor changes to CMake build system to allow building with MacPorts on OS X |
162 |
# zypper install -t pattern devel_C_C++
|
163 |
# zypper install cmake
|
|
164 |
# zypper install boost-devel
|
|
284
by Toby Schneider
1. Added basic Fedora and OpenSuse to DEPENDENCIES file; 2. fixed bug where loss of double precision was occuring in moos_translator due to standard's 6 digit of significant figures for streams |
165 |
# zypper install protobuf-devel
|
166 |
# - optional
|
|
60.2.45
by toby
Made minor changes to CMake build system to allow building with MacPorts on OS X |
167 |
# zypper install libxerces-c-devel
|
168 |
# (crypto++ from src)
|
|
169 |
# zypper install wt-devel
|
|
170 |
||
184
by Toby Schneider
removed old MOOS modules and started writing a better DEPENDENCIES file. Also made Crypto++ optional |
171 |
|
172 |
||
60.2.45
by toby
Made minor changes to CMake build system to allow building with MacPorts on OS X |
173 |
# MAC OS X
|
174 |
# Use MacPorts to install the needed dependencies. You will have
|
|
175 |
# to install Wt from source to /opt/local
|
|
60.2.49
by toby
updated DEPENDENCIES with list of MacPorts required |
176 |
# I believe these are the ports necessary to compile moos-ivp,
|
177 |
# moos-ivp-local, and goby:
|
|
178 |
#
|
|
284
by Toby Schneider
1. Added basic Fedora and OpenSuse to DEPENDENCIES file; 2. fixed bug where loss of double precision was occuring in moos_translator due to standard's 6 digit of significant figures for streams |
179 |
# - base
|
60.2.49
by toby
updated DEPENDENCIES with list of MacPorts required |
180 |
# boost +universal
|
284
by Toby Schneider
1. Added basic Fedora and OpenSuse to DEPENDENCIES file; 2. fixed bug where loss of double precision was occuring in moos_translator due to standard's 6 digit of significant figures for streams |
181 |
# protobuf-cpp
|
60.2.49
by toby
updated DEPENDENCIES with list of MacPorts required |
182 |
# cmake
|
284
by Toby Schneider
1. Added basic Fedora and OpenSuse to DEPENDENCIES file; 2. fixed bug where loss of double precision was occuring in moos_translator due to standard's 6 digit of significant figures for streams |
183 |
# - optional
|
60.2.49
by toby
updated DEPENDENCIES with list of MacPorts required |
184 |
# jpeg +universal
|
185 |
# libcryptopp +universal
|
|
186 |
# ncurses +universal
|
|
187 |
# ncursesw
|
|
188 |
# socat
|
|
189 |
# tiff +universal
|
|
190 |
# xercesc
|
|
191 |
# zlib +universal
|
|
60.2.45
by toby
Made minor changes to CMake build system to allow building with MacPorts on OS X |
192 |
|
184
by Toby Schneider
removed old MOOS modules and started writing a better DEPENDENCIES file. Also made Crypto++ optional |
193 |
|
60.2.45
by toby
Made minor changes to CMake build system to allow building with MacPorts on OS X |
194 |
# Windows
|
195 |
# Goby does not currently build on Windows
|