Forked from dtcooper/install_liquidsoap_latest.sh
Last active
September 29, 2019 19:54
-
-
Save eirenik0/da173c8575ce7012738474f982c0ab2e to your computer and use it in GitHub Desktop.
Various Liquidsoap Install Scripts for Ubuntu 16.04 LTS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt-get install -y build-essential git automake ocamlbuild | |
mkdir -p "$HOME/liquidsoap-build" | |
cd "$HOME/liquidsoap-build" | |
wget https://github.com/savonet/liquidsoap/releases/download/1.3.7/liquidsoap-1.3.7-full.tar.gz | |
tar xvzf liquidsoap-1.3.7-full.tar.gz | |
cd liquidsoap-1.3.7-full | |
rm -rf liquidsoap-1.3.7 | |
# Clone liquidsoap + submodules shallowly, and bootstrap ./configure file | |
git clone --depth=1 https://github.com/savonet/liquidsoap.git | |
cd liquidsoap | |
git submodule init | |
git submodule update --depth=1 | |
./bootstrap | |
LIQUIDSOAP_GIT_REV="$(git rev-parse --short HEAD)" | |
cd .. | |
echo "$LIQUIDSOAP_GIT_REV" | |
# Pick most the audio packages | |
cat > PACKAGES <<EOF | |
ocaml-cry | |
ocaml-ao | |
ocaml-alsa | |
ocaml-mad | |
ocaml-taglib | |
ocaml-lame | |
ocaml-shine | |
ocaml-ogg | |
ocaml-vorbis | |
ocaml-speex | |
ocaml-theora | |
ocaml-opus | |
ocaml-fdkaac | |
ocaml-faad | |
ocaml-flac | |
ocaml-soundtouch | |
ocaml-samplerate | |
ocaml-xmlplaylist | |
ocaml-lastfm | |
ocaml-lo | |
ocaml-dtools | |
ocaml-duppy | |
ocaml-mm | |
liquidsoap | |
EOF | |
sudo apt-get -y install \ | |
checkinstall \ | |
ocaml-nox \ | |
pkg-config \ | |
libpcre-ocaml-dev \ | |
libcamomile-ocaml-dev \ | |
libxmlm-ocaml-dev \ | |
libmagic-ocaml-dev \ | |
libssl-ocaml-dev \ | |
libyojson-ocaml-dev \ | |
libao-dev \ | |
libasound2-dev \ | |
libmad0-dev \ | |
libtag1-dev \ | |
libmp3lame-dev \ | |
libogg-dev \ | |
libvorbis-dev \ | |
libfdk-aac-dev \ | |
libfaad-dev \ | |
libflac-dev \ | |
libsamplerate0-dev \ | |
libshine-dev \ | |
libspeex-dev \ | |
libtheora-dev \ | |
libopus-dev \ | |
libsoundtouch-dev \ | |
liblo-dev || exit 1 | |
if [ ! -f "/usr/local/lib/ocaml/$(ocaml -vnum)/inotify/META" ] | |
then | |
echo "Installing requirement ocaml-inotify" | |
wget -O ocaml-inotify-2.3.tar.gz https://github.com/whitequark/ocaml-inotify/archive/v2.3.tar.gz | |
tar xvzf ocaml-inotify-2.3.tar.gz | |
cd ocaml-inotify-2.3 | |
./configure || exit 1 | |
make || exit 1 | |
sudo make install || exit 1 | |
cd .. | |
else | |
echo "ocaml-inotify-$(grep '^version' /usr/local/lib/ocaml/$(ocaml -vnum)/inotify/META | sed -e 's/.*"\([^"]*\)".*/\1/') already installed" | |
fi | |
sudo adduser --system --disabled-password --group liquidsoap | |
sudo adduser liquidsoap audio | |
./configure \ | |
--disable-gui \ | |
--disable-graphics \ | |
--localstatedir=/var \ | |
--sysconfdir=/etc \ | |
|| exit 1 | |
make || exit 1 | |
sudo dpkg -r liquidsoap | |
LIQUIDSOAP_PKG_VER="1.3.7~dtcooper~$LIQUIDSOAP_GIT_REV" | |
sudo checkinstall \ | |
--pkgname=liquidsoap --pkgversion="$LIQUIDSOAP_PKG_VER" \ | |
--fstrans=no --backup=no --deldoc=yes -y | |
cd ../.. | |
sudo rm -rf "$HOME/liquidsoap-build" | |
echo "--------------" | |
echo | |
echo "Liquidsoap-$LIQUIDSOAP_PKG_VER installed, use \`dpkg -r liquidsoap\` to remove" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#LIQUIDSOAP_OPAM_DEPS="alsa ao cry faad fdkaac flac inotify lame lastfm lo mad magic ogg opus samplerate soundtouch speex ssl taglib theora voaacenc vorbis xmlplaylist yojson" | |
LIQUIDSOAP_OPAM_DEPS="taglib mad lame vorbis cry alsa" | |
# Change "liquidsoap" => "liquidsoap.1.2.1" for a different version | |
LIQUIDSOAP_VERSION="liquidsoap" | |
# Install opam and minimal ocaml | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y --no-install-recommends ocaml-nox opam | |
# Add a liquidsoap user | |
sudo adduser --system --disabled-password --shell=/bin/bash --group liquidsoap | |
sudo adduser liquidsoap audio | |
# Init opam + install depext | |
sudo -iu liquidsoap opam init -ya | |
sudo -iu liquidsoap opam install depext | |
# Compute dependencies | |
DEPS=$(sudo -iu liquidsoap opam depext -l $LIQUIDSOAP_OPAM_DEPS $LIQUIDSOAP_VERSION) | |
# Install dependencies | |
DEPS=$(echo "$DEPS" | grep '^# - ' | sed 's/^# - //') | |
sudo apt-get -y install $DEPS | |
# Install opam packages including liquidsoap | |
sudo -iu liquidsoap opam install -y $LIQUIDSOAP_OPAM_DEPS $LIQUIDSOAP_VERSION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p "$HOME/liquidsoap-build" | |
cd "$HOME/liquidsoap-build" | |
wget https://github.com/savonet/liquidsoap/releases/download/1.3.0/liquidsoap-1.3.0-full.tar.gz | |
tar xvzf liquidsoap-1.3.0-full.tar.gz | |
cd liquidsoap-1.3.0-full | |
cd liquidsoap-1.3.0 | |
# Apply some patches | |
# fix run_process() | |
wget -O - https://github.com/savonet/liquidsoap/commit/a9ef199e.patch | patch -tp1 | |
# don't hang on http.get (hunk against CHANGES will fail, that's okay) | |
wget -O - https://github.com/savonet/liquidsoap/commit/522e0e19.patch | patch -tp1 | |
# Patch file.contents() | |
wget -O - https://github.com/savonet/liquidsoap/commit/34c1e67d.patch | patch -tp1 | |
cd .. | |
cat > PACKAGES <<EOF | |
ocaml-cry | |
ocaml-ao | |
ocaml-alsa | |
ocaml-mad | |
ocaml-taglib | |
ocaml-lame | |
ocaml-shine | |
ocaml-ogg | |
ocaml-vorbis | |
ocaml-speex | |
ocaml-theora | |
ocaml-opus | |
ocaml-fdkaac | |
ocaml-faad | |
ocaml-flac | |
ocaml-soundtouch | |
ocaml-samplerate | |
ocaml-xmlplaylist | |
ocaml-lastfm | |
ocaml-lo | |
ocaml-dtools | |
ocaml-duppy | |
ocaml-mm | |
liquidsoap | |
EOF | |
sudo apt-get -y install \ | |
checkinstall \ | |
ocaml-nox \ | |
pkg-config \ | |
libpcre-ocaml-dev \ | |
libcamomile-ocaml-dev \ | |
libxmlm-ocaml-dev \ | |
libmagic-ocaml-dev \ | |
libssl-ocaml-dev \ | |
libyojson-ocaml-dev \ | |
libao-dev \ | |
libasound2-dev \ | |
libmad0-dev \ | |
libtag1-dev \ | |
libmp3lame-dev \ | |
libogg-dev \ | |
libvorbis-dev \ | |
libfdk-aac-dev \ | |
libfaad-dev \ | |
libflac-dev \ | |
libsamplerate0-dev \ | |
libshine-dev \ | |
libspeex-dev \ | |
libtheora-dev \ | |
libopus-dev \ | |
libsoundtouch-dev \ | |
liblo-dev || exit 1 | |
if [ ! -f "/usr/local/lib/ocaml/$(ocaml -vnum)/inotify/META" ] | |
then | |
echo "Installing requirement ocaml-inotify" | |
wget -O ocaml-inotify-2.3.tar.gz https://github.com/whitequark/ocaml-inotify/archive/v2.3.tar.gz | |
tar xvzf ocaml-inotify-2.3.tar.gz | |
cd ocaml-inotify-2.3 | |
./configure || exit 1 | |
make || exit 1 | |
sudo make install || exit 1 | |
cd .. | |
else | |
echo "ocaml-inotify-$(grep '^version' /usr/local/lib/ocaml/$(ocaml -vnum)/inotify/META | sed -e 's/.*"\([^"]*\)".*/\1/') already installed" | |
fi | |
sudo adduser --system --disabled-password --group liquidsoap | |
sudo adduser liquidsoap audio | |
./configure \ | |
--disable-gui \ | |
--disable-graphics \ | |
--localstatedir=/var \ | |
--sysconfdir=/etc \ | |
|| exit 1 | |
make || exit 1 | |
sudo dpkg -r liquidsoap | |
sudo checkinstall \ | |
--pkgname=liquidsoap --pkgversion="1.3.0~dtcooper2" \ | |
--fstrans=no --backup=no --deldoc=yes -y | |
cd ../.. | |
sudo rm -rf "$HOME/liquidsoap-build" | |
echo | |
echo "Patched liquidsoap-1.3.0 installed, use \`dpkg -r liquidsoap\` to remove" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment