From 8c0a8185497a677763598cb581ca9e723ecbb838 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Thu, 24 Jan 2019 16:46:16 +0100 Subject: [PATCH] split soapysdr from the sdrplay build --- build.sh | 1 + docker/Dockerfiles/Dockerfile-sdrplay | 2 +- docker/Dockerfiles/Dockerfile-soapysdr | 6 +++++ .../scripts/install-dependencies-sdrplay.sh | 6 ----- .../scripts/install-dependencies-soapysdr.sh | 27 +++++++++++++++++++ 5 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 docker/Dockerfiles/Dockerfile-soapysdr create mode 100755 docker/scripts/install-dependencies-soapysdr.sh diff --git a/build.sh b/build.sh index 4d03ffa..58d65b9 100755 --- a/build.sh +++ b/build.sh @@ -15,6 +15,7 @@ TAGS=$ARCH docker build --build-arg BASE_IMAGE=$BASE_IMAGE -t openwebrx-base:$ARCH -f docker/Dockerfiles/Dockerfile-base . docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-rtlsdr:$ARCH -t jketterl/openwebrx:$ARCH -f docker/Dockerfiles/Dockerfile-rtlsdr . +docker build --build-arg ARCH=$ARCH -t openwebrx-soapysdr-base:$ARCH -f docker/Dockerfiles/Dockerfile-soapysdr . docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-sdrplay:$ARCH -f docker/Dockerfiles/Dockerfile-sdrplay . if [ "$ARCH" == "armv7l" ]; then diff --git a/docker/Dockerfiles/Dockerfile-sdrplay b/docker/Dockerfiles/Dockerfile-sdrplay index cd5e37e..f9f2f1e 100644 --- a/docker/Dockerfiles/Dockerfile-sdrplay +++ b/docker/Dockerfiles/Dockerfile-sdrplay @@ -1,5 +1,5 @@ ARG ARCH -FROM openwebrx-base:$ARCH +FROM openwebrx-soapysdr-base:$ARCH ADD docker/scripts/install-dependencies-sdrplay.sh / ADD docker/scripts/install-lib.*.patch / diff --git a/docker/Dockerfiles/Dockerfile-soapysdr b/docker/Dockerfiles/Dockerfile-soapysdr new file mode 100644 index 0000000..1150442 --- /dev/null +++ b/docker/Dockerfiles/Dockerfile-soapysdr @@ -0,0 +1,6 @@ +ARG ARCH +FROM openwebrx-base:$ARCH + +ADD docker/scripts/install-dependencies-soapysdr.sh / +RUN /install-dependencies-soapysdr.sh + diff --git a/docker/scripts/install-dependencies-sdrplay.sh b/docker/scripts/install-dependencies-sdrplay.sh index 888510b..3ac29cc 100755 --- a/docker/scripts/install-dependencies-sdrplay.sh +++ b/docker/scripts/install-dependencies-sdrplay.sh @@ -41,13 +41,7 @@ cd .. rm -rf sdrplay rm $BINARY -git clone https://github.com/pothosware/SoapySDR -cmakebuild SoapySDR - git clone https://github.com/pothosware/SoapySDRPlay.git cmakebuild SoapySDRPlay -git clone https://github.com/rxseger/rx_tools -cmakebuild rx_tools - apk del .build-deps diff --git a/docker/scripts/install-dependencies-soapysdr.sh b/docker/scripts/install-dependencies-soapysdr.sh new file mode 100755 index 0000000..9e598c7 --- /dev/null +++ b/docker/scripts/install-dependencies-soapysdr.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -euxo pipefail + +function cmakebuild() { + cd $1 + mkdir build + cd build + cmake .. + make + make install + cd ../.. + rm -rf $1 +} + +cd /tmp + +BUILD_PACKAGES="git cmake make patch wget sudo udev gcc g++" + +apk add --no-cache --virtual .build-deps $BUILD_PACKAGES + +git clone https://github.com/pothosware/SoapySDR +cmakebuild SoapySDR + +git clone https://github.com/rxseger/rx_tools +cmakebuild rx_tools + +apk del .build-deps