diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-05-08 22:18:02 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-05-08 22:18:02 +0200 |
commit | af83de1d5e6ca971f7ae8f8e50a1051ef6489207 (patch) | |
tree | 0e6a489f3008591de728f4fced1fce9326099b24 /installer | |
parent | 59fd4f2fcc600ca65940df2013636151fbb8685c (diff) | |
download | mmbtools-aux-af83de1d5e6ca971f7ae8f8e50a1051ef6489207.tar.gz mmbtools-aux-af83de1d5e6ca971f7ae8f8e50a1051ef6489207.tar.bz2 mmbtools-aux-af83de1d5e6ca971f7ae8f8e50a1051ef6489207.zip |
Add distribution detection to debian.sh
Diffstat (limited to 'installer')
-rw-r--r-- | installer/debian.sh | 80 |
1 files changed, 54 insertions, 26 deletions
diff --git a/installer/debian.sh b/installer/debian.sh index eec820e..b925a58 100644 --- a/installer/debian.sh +++ b/installer/debian.sh @@ -6,26 +6,41 @@ # * ODR-DabMux # * ODR-DabMod # * auxiliary scripts -# * the fdk-aac-dabplus package +# * the FDK-AAC-DABplus package # # and all required dependencies for a -# Debian stable system. +# Debian stable and oldstable system. # # Requires: sudo -# -# TODO gnuradio RED="\e[91m" GREEN="\e[92m" NORMAL="\e[0m" +DISTRO="unknown" + +if [ $(lsb_release -d | grep -c wheezy) -eq 1 ] ; then + DISTRO="wheezy" +elif [ $(lsb_release -d | grep -c squeeze) -eq 1 ] ; then + DISTRO="squeeze" +fi + 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 $DISTRO + +if [ "$DISTRO" == "unknown" ] ; then + echo -e $RED + echo "You seem to be running something else than" + echo "debian jessie or wheezy. This script doesn't" + echo "support your distribution." + echo -e $NORMAL + exit 1 +fi echo -e $RED echo "This program will use sudo to install components on your" @@ -82,10 +97,11 @@ sudo apt-get -y install build-essential git wget \ sox alsa-tools alsa-utils \ automake libtool mpg123 \ libasound2 libasound2-dev \ - libmagickwand5 libmagickwand-dev \ libjack-jackd2-dev jackd2 \ ncdu vim ntp links cpufrequtils \ - libfftw3-dev + libfftw3-dev \ + libmagickwand-dev \ + libvlc-dev vlc-nox # this will install boost, cmake and a lot more sudo apt-get -y build-dep uhd @@ -105,23 +121,28 @@ make sudo make install popd -echo -e "$GREEN Installing libsodium $NORMAL" -wget http://download.libsodium.org/libsodium/releases/libsodium-0.6.1.tar.gz -tar -f libsodium-0.6.1.tar.gz -x -pushd libsodium-0.6.1 -./configure -make -sudo make install -popd - -echo -e "$GREEN Installing ZeroMQ $NORMAL" -wget http://download.zeromq.org/zeromq-4.0.4.tar.gz -tar -f zeromq-4.0.4.tar.gz -x -pushd zeromq-4.0.4 -./configure -make -sudo make install -popd +#install ZMQ from sources on wheezy +if [ "$DISTRO" == "wheezy" ] ; then + echo -e "$GREEN Installing libsodium $NORMAL" + wget http://download.libsodium.org/libsodium/releases/libsodium-0.6.1.tar.gz + tar -f libsodium-0.6.1.tar.gz -x + pushd libsodium-0.6.1 + ./configure + make + sudo make install + popd + + echo -e "$GREEN Installing ZeroMQ $NORMAL" + wget http://download.zeromq.org/zeromq-4.0.4.tar.gz + tar -f zeromq-4.0.4.tar.gz -x + pushd zeromq-4.0.4 + ./configure + make + sudo make install + popd +elif [ "$DISTRO" == "jessie" ] ; then + sudo apt-get -y install libzmq3-dev libzmq3 +fi echo -e "$GREEN Installing KA9Q libfec $NORMAL" git clone https://github.com/Opendigitalradio/ka9q-fec.git @@ -164,11 +185,18 @@ sudo make install popd -echo -e "$GREEN Compiling fdk-aac-dabplus $NORMAL" +echo -e "$GREEN Compiling Toolame-DAB $NORMAL" +git clone https://github.com/Opendigitalradio/toolame-dab.git +pushd toolame-dab +make +sudo cp toolame /usr/local/bin/toolame +popd + +echo -e "$GREEN Compiling FDK-AAC-DABplus $NORMAL" git clone https://github.com/Opendigitalradio/fdk-aac-dabplus.git pushd fdk-aac-dabplus ./bootstrap -./configure --enable-jack +./configure --enable-jack --enable-vlc make sudo make install popd |