aboutsummaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-02-02 16:01:57 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-02-02 16:01:57 +0100
commitdcf1a7527bf3ea977710eae30bd24d8c65c9d6c5 (patch)
treee65d66ba3dbedd87770339daee0193f5b221a945 /installer
parent9c438e3e083d38777cab23d18e17c9777bf00d34 (diff)
downloadmmbtools-aux-dcf1a7527bf3ea977710eae30bd24d8c65c9d6c5.tar.gz
mmbtools-aux-dcf1a7527bf3ea977710eae30bd24d8c65c9d6c5.tar.bz2
mmbtools-aux-dcf1a7527bf3ea977710eae30bd24d8c65c9d6c5.zip
add installer script for debian stable
Diffstat (limited to 'installer')
-rw-r--r--installer/debian.sh153
1 files changed, 153 insertions, 0 deletions
diff --git a/installer/debian.sh b/installer/debian.sh
new file mode 100644
index 0000000..cc4ff79
--- /dev/null
+++ b/installer/debian.sh
@@ -0,0 +1,153 @@
+#!/bin/bash
+#
+# Installer script for
+# * UHD
+# * mmbTools:
+# * dabmux
+# * dabmod
+# * auxiliary scripts
+# * fdk-aac-dabplus
+#
+# and all required dependencies for a
+# Debian stable system.
+#
+# Requires: sudo
+#
+# TODO gnuradio
+
+RED="\e[91m"
+GREEN="\e[92m"
+NORMAL="\e[0m"
+
+echo
+echo "This is the mmbTools installer script for debian"
+echo "================================================"
+echo
+echo "It will install UHD, dabmux, dabmod, fdk-aac-dabplus"
+echo "and all prerequisites to your machine."
+echo
+
+echo -e $RED
+echo "This program will use sudo to install components on your"
+echo "system. Please read the script before you execute it, to"
+echo "understand what changes it will do to your system !"
+echo
+echo "There is no undo functionality here !"
+echo -e $NORMAL
+
+if [ "$UID" == "0" ]
+then
+ echo -e $RED
+ echo "Do not run this script as root !"
+ echo -e $NORMAL
+ echo "Install sudo, and run this script as a normal user."
+ exit 1
+fi
+
+which sudo
+if [ "$?" == "0" ]
+then
+ echo "Press Ctrl-C to abort installation"
+ echo "or Enter to proceed"
+
+ read
+else
+ echo -e $RED
+ echo -e "Please install sudo first $NORMAL using"
+ echo " apt-get -y install sudo"
+ exit 1
+fi
+
+# Fail on error
+set -e
+
+echo -e "$GREEN Updating debian package repositories $NORMAL"
+sudo apt-get -y update
+
+echo -e "$GREEN Installing essential prerquisites $NORMAL"
+# some essential and less essential prerequisistes
+sudo apt-get -y install build-essential git wget \
+ gstreamer0.10-plugins-base gstreamer0.10-plugins-good \
+ gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer-tools \
+ sox alsa-tools alsa-utils \
+ automake libtool mpg123 \
+ ncdu vim ntp links cpufrequtils
+
+# this will install boost, cmake and a lot more
+sudo apt-get -y build-dep gnuradio uhd
+
+echo -e "$GREEN Installing uhd from repository $NORMAL"
+# install uhd from repository
+sudo apt-get -y install libuhd003 libuhd-dev
+
+
+# stuff to install from source
+mkdir dab || exit
+cd dab || exit
+
+echo -e "$GREEN Installing ZeroMQ $NORMAL"
+wget http://download.zeromq.org/zeromq-4.0.3.tar.gz
+tar -f zeromq-4.0.3.tar.gz -x
+pushd zeromq-4.0.3
+./configure
+make
+sudo make install
+popd
+
+echo -e "$GREEN Installing ZeroMQ C++ Bindings $NORMAL"
+# Get ZeroMQ cpp bindings
+git clone https://github.com/zeromq/cppzmq.git
+pushd cppzmq
+sudo cp zmq.hpp /usr/local/include
+popd
+
+echo -e "$GREEN Installing KA9Q libfec $NORMAL"
+git clone https://github.com/Opendigitalradio/ka9q-fec.git
+pushd ka9q-fec
+./bootstrap
+./configure
+make
+sudo make install
+popd
+
+echo
+echo -e "$GREEN PREREQUISITES INSTALLED $NORMAL"
+### END OF PREREQUISITES
+
+echo -e "$GREEN Fetching mmbtools-aux $NORMAL"
+git clone https://github.com/mpbraendli/mmbtools-aux.git
+
+
+echo -e "$GREEN Compiling CRC-dabmux $NORMAL"
+git clone https://github.com/mpbraendli/CRC-mmbtools-dabmux
+pushd CRC-mmbtools-dabmux
+./bootstrap.sh
+./configure --enable-input-zeromq --enable-output-zeromq
+make
+sudo make install
+popd
+
+echo -e "$GREEN Compiling CRC-dabmod $NORMAL"
+git clone https://github.com/mpbraendli/CRC-mmbtools-dabmod
+pushd CRC-mmbtools-dabmod
+./bootstrap.sh
+./configure --enable-input-zeromq --enable-fft-simd --disable-debug --with-debug-malloc=no
+make
+sudo make install
+popd
+
+
+echo -e "$GREEN Compiling fdk-aac-dabplus $NORMAL"
+git clone https://github.com/mpbraendli/fdk-aac-dabplus.git
+pushd fdk-aac-dabplus
+autoreconf -i
+./configure --enable-example --enable-zmq
+make
+sudo make install
+popd
+
+
+echo -e "$GREEN Updating ld cache $NORMAL"
+# update ld cache
+sudo ldconfig
+