feat[scripts]: add 'install_xrdp_pulseaudio_module' script

This commit is contained in:
Dennis Buchhorn 2023-07-05 21:56:28 +02:00
parent d129bd0c8b
commit ffe0cf5ea4

View File

@ -0,0 +1,36 @@
#!/bin/bash
echo "##########################################################################################"
echo "# install script for xrdp-pulseaudio module"
echo "# Dennis Buchhorn - code@b-eit.de"
echo "##########################################################################################"
echo ""
if ! [[ $(id -u) == "0" ]]; then
echo "The script need to be run as root!" >&2
exit 1
fi
if [[ $SUDO_USER ]]; then
real_user=$SUDO_USER
else
real_user=$(whoami)
fi
apt update
apt install build-essential dpkg-dev libpulse-dev git autoconf libtool
BUILD_DIR=$(mktemp -d)
git clone https://git.bs.b-eit.de/bucde/notes_pulseaudio-module-xrdp.git "$BUILD_DIR/xrdp_pulseaudio_module"
cd "$BUILD_DIR/xrdp_pulseaudio_module"
git checkout custom
scripts/install_pulseaudio_sources_apt_wrapper.sh
./bootstrap
./configure PULSE_DIR=$BUILD_DIR/xrdp_pulseaudio_module/pulseaudio.src
make
make install
rm -rf $BUILD_DIR