update for docker builds and buildall.sh script (#47)

* upadte docker images

* fix sdrplay api install on docker

* update buildall.sh script to allow single package builds and multiarch
This commit is contained in:
Stanislav Lechev [0xAF] 2024-02-05 22:49:36 +02:00 committed by GitHub
parent 774fc133da
commit 847902a05c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 291 additions and 125 deletions

View File

@ -6,101 +6,191 @@
# OUTPUT_DIR folder. # OUTPUT_DIR folder.
# #
BUILD_DIR=./owrx-build set -euo pipefail
OUTPUT_DIR=./owrx-output
rm -rf ${BUILD_DIR} ${OUTPUT_DIR} GIT_CSDR=https://github.com/luarvique/csdr.git
mkdir ${BUILD_DIR} ${OUTPUT_DIR} GIT_PYCSDR=https://github.com/luarvique/pycsdr.git
GIT_OWRXCONNECTOR=https://github.com/luarvique/owrx_connector.git
GIT_CODECSERVER=https://github.com/jketterl/codecserver.git
GIT_DIGIHAM=https://github.com/jketterl/digiham.git
GIT_PYDIGIHAM=https://github.com/jketterl/pydigiham.git
GIT_JS8PY=https://github.com/jketterl/js8py.git
GIT_SOAPYSDRPLAY3=https://github.com/luarvique/SoapySDRPlay3.git
GIT_OPENWEBRX=https://github.com/luarvique/openwebrx.git
BUILD_DIR=./owrx-build/`uname -m`
OUTPUT_DIR=./owrx-output/`uname -m`
if [ "${1:-}" == "--ask" ]; then
echo;read -n1 -p "Build csdr? [yN] " ret
[[ "$ret" == [Yy]* ]] && BUILD_CSDR=y || BUILD_CSDR=n
echo;read -n1 -p "Build pycsdr? [yN] " ret
[[ "$ret" == [Yy]* ]] && BUILD_PYCSDR=y || BUILD_PYCSDR=n
echo;read -n1 -p "Build owrxconnector? [yN] " ret
[[ "$ret" == [Yy]* ]] && BUILD_OWRXCONNECTOR=y || BUILD_OWRXCONNECTOR=n
echo;read -n1 -p "Build codecserver? [yN] " ret
[[ "$ret" == [Yy]* ]] && BUILD_CODECSERVER=y || BUILD_CODECSERVER=n
echo;read -n1 -p "Build digiham? [yN] " ret
[[ "$ret" == [Yy]* ]] && BUILD_DIGIHAM=y || BUILD_DIGIHAM=n
echo;read -n1 -p "Build pydigiham? [yN] " ret
[[ "$ret" == [Yy]* ]] && BUILD_PYDIGIHAM=y || BUILD_PYDIGIHAM=n
echo;read -n1 -p "Build js8py? [yN] " ret
[[ "$ret" == [Yy]* ]] && BUILD_JS8PY=y || BUILD_JS8PY=n
echo;read -n1 -p "Build SoapySDRPlay3? [yN] " ret
[[ "$ret" == [Yy]* ]] && BUILD_SOAPYSDRPLAY3=y || BUILD_SOAPYSDRPLAY3=n
echo;read -n1 -p "Build OpenWebRX+? [Yn] " ret
[[ "$ret" == [Nn]* ]] && BUILD_OWRX=n || BUILD_OWRX=y
echo;read -n1 -p "Clean the Output folder? [yN] " ret
[[ "$ret" == [Yy]* ]] && CLEAN_OUTPUT=y || CLEAN_OUTPUT=n
else
# build all by default
BUILD_OWRX=y
BUILD_CSDR=y
BUILD_PYCSDR=y
BUILD_OWRXCONNECTOR=y
BUILD_SOAPYSDRPLAY3=y
BUILD_CODECSERVER=y
BUILD_DIGIHAM=y
BUILD_PYDIGIHAM=y
BUILD_JS8PY=y
CLEAN_OUTPUT=y
fi
echo ======================================
echo "Building:"
echo "csdr: $BUILD_CSDR"
echo "pycsdr: $BUILD_PYCSDR"
echo "owrx connector: $BUILD_OWRXCONNECTOR"
echo "codec server: $BUILD_CODECSERVER"
echo "digiham: $BUILD_DIGIHAM"
echo "pydigiham: $BUILD_PYDIGIHAM"
echo "js8py: $BUILD_JS8PY"
echo "Soapy SDRPlay3: $BUILD_SOAPYSDRPLAY3"
echo "OpenWebRx: $BUILD_OWRX"
echo "Clean OUTPUT folder: $CLEAN_OUTPUT"
echo ======================================
if [ "${1:-}" == "--ask" ]; then
read -p "Press [ENTER] to continue, or CTRL-C, to exit."
fi
rm -rf ${BUILD_DIR}
if [ "${CLEAN_OUTPUT:-}" == "y" ]; then
rm -rf ${OUTPUT_DIR}
fi
mkdir -p ${BUILD_DIR} ${OUTPUT_DIR}
pushd ${BUILD_DIR} pushd ${BUILD_DIR}
echo "##### Cloning GIT repositories to ${BUILD_DIR} ... #####" if [ "${BUILD_CSDR:-}" == "y" ] || [ "${BUILD_PYCSDR:-}" == "y" ] || [ "${BUILD_OWRXCONNECTOR:-}" == "y" ]; then
git clone -b master https://github.com/luarvique/csdr.git echo "##### Building CSDR... #####"
git clone -b master https://github.com/luarvique/pycsdr.git git clone -b master "$GIT_CSDR"
git clone -b master https://github.com/luarvique/owrx_connector.git pushd csdr
git clone -b master https://github.com/luarvique/openwebrx.git if [ `gcc -dumpversion` -gt 10 ]; then
git clone -b master https://github.com/luarvique/SoapySDRPlay3.git # fix armhf builds on gcc>=11 (bookworm)
git clone -b master https://github.com/jketterl/codecserver.git sed -i 's/-march=armv7-a /-march=armv7-a+fp /g' CMakeLists.txt
git clone -b master https://github.com/jketterl/digiham.git fi
git clone -b master https://github.com/jketterl/pydigiham.git dpkg-buildpackage -us -uc
git clone -b master https://github.com/jketterl/js8py.git popd
# PyCSDR and OWRX-Connector builds depend on the latest CSDR
echo "##### Building CSDR... #####" sudo dpkg -i csdr*.deb libcsdr*.deb nmux*.deb
pushd csdr
dpkg-buildpackage -us -uc
popd
# PyCSDR and OWRX-Connector builds depend on the latest CSDR
sudo dpkg -i csdr*.deb libcsdr*.deb nmux*.deb
echo "##### Building PyCSDR... #####"
pushd pycsdr
dpkg-buildpackage -us -uc
popd
# OpenWebRX build depends on the latest PyCSDR
sudo dpkg -i python3-csdr*.deb
echo "##### Building OWRX-Connector... #####"
pushd owrx_connector
dpkg-buildpackage -us -uc
popd
# Not installing OWRX-Connectors here since there are no
# further build steps depending on it
#sudo dpkg -i *connector*.deb
echo "##### Building CodecServer... #####"
pushd codecserver
dpkg-buildpackage -us -uc
popd
# Not installing CodecServer here since there are no
# further build steps depending on it
#sudo dpkg -i *codecserver*.deb
echo "##### Building DigiHAM... #####"
pushd digiham
dpkg-buildpackage -us -uc
popd
# PyDigiHAM build depends on the latest DigiHAM
sudo dpkg -i *digiham*.deb
echo "##### Building PyDigiHAM... #####"
pushd pydigiham
dpkg-buildpackage -us -uc
popd
# Not installing PyDigiHAM here since there are no further
# build steps depending on it
#sudo dpkg -i python3-digiham*.deb
echo "##### Building JS8Py... #####"
pushd js8py
dpkg-buildpackage -us -uc
popd
# Not installing JS8Py here since there are no further
# build steps depending on it
#sudo dpkg -i *js8py*.deb
echo "##### Building OpenWebRX... #####"
pushd openwebrx
dpkg-buildpackage -us -uc
popd
# Not installing OpenWebRX here since there are no further
# build steps depending on it
#sudo dpkg -i openwebrx*.deb
pushd SoapySDRPlay3
# Debian Bullseye uses SoapySDR v0.7
HAVE_SOAPY=`apt-cache search libsoapysdr0.7`
if [ ! -z "${HAVE_SOAPY}" ] ; then
echo "##### Building SoapySDRPlay3 v0.7 (Debian) ... #####"
cp debian/control.debian debian/control
dpkg-buildpackage -us -uc
fi fi
# Ubuntu Jammy uses SoapySDR v0.8
HAVE_SOAPY=`apt-cache search libsoapysdr0.8` if [ "${BUILD_PYCSDR:-}" == "y" ]; then
if [ ! -z "${HAVE_SOAPY}" ] ; then echo "##### Building PyCSDR... #####"
echo "##### Building SoapySDRPlay3 v0.8 (Ubuntu) ... #####" git clone -b master "$GIT_PYCSDR"
cp debian/control.ubuntu debian/control pushd pycsdr
dpkg-buildpackage -us -uc dpkg-buildpackage -us -uc
popd
# OpenWebRX build depends on the latest PyCSDR
sudo dpkg -i python3-csdr*.deb
fi fi
popd
if [ "${BUILD_OWRXCONNECTOR:-}" == "y" ]; then
echo "##### Building OWRX-Connector... #####"
git clone -b master "$GIT_OWRXCONNECTOR"
pushd owrx_connector
dpkg-buildpackage -us -uc
popd
# Not installing OWRX-Connectors here since there are no
# further build steps depending on it
#sudo dpkg -i *connector*.deb
fi
if [ "${BUILD_CODECSERVER:-}" == "y" ]; then
echo "##### Building CodecServer... #####"
git clone -b master "$GIT_CODECSERVER"
pushd codecserver
dpkg-buildpackage -us -uc
popd
# Digiham depends on libcodecserver-dev
sudo dpkg -i libcodecserver_*.deb codecserver_*.deb libcodecserver-dev_*.deb
fi
if [ "${BUILD_DIGIHAM:-}" == "y" ] || [ "${BUILD_PYDIGIHAM:-}" == "y" ]; then
echo "##### Building DigiHAM... #####"
git clone -b master "$GIT_DIGIHAM"
pushd digiham
dpkg-buildpackage -us -uc
popd
# PyDigiHAM build depends on the latest DigiHAM
sudo dpkg -i *digiham*.deb
fi
if [ "${BUILD_PYDIGIHAM:-}" == "y" ]; then
echo "##### Building PyDigiHAM... #####"
git clone -b master "$GIT_PYDIGIHAM"
pushd pydigiham
dpkg-buildpackage -us -uc
popd
# Not installing PyDigiHAM here since there are no further
# build steps depending on it
#sudo dpkg -i python3-digiham*.deb
fi
if [ "${BUILD_JS8PY:-}" == "y" ]; then
echo "##### Building JS8Py... #####"
git clone -b master "$GIT_JS8PY"
pushd js8py
dpkg-buildpackage -us -uc
popd
# Not installing JS8Py here since there are no further
# build steps depending on it
#sudo dpkg -i *js8py*.deb
fi
if [ "${BUILD_SOAPYSDRPLAY3:-}" == "y" ]; then
echo "##### Building SoapySDRPlay3 ... #####"
git clone -b master "$GIT_SOAPYSDRPLAY3"
pushd SoapySDRPlay3
# Debian Bullseye uses SoapySDR v0.7
HAVE_SOAPY=`apt-cache search libsoapysdr0.7`
if [ ! -z "${HAVE_SOAPY}" ] ; then
echo "##### Building SoapySDRPlay3 v0.7 (Debian) ... #####"
cp debian/control.debian debian/control
dpkg-buildpackage -us -uc
fi
# Ubuntu Jammy uses SoapySDR v0.8
HAVE_SOAPY=`apt-cache search libsoapysdr0.8`
if [ ! -z "${HAVE_SOAPY}" ] ; then
echo "##### Building SoapySDRPlay3 v0.8 (Ubuntu) ... #####"
cp debian/control.ubuntu debian/control
dpkg-buildpackage -us -uc
fi
popd
fi
if [ "${BUILD_OWRX:-}" == "y" ]; then
echo "##### Building OpenWebRX... #####"
git clone -b master "$GIT_OPENWEBRX"
pushd openwebrx
dpkg-buildpackage -us -uc
popd
# Not installing OpenWebRX here since there are no further
# build steps depending on it
#sudo dpkg -i openwebrx*.deb
fi
echo "##### Moving packages to ${OUTPUT_DIR} ... #####" echo "##### Moving packages to ${OUTPUT_DIR} ... #####"
popd popd

View File

@ -22,13 +22,15 @@ function cmakebuild() {
export MARCH=native export MARCH=native
case `uname -m` in case `uname -m` in
arm*) arm*)
SDRPLAY_BINARY=SDRplay_RSP_API-ARM32-3.07.2.run #SDRPLAY_BINARY=SDRplay_RSP_API-ARM32-3.07.2.run
SDRPLAY_BINARY=SDRplay_RSP_API-Linux-3.14.0.run
;; ;;
aarch64*) aarch64*)
SDRPLAY_BINARY=SDRplay_RSP_API-ARM64-3.07.1.run #SDRPLAY_BINARY=SDRplay_RSP_API-ARM64-3.07.1.run
SDRPLAY_BINARY=SDRplay_RSP_API-Linux-3.14.0.run
;; ;;
x86_64*) x86_64*)
SDRPLAY_BINARY=SDRplay_RSP_API-Linux-3.07.1.run SDRPLAY_BINARY=SDRplay_RSP_API-Linux-3.07.2.run
export MARCH=x86-64 export MARCH=x86-64
;; ;;
esac esac

View File

@ -1,14 +1,12 @@
diff -ur sdrplay-orig/install_lib.sh sdrplay/install_lib.sh diff -ur sdrplay-orig/install_lib.sh sdrplay/install_lib.sh
--- sdrplay-orig/install_lib.sh 2020-05-24 14:30:06.022483867 +0000 --- sdrplay-orig/install_lib.sh 2024-02-05 00:33:32.563433411 +0200
+++ sdrplay/install_lib.sh 2020-05-24 14:30:49.093435726 +0000 +++ sdrplay/install_lib.sh 2024-02-05 00:37:18.391679938 +0200
@@ -4,19 +4,6 @@ @@ -17,18 +17,6 @@
export MAJVERS="3" echo "the system files."
echo " "
echo "Installing SDRplay RSP API library ${VERS}..."
-read -p "Press RETURN to view the license agreement" ret -read -p "Press RETURN to view the license agreement" ret
- -more -d sdrplay_license.txt
-more sdrplay_license.txt
-
-while true; do -while true; do
- echo "Press y and RETURN to accept the license agreement and continue with" - echo "Press y and RETURN to accept the license agreement and continue with"
- read -p "the installation, or press n and RETURN to exit the installer [y/n] " yn - read -p "the installation, or press n and RETURN to exit the installer [y/n] " yn
@ -18,6 +16,52 @@ diff -ur sdrplay-orig/install_lib.sh sdrplay/install_lib.sh
- * ) echo "Please answer y or n";; - * ) echo "Please answer y or n";;
- esac - esac
-done -done
-
echo " "
echo "A copy of the license agreement can be found here: ${HOME}/sdrplay_license.txt"
cp sdrplay_license.txt ${HOME}/.
@@ -255,43 +243,6 @@
echo " "
export ARCH=`uname -m` # 0--------1---------2---------3---------4---------5---------6---------7---------8
-while true; do
- echo "To continue the installation with these defaults press y and RETURN"
- read -p "or press n and RETURN to change them [y/n] " yn
- case $yn in
- [Yy]* ) change="n";break;;
- [Nn]* ) change="y";break;;
- * ) echo "Please answer y or n";;
- esac
-done
-
-if [ "${change}" == "y" ]; then
- echo "Changing default locations..."
- read -p "API service location [${locservice}]: " newloc
- if [ "${newloc}" != "" ]; then
- locservice=${newloc}
- fi
- read -p "API header files location [${locheader}]: " newloc
- if [ "${newloc}" != "" ]; then
- locheader=${newloc}
- fi
- read -p "API shared library location [${loclib}]: " newloc
- if [ "${newloc}" != "" ]; then
- loclib=${newloc}
- fi
-
- echo "API service : ${locservice}"
- echo "API header files : ${locheader}"
- echo "API shared library : ${loclib}"
- while true; do
- read -p "Please confirm these are correct [y/n] " yn
- case $yn in
- [Yy]* ) break;;
- [Nn]* ) echo "paths not confirmed. Exiting...";exit 1;;
- * ) echo "Please answer y or n";;
- esac
- done
-fi
sudo mkdir -p -m 755 ${locservice} >> /dev/null 2>&1
sudo mkdir -p -m 755 ${locheader} >> /dev/null 2>&1
Only in sdrplay: install_lib.sh.org

View File

@ -1,14 +1,12 @@
diff -ur sdrplay-orig/install_lib.sh sdrplay/install_lib.sh diff -ur sdrplay-orig/install_lib.sh sdrplay/install_lib.sh
--- sdrplay-orig/install_lib.sh 2020-05-24 13:56:56.622000041 +0000 --- sdrplay-orig/install_lib.sh 2024-02-05 00:33:32.563433411 +0200
+++ sdrplay/install_lib.sh 2020-05-24 13:58:51.837801559 +0000 +++ sdrplay/install_lib.sh 2024-02-05 00:37:18.391679938 +0200
@@ -4,19 +4,6 @@ @@ -17,18 +17,6 @@
MAJVERS="3" echo "the system files."
echo " "
echo "Installing SDRplay RSP API library ${VERS}..."
-read -p "Press RETURN to view the license agreement" ret -read -p "Press RETURN to view the license agreement" ret
- -more -d sdrplay_license.txt
-more sdrplay_license.txt
-
-while true; do -while true; do
- echo "Press y and RETURN to accept the license agreement and continue with" - echo "Press y and RETURN to accept the license agreement and continue with"
- read -p "the installation, or press n and RETURN to exit the installer [y/n] " yn - read -p "the installation, or press n and RETURN to exit the installer [y/n] " yn
@ -18,22 +16,52 @@ diff -ur sdrplay-orig/install_lib.sh sdrplay/install_lib.sh
- * ) echo "Please answer y or n";; - * ) echo "Please answer y or n";;
- esac - esac
-done -done
-
echo " "
echo "A copy of the license agreement can be found here: ${HOME}/sdrplay_license.txt"
cp sdrplay_license.txt ${HOME}/.
@@ -255,43 +243,6 @@
echo " "
ARCH=`uname -m` # 0--------1---------2---------3---------4---------5---------6---------7---------8
OSDIST="Unknown"
@@ -157,15 +144,6 @@
echo " "
echo "SDRplay API ${VERS} Installation Finished"
echo " "
-while true; do -while true; do
- echo "Would you like to add SDRplay USB IDs to the local database for easier" - echo "To continue the installation with these defaults press y and RETURN"
- read -p "identification in applications such as lsusb? [y/n] " yn - read -p "or press n and RETURN to change them [y/n] " yn
- case $yn in - case $yn in
- [Yy]* ) break;; - [Yy]* ) change="n";break;;
- [Nn]* ) exit;; - [Nn]* ) change="y";break;;
- * ) echo "Please answer y or n";; - * ) echo "Please answer y or n";;
- esac - esac
-done -done
sudo cp scripts/sdrplay_usbids.sh ${INSTALLBINDIR}/. -
sudo chmod 755 ${INSTALLBINDIR}/sdrplay_usbids.sh -if [ "${change}" == "y" ]; then
sudo cp scripts/sdrplay_ids.txt ${INSTALLBINDIR}/. - echo "Changing default locations..."
- read -p "API service location [${locservice}]: " newloc
- if [ "${newloc}" != "" ]; then
- locservice=${newloc}
- fi
- read -p "API header files location [${locheader}]: " newloc
- if [ "${newloc}" != "" ]; then
- locheader=${newloc}
- fi
- read -p "API shared library location [${loclib}]: " newloc
- if [ "${newloc}" != "" ]; then
- loclib=${newloc}
- fi
-
- echo "API service : ${locservice}"
- echo "API header files : ${locheader}"
- echo "API shared library : ${loclib}"
- while true; do
- read -p "Please confirm these are correct [y/n] " yn
- case $yn in
- [Yy]* ) break;;
- [Nn]* ) echo "paths not confirmed. Exiting...";exit 1;;
- * ) echo "Please answer y or n";;
- esac
- done
-fi
sudo mkdir -p -m 755 ${locservice} >> /dev/null 2>&1
sudo mkdir -p -m 755 ${locheader} >> /dev/null 2>&1
Only in sdrplay: install_lib.sh.org

View File

@ -28,13 +28,15 @@ if [[ -z ${1:-} ]]; then
case $ARCH in case $ARCH in
x86_64) x86_64)
BINARY=SDRplay_RSP_API-Linux-3.07.1.run #BINARY=SDRplay_RSP_API-Linux-3.07.1.run
BINARY=SDRplay_RSP_API-Linux-3.14.0.run
;; ;;
armv*) armv*)
BINARY=SDRplay_RSP_API-ARM32-3.07.2.run BINARY=SDRplay_RSP_API-ARM32-3.07.2.run
;; ;;
aarch64) aarch64)
BINARY=SDRplay_RSP_API-ARM64-3.07.1.run #BINARY=SDRplay_RSP_API-ARM64-3.07.1.run
BINARY=SDRplay_RSP_API-Linux-3.14.0.run
;; ;;
esac esac