123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- apt-get install -y --force-yes lsb-release sudo
- dist=`lsb_release -is`
- code=`lsb_release -cs`
- cpu=`getconf LONG_BIT`
- cpuvalue=
- set +e
- grep -E "deb http://apt.sourcefabric.org $code main" /etc/apt/sources.list
- returncode=$?
- set -e
- if [ "$returncode" -ne "0" ]; then
- echo "deb http://apt.sourcefabric.org $code main" >> /etc/apt/sources.list
- fi
- apt-get update
- apt-get -y --force-yes install sourcefabric-keyring
- apt-get update
- if [ "$dist" = "Ubuntu" ]; then
- set +e
- grep -E "deb http://ca.archive.ubuntu.com/ubuntu/ $code multiverse" /etc/apt/sources.list
- returncode=$?
- set -e
- if [ "$returncode" -ne "0" ]; then
- echo "deb http://ca.archive.ubuntu.com/ubuntu/ $code multiverse" >> /etc/apt/sources.list
- echo "deb http://ca.archive.ubuntu.com/ubuntu/ $code universe" >> /etc/apt/sources.list
- fi
- fi
- if [ "$dist" = "Debian" -a "$code" = "squeeze" ]; then
- set +e
- grep -E "deb http://backports.debian.org/debian-backports squeeze-backports main" /etc/apt/sources.list
- returncode=$?
- set -e
- if [ "$returncode" -ne "0" ]; then
- echo "deb http://backports.debian.org/debian-backports squeeze-backports main" >> /etc/apt/sources.list
- fi
- fi
- echo "System is $cpu bit..."
- if [ "$cpu" = "64" ]; then
- cpuvalue="amd64"
- else
- cpuvalue="i386"
- fi
- apt-get update
- apt-get -o Dpkg::Options::="--force-confold" upgrade
- apt-get -y --force-yes install libopus0 libopus-dev libopus-dbg libopus-doc
- apt-get -y --force-yes install git-core ocaml-findlib libao-ocaml-dev \
- libportaudio-ocaml-dev libmad-ocaml-dev libtaglib-ocaml-dev libalsa-ocaml-dev \
- libvorbis-ocaml-dev libladspa-ocaml-dev libxmlplaylist-ocaml-dev libflac-dev \
- libxml-dom-perl libxml-dom-xpath-perl patch autoconf libmp3lame-dev \
- libcamomile-ocaml-dev libcamlimages-ocaml-dev libtool libpulse-dev camlidl \
- libfaad-dev libpcre-ocaml-dev libfftw3-3 dialog
- if [ "$code" != "lucid" ]; then
- apt-get -y --force-yes install libvo-aacenc-dev
- fi
- rm -rf liquidsoap-full
- git clone https://github.com/savonet/liquidsoap-full
- cd liquidsoap-full
- git checkout master
- make init
- make update
- cp PACKAGES.minimal PACKAGES
- sed -i "s/#ocaml-portaudio/ocaml-portaudio/g" PACKAGES
- sed -i "s/#ocaml-alsa/ocaml-alsa/g" PACKAGES
- sed -i "s/#ocaml-pulseaudio/ocaml-pulseaudio/g" PACKAGES
- sed -i "s/#ocaml-faad/ocaml-faad/g" PACKAGES
- sed -i "s/#ocaml-opus/ocaml-opus/g" PACKAGES
- if [ "$code" != "lucid" ]; then
- sed -i "s/#ocaml-voaacenc/ocaml-voaacenc/g" PACKAGES
- fi
- chown -R tmp /liquidsoap-full
- chmod -R 777 /liquidsoap-full
- sudo -u tmp ./bootstrap
- sudo -u tmp ./configure
- sudo -u tmp make
- cp /liquidsoap-full/liquidsoap/src/liquidsoap /
|