multi-platform build
This commit is contained in:
parent
74930ba253
commit
dea09d8eaa
25
build.sh
25
build.sh
@ -1,5 +1,24 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
docker build -t openwebrx-base -f docker/Dockerfiles/Dockerfile-base .
|
|
||||||
docker build -t jketterl/openwebrx-rtlsdr -t jketterl/openwebrx -f docker/Dockerfiles/Dockerfile-rtlsdr .
|
ARCH=$(uname -m)
|
||||||
docker build -t jketterl/openwebrx-sdrplay -f docker/Dockerfiles/Dockerfile-sdrplay .
|
|
||||||
|
case $ARCH in
|
||||||
|
x86_64)
|
||||||
|
BASE_IMAGE=debian:stretch
|
||||||
|
;;
|
||||||
|
armv*)
|
||||||
|
BASE_IMAGE=raspbian/stretch
|
||||||
|
esac
|
||||||
|
|
||||||
|
TAGS=$ARCH
|
||||||
|
|
||||||
|
docker build --build-arg BASE_IMAGE=$BASE_IMAGE -t openwebrx-base:$ARCH -f docker/Dockerfiles/Dockerfile-base .
|
||||||
|
docker build -t jketterl/openwebrx-rtlsdr:$ARCH -t jketterl/openwebrx:$ARCH -f docker/Dockerfiles/Dockerfile-rtlsdr .
|
||||||
|
docker build -t jketterl/openwebrx-sdrplay:$ARCH -f docker/Dockerfiles/Dockerfile-sdrplay .
|
||||||
|
|
||||||
|
if [ "$ARCH" == "armv7l" ]; then
|
||||||
|
for image in openwebrx openwebrx-rtlsdr openwebrx-sdrplay; do
|
||||||
|
docker tag jketterl/$image:$ARCH jketterl/$image:latest
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
FROM raspbian/stretch
|
ARG BASE_IMAGE
|
||||||
|
FROM $BASE_IMAGE
|
||||||
|
|
||||||
ADD docker/scripts/install-dependencies.sh /
|
ADD docker/scripts/install-dependencies.sh /
|
||||||
RUN /install-dependencies.sh
|
RUN /install-dependencies.sh
|
||||||
|
@ -20,8 +20,17 @@ BUILD_PACKAGES="git build-essential cmake patch ca-certificates wget sudo udev"
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES
|
apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES
|
||||||
|
|
||||||
wget http://www.sdrplay.com/software/SDRplay_RSP_API-RPi-2.13.1.run
|
case $(arch) in
|
||||||
sh SDRplay_RSP_API-RPi-2.13.1.run --noexec --target sdrplay
|
x86_64)
|
||||||
|
BINARY=SDRplay_RSP_API-Linux-2.13.1.run
|
||||||
|
;;
|
||||||
|
armv*)
|
||||||
|
BINARY=SDRplay_RSP_API-RPi-2.13.1.run
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
wget http://www.sdrplay.com/software/$BINARY
|
||||||
|
sh $BINARY --noexec --target sdrplay
|
||||||
patch -Np0 <<'EOF'
|
patch -Np0 <<'EOF'
|
||||||
--- sdrplay/install_lib.sh 2018-06-20 23:57:02.000000000 +0000
|
--- sdrplay/install_lib.sh 2018-06-20 23:57:02.000000000 +0000
|
||||||
+++ sdrplay/install_lib_patched.sh 2019-01-13 17:52:56.723838354 +0000
|
+++ sdrplay/install_lib_patched.sh 2019-01-13 17:52:56.723838354 +0000
|
||||||
@ -49,7 +58,7 @@ cd sdrplay
|
|||||||
./install_lib.sh
|
./install_lib.sh
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf sdrplay
|
rm -rf sdrplay
|
||||||
rm SDRplay_RSP_API-RPi-2.13.1.run
|
rm $BINARY
|
||||||
|
|
||||||
git clone https://github.com/pothosware/SoapySDR
|
git clone https://github.com/pothosware/SoapySDR
|
||||||
cmakebuild SoapySDR
|
cmakebuild SoapySDR
|
||||||
@ -60,6 +69,6 @@ cmakebuild SoapySDRPlay
|
|||||||
git clone https://github.com/rxseger/rx_tools
|
git clone https://github.com/rxseger/rx_tools
|
||||||
cmakebuild rx_tools
|
cmakebuild rx_tools
|
||||||
|
|
||||||
apt-get remove --purge --autoremove -y $BUILD_PACKAGES
|
SUDO_FORCE_REMOVE=yes apt-get remove --purge --autoremove -y $BUILD_PACKAGES
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
12
push.sh
12
push.sh
@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
docker push jketterl/openwebrx
|
|
||||||
docker push jketterl/openwebrx-rtlsdr
|
ARCH=$(uname -m)
|
||||||
docker push jketterl/openwebrx-sdrplay
|
|
||||||
|
for image in openwebrx openwebrx-rtlsdr openwebrx-sdrplay; do
|
||||||
|
docker push jketterl/$image:$ARCH
|
||||||
|
if [ "$ARCH" == "armv7l" ]; then
|
||||||
|
docker push jketterl/$image:latest
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user