diff --git a/docker/Dockerfiles/Dockerfile-sdrplay b/docker/Dockerfiles/Dockerfile-sdrplay index 1e11c8a..cd5e37e 100644 --- a/docker/Dockerfiles/Dockerfile-sdrplay +++ b/docker/Dockerfiles/Dockerfile-sdrplay @@ -2,5 +2,6 @@ ARG ARCH FROM openwebrx-base:$ARCH ADD docker/scripts/install-dependencies-sdrplay.sh / +ADD docker/scripts/install-lib.*.patch / RUN /install-dependencies-sdrplay.sh diff --git a/docker/scripts/install-dependencies-sdrplay.sh b/docker/scripts/install-dependencies-sdrplay.sh index bdad22f..888510b 100755 --- a/docker/scripts/install-dependencies-sdrplay.sh +++ b/docker/scripts/install-dependencies-sdrplay.sh @@ -20,7 +20,9 @@ BUILD_PACKAGES="git cmake make patch wget sudo udev gcc g++ libusb-dev" apk add --no-cache $STATIC_PACKAGES apk add --no-cache --virtual .build-deps $BUILD_PACKAGES -case $(uname -m) in +ARCH=$(uname -m) + +case $ARCH in x86_64) BINARY=SDRplay_RSP_API-Linux-2.13.1.run ;; @@ -31,48 +33,8 @@ esac wget http://www.sdrplay.com/software/$BINARY sh $BINARY --noexec --target sdrplay -patch --verbose -Np0 <<'EOF' ---- sdrplay/install_lib.sh 2018-06-21 01:57:02.000000000 +0200 -+++ sdrplay/install_lib_patched.sh 2019-01-22 17:21:06.445804136 +0100 -@@ -2,19 +2,7 @@ +patch --verbose -Np0 < /install-lib.$ARCH.patch - echo "Installing SDRplay RSP API library 2.13..." - --more sdrplay_license.txt -- --while true; do -- 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 -- case $yn in -- [Yy]* ) break;; -- [Nn]* ) exit;; -- * ) echo "Please answer y or n";; -- esac --done -- --export ARCH=`arch` -+export ARCH=`uname -m` - export VERS="2.13" - - echo "Architecture: ${ARCH}" -@@ -60,16 +48,6 @@ - echo " " - exit 1 - fi -- --if /sbin/ldconfig -p | /bin/fgrep -q libusb-1.0; then -- echo "Libusb found, continuing..." --else -- echo " " -- echo "ERROR: Libusb cannot be found. Please install libusb and then run" -- echo "the installer again. Libusb can be installed from http://libusb.info" -- echo " " -- exit 1 --fi - - #echo "Installing SoapySDRPlay..." - -EOF cd sdrplay ./install_lib.sh cd .. diff --git a/docker/scripts/install-lib.armv7l.patch b/docker/scripts/install-lib.armv7l.patch new file mode 100644 index 0000000..39d99d1 --- /dev/null +++ b/docker/scripts/install-lib.armv7l.patch @@ -0,0 +1,38 @@ +--- sdrplay/install_lib.sh 2018-06-21 20:47:08.000000000 +0200 ++++ sdrplay/install_lib_patched.sh 2019-01-22 17:35:57.761927708 +0100 +@@ -3,18 +3,6 @@ + + echo "Installing SDRplay RSP API library 2.13..." + +-more sdrplay_license.txt +- +-while true; do +- 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 +- case $yn in +- [Yy]* ) break;; +- [Nn]* ) exit;; +- * ) echo "Please answer y or n";; +- esac +-done +- + export ARCH=`arch` + export VERS="2.13" + +@@ -63,16 +51,6 @@ + echo " " + exit 1 + fi +- +-if /sbin/ldconfig -p | /bin/fgrep -q libusb-1.0; then +- echo "Libusb found, continuing..." +-else +- echo " " +- echo "ERROR: Libusb cannot be found. Please install libusb and then run" +- echo "the installer again. Libusb can be installed from http://libusb.info" +- echo " " +- exit 1 +-fi + + sudo ldconfig + diff --git a/docker/scripts/install-lib.patch b/docker/scripts/install-lib.x86_64.patch similarity index 100% rename from docker/scripts/install-lib.patch rename to docker/scripts/install-lib.x86_64.patch