%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (c) 2003-2016 by The University of Queensland
% http://www.uq.edu.au
%
% Primary Business: Queensland, Australia
% Licensed under the Apache License, version 2.0
% http://www.apache.org/licenses/LICENSE-2.0
%
% Development until 2012 by Earth Systems Science Computational Center (ESSCC)
% Development 2012-2013 by School of Earth Sciences
% Development from 2014 by Centre for Geoscience Computing (GeoComp)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\chapter{Debian/Ubuntu Binary Installation}\label{chap:bin}

We provide \texttt{.deb} files for the following distributions\footnote{While we endevour to comply with current debian policy 
for producing packages, we do not make any promises.}:

Debian (i386 or amd64):
\begin{itemize}
 \item $7$ --- \emph{Wheezy}
 \item $8$ --- \emph{Jessie}
\end{itemize}

Ubuntu (i386 or amd64):
\begin{itemize}
 \item $14.04$ --- \emph{Trusty} Tahr (LTS)
% \item $14.10$ --- \emph{Utopic} Unicorn 
 \item $15.04$ --- \emph{Vivid} Vervet
\end{itemize}

Two packages make up the \escript system:
\begin{itemize}
 \item Escript documentation (python-escript-doc). This is optional.
 \item Escript programs and libraries. You only need one of these, choose the one\footnote{You can 
 have a number of these packages installed at the same time. To choose which one is executed, 
 use a different launcher script: run-escript2, run-escript2-mpi, run-escript3, run-escript3-mpi.} which matches your needs.
 \begin{itemize}
  \item python-escript --- Python2 with OpenMP threaded parallelism.
  \item python-escript-mpi --- Python2 with MPI and OpenMP
  \item python3-escript --- Python3 with OpenMP
  \item python3-escript-mpi --- Python2 with MPI and OpenMP
 \end{itemize}
 Substitute your chosen package in the instructions below.
\end{itemize}

The main package will be named \file{python-escript-X-D_A.deb} where \texttt{X} is the version, \texttt{D} 
is the distribution codename (eg ``\texttt{wheezy}'' or ``\texttt{trusty}'') and \texttt{A} is the architecture.
For example, \file{python-escript-4.1-1-trusty_amd64.deb} would be the Python2 file for Ubuntu $14.04$ for 64bit processors.
There is a common documentation for all distributions called \file{python-escript-doc-X_all.deb}.
To install \esfinley, download the appropriate \file{.deb} file(s) and execute the following 
commands as root (you need to be in the directory containing the file):

\begin{verse}
\textbf{(For Ubuntu users)}\\
You will need to either install \texttt{aptitude}\footnote{Unless you are short on disk space, \texttt{aptitude} 
is recommended} or adapt these instructions for \texttt{apt-get}.
\begin{shellCode}
sudo apt-get install aptitude
\end{shellCode}
\end{verse}

\begin{shellCode}
dpkg --unpack python-escript*.deb
aptitude install python-escript python-escript-doc
\end{shellCode}

Installing escript should not remove any (non-escript) packages from your system.
If aptitude suggests removing \texttt{python-escript} then choose 'N'.
If it wants to remove \texttt{escript-noalias} or \texttt{escript}, then choose 'Y'.
It should then suggest installing some dependencies choose 'Y' here.

If you use sudo (for example on Ubuntu) enter the following instead:
\begin{shellCode}
sudo dpkg --unpack python-escript*.deb
sudo aptitude install python-escript python-escript-doc
\end{shellCode}

There are a number of optional dependencies which you should also install unless you are sure you don't need them:
\begin{shellCode}
aptitude install python-sympy python-matplotlib python-scipy 
aptitude install python-pyproj python-gdal python-sympy
\end{shellCode}



This should install \esfinley and its dependencies on your system.
Please notify the development team if something goes wrong.

