RivendellAudio pour Debian Bullseye
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.9 KiB

#!/bin/bash
########################
# ./install.sh <git tag>
########################
set -e
REP_SCRIPT=$(pwd)
read -p "Session utilsateur utilisant Rivendell (hors root) ? " UTILISATEUR
# Installation dépendences
apt update
apt -y install \
imagemagick libmagick++-dev git autoconf automake libtool g++ qtbase5-dev libqt5sql5-mysql \
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 mariadb-server \
mariadb-client apache2
# Clone du code source
cd /tmp
git clone https://git.weblib.re/Autres/Rivendellaudio
cd Rivendellaudio
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 ${UTILISATEUR} rivendell
chown -R rivendell:rivendell /var/snd
chmod 0775 /var/snd
# Initialisation BDD Audio Démo
mysql < ${REP_SCRIPT}/rivendell.sql
rddbmgr --create --generate-audio
# Démarrage services
a2enmod cgid #pour rdimport
systemctl restart apache2
systemctl start rivendell
systemctl enable rivendell
exit 0