From 1894ed50d14d71d134a685009e3b224a61578b0b Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Tue, 1 Dec 2020 23:33:05 +0100 Subject: [PATCH] add hpsdrconnector docker build --- docker/Dockerfiles/Dockerfile-full | 1 + docker/Dockerfiles/Dockerfile-hpsdr | 9 ++++ docker/scripts/install-dependencies-hpsdr.sh | 46 ++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 docker/Dockerfiles/Dockerfile-hpsdr create mode 100755 docker/scripts/install-dependencies-hpsdr.sh diff --git a/docker/Dockerfiles/Dockerfile-full b/docker/Dockerfiles/Dockerfile-full index 3462848..b68d18a 100644 --- a/docker/Dockerfiles/Dockerfile-full +++ b/docker/Dockerfiles/Dockerfile-full @@ -19,6 +19,7 @@ RUN /install-dependencies-rtlsdr.sh &&\ /install-dependencies-radioberry.sh &&\ /install-dependencies-uhd.sh &&\ /install-dependencies-redpitaya.sh &&\ + /install-dependencies-hpsdr.sh &&\ /install-connectors.sh &&\ /install-dependencies-eb200.sh &&\ rm /install-dependencies-*.sh &&\ diff --git a/docker/Dockerfiles/Dockerfile-hpsdr b/docker/Dockerfiles/Dockerfile-hpsdr new file mode 100644 index 0000000..96d58b9 --- /dev/null +++ b/docker/Dockerfiles/Dockerfile-hpsdr @@ -0,0 +1,9 @@ +ARG ARCHTAG +FROM openwebrx-base:$ARCHTAG + +COPY docker/scripts/install-dependencies-hpsdr.sh / + +RUN /install-dependencies-hpsdr.sh &&\ + rm /install-dependencies-hpsdr.sh + +COPY . /opt/openwebrx diff --git a/docker/scripts/install-dependencies-hpsdr.sh b/docker/scripts/install-dependencies-hpsdr.sh new file mode 100755 index 0000000..f1c0bed --- /dev/null +++ b/docker/scripts/install-dependencies-hpsdr.sh @@ -0,0 +1,46 @@ +#!/bin/bash +set -euxo pipefail +export MAKEFLAGS="-j4" + +BUILD_PACKAGES="git wget" + +apt-get update +apt-get -y install --no-install-recommends $BUILD_PACKAGES + +pushd /tmp + +ARCH=$(uname -m) +GOVERSION=1.15.5 + +case ${ARCH} in + x86_64) + PACKAGE=go${GOVERSION}.linux-amd64.tar.gz + ;; + armv*) + PACKAGE=go${GOVERSION}.linux-armv6l.tar.gz + ;; + aarch64) + PACKAGE=go${GOVERSION}.linux-arm64.tar.gz + ;; +esac + +wget https://golang.org/dl/${PACKAGE} +tar xfz $PACKAGE + +git clone https://github.com/jancona/hpsdrconnector.git +pushd hpsdrconnector +git checkout v0.4.2 +/tmp/go/bin/go build +install -m 0755 hpsdrconnector /usr/local/bin + +popd + +rm -rf hpsdrconnector +rm -rf go +rm $PACKAGE + +popd + +apt-get -y purge --autoremove $BUILD_PACKAGES +apt-get clean +rm -rf /var/lib/apt/lists/*