64 lines
1.9 KiB
Bash
Executable File
64 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
########################
|
|
# ./install.sh <git tag>
|
|
########################
|
|
|
|
set -e
|
|
|
|
PATH_SCRIPT_INSTALL=$(pwd)
|
|
read -p "Session utilsateur utilisant Rivendell (hors root) ? " USER
|
|
|
|
# Installation dépendences
|
|
apt update
|
|
|
|
apt -y install autoconf automake libtool g++ qtbase5-dev libqt5sql5-mysql \
|
|
libqt5webkit5-dev qttools5-dev-tools libexpat1 libexpat1-dev libssl-dev \
|
|
libsamplerate-dev libsndfile-dev libcdparanoia-dev libcoverart-dev libdiscid-dev \
|
|
libmusicbrainz5-dev libid3-dev libtag1-dev libcurl4-gnutls-dev libpam0g-dev \
|
|
libsoundtouch-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make \
|
|
libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \
|
|
libmad0-dev libtwolame-dev python3 python3-pycurl python3-pymysql python3-serial \
|
|
python3-requests libmagick++-dev debhelper mariadb-server mariadb-client libmariadb-dev \
|
|
apache2
|
|
|
|
# Clone du code source
|
|
cd /tmp
|
|
git clone https://github.com/ElvishArtisan/rivendell.git
|
|
cd rivendell
|
|
git checkout $1
|
|
./autogen.sh
|
|
|
|
# Variable d'environnement pour la doc
|
|
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns
|
|
|
|
# Compilation
|
|
./configure --prefix=/usr --libdir=/usr/lib --libexecdir=/var/www/rd-bin \
|
|
--sysconfdir=/etc/apache2/conf-enabled \
|
|
--enable-rdxport-debug MUSICBRAINZ_LIBS="-ldiscid -lmusicbrainz5cc -lcoverartcc"
|
|
|
|
make
|
|
make install
|
|
|
|
# Copie fichier de config à compléter
|
|
cp conf/rd.conf-sample /etc/rd.conf
|
|
cp conf/asound.conf-sample /etc/asound.conf
|
|
|
|
# Création user dossier audio
|
|
adduser --uid 150 --system --group --home=/var/snd rivendell
|
|
adduser ${USER} rivendell
|
|
chown -R rivendell:rivendell /var/snd
|
|
chmod 0775 /var/snd
|
|
|
|
# Initialisation BDD Audio Démo
|
|
mysql < ${PATH_SCRIPT_INSTALL}/rivendell.sql
|
|
rddbmgr --create --generate-audio
|
|
|
|
# Démarrage services
|
|
a2enmod cgid #pour rdimport
|
|
systemctl restart apache2
|
|
systemctl start rivendell
|
|
systemctl enable rivendell
|
|
|
|
exit 0
|