sdrplay-fm-radio/dependencies/build_dependencies

95 lines
2.3 KiB
Bash
Executable File

#! /bin/bash
set -eux
echo "Beginning project setup for SDRPlay interface." > build.log
date >> build.log
# Install build dependencies
# Debian:
sudo apt-get install -y \
git build-essential automake cmake \
libpulse-dev libgtk-3-dev \
freeglut3 freeglut3-dev
# RedHat:
#sudo dnf install pulseaudio-libs-devel gtk3-devel freeglut-devel
# These are necessary for building the python bindings for SoapySDR.
# These must be installed before building SoapySDR for the python
# bindings to be available on the system.
sudo apt-get install -y python-dev swig
# These are required for building Soapy RTL-SDR
sudo apt-get install -y rtl-sdr librtlsdr-dev
# Build SoapySDR
if ! [ -d SoapySDR ]; then
git clone https://github.com/pothosware/SoapySDR.git
pushd SoapySDR
mkdir build
pushd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j
sudo make install
sudo ldconfig
SoapySDRUtil --info #test SoapySDR install
popd
popd
fi
# Build SoapySDRPlay plugin
if ! [ -d SoapySDRPlay ]; then
git clone https://github.com/pothosware/SoapySDRPlay.git
pushd SoapySDRPlay
mkdir build
pushd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j
sudo make install
popd
popd
fi
# Build SoapyRTLSDR plugin
if ! [ -d SoapyRTLSDR ]; then
git clone https://github.com/pothosware/SoapyRTLSDR.git
pushd SoapyRTLSDR
mkdir build
pushd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j
sudo make install
popd
popd
fi
# SoapySDRPlay plugin can overwrite some of the installed files for SoapySDR with older
# versions - re-run the installer for SoapySDR base to ensure we have the latest ones.
pushd SoapySDR/build
sudo make install
popd
# Build liquid-dsp
if ! [ -d liquid-dsp ]; then
git clone https://github.com/jgaeddert/liquid-dsp
pushd liquid-dsp
./bootstrap.sh
CFLAGS="-march=native -O3" ./configure --enable-fftoverride
make -j
sudo make install
sudo ldconfig
popd
fi
# Get mediamtx (no system package available)
mkdir -p mediamtx
pushd mediamtx
wget https://github.com/aler9/mediamtx/releases/download/v0.22.2/mediamtx_v0.22.2_linux_amd64.tar.gz
tar -xzvf mediamtx_v0.22.2_linux_amd64.tar.gz
popd
echo "Setup completed." >> build.log
date >> build.log
exit 0