2019-01-13 14:12:09 +00:00
|
|
|
#!/bin/bash
|
2019-01-13 15:54:36 +00:00
|
|
|
set -euxo pipefail
|
2020-02-16 11:19:49 +00:00
|
|
|
export MAKEFLAGS="-j4"
|
2019-01-13 14:12:09 +00:00
|
|
|
|
2019-01-13 21:04:29 +00:00
|
|
|
function cmakebuild() {
|
|
|
|
cd $1
|
2019-12-29 23:11:27 +00:00
|
|
|
if [[ ! -z "${2:-}" ]]; then
|
|
|
|
git checkout $2
|
|
|
|
fi
|
2019-01-13 21:04:29 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2020-04-16 20:01:51 +00:00
|
|
|
cmake ${CMAKE_ARGS:-} ..
|
2019-01-22 10:35:48 +00:00
|
|
|
make
|
|
|
|
make install
|
2019-01-13 21:04:29 +00:00
|
|
|
cd ../..
|
|
|
|
rm -rf $1
|
|
|
|
}
|
|
|
|
|
2019-01-13 14:12:09 +00:00
|
|
|
cd /tmp
|
|
|
|
|
2021-02-01 22:56:09 +00:00
|
|
|
STATIC_PACKAGES="sox libfftw3-bin python3 python3-setuptools netcat-openbsd libsndfile1 liblapack3 libusb-1.0-0 libqt5core5a libreadline7 libgfortran4 libgomp1 libasound2 libudev1 ca-certificates libqt5gui5 libqt5sql5 libqt5printsupport5 libpulse0 libfaad2 libopus0 libboost-program-options1.67.0 libboost-log1.67.0"
|
|
|
|
BUILD_PACKAGES="wget git libsndfile1-dev libfftw3-dev cmake make gcc g++ liblapack-dev texinfo gfortran libusb-1.0-0-dev qtbase5-dev qtmultimedia5-dev qttools5-dev libqt5serialport5-dev qttools5-dev-tools asciidoctor asciidoc libasound2-dev libudev-dev libhamlib-dev patch xsltproc qt5-default libfaad-dev libopus-dev libgtest-dev libboost-dev libboost-program-options-dev libboost-log-dev libboost-regex-dev"
|
2020-05-23 16:06:46 +00:00
|
|
|
apt-get update
|
2020-05-25 18:38:42 +00:00
|
|
|
apt-get -y install auto-apt-proxy
|
2020-05-23 20:53:12 +00:00
|
|
|
apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES
|
2019-01-22 14:52:53 +00:00
|
|
|
|
2020-05-25 18:10:03 +00:00
|
|
|
case `uname -m` in
|
|
|
|
arm*)
|
|
|
|
PLATFORM=armhf
|
|
|
|
;;
|
|
|
|
aarch64*)
|
|
|
|
PLATFORM=aarch64
|
|
|
|
;;
|
|
|
|
x86_64*)
|
|
|
|
PLATFORM=amd64
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
wget https://github.com/just-containers/s6-overlay/releases/download/v1.21.8.0/s6-overlay-${PLATFORM}.tar.gz
|
|
|
|
tar xzf s6-overlay-${PLATFORM}.tar.gz -C /
|
|
|
|
rm s6-overlay-${PLATFORM}.tar.gz
|
|
|
|
|
2019-12-29 23:11:27 +00:00
|
|
|
git clone https://git.code.sf.net/p/itpp/git itpp
|
|
|
|
cmakebuild itpp bb5c7e95f40e8fdb5c3f3d01a84bcbaf76f3676d
|
2019-01-13 14:12:09 +00:00
|
|
|
|
2019-12-29 23:11:27 +00:00
|
|
|
git clone https://github.com/szechyjs/mbelib.git
|
|
|
|
cmakebuild mbelib 9a04ed5c78176a9965f3d43f7aa1b1f5330e771f
|
2019-01-13 21:04:29 +00:00
|
|
|
|
2019-12-29 23:11:27 +00:00
|
|
|
git clone https://github.com/f4exb/dsd.git
|
|
|
|
cmakebuild dsd f6939f9edbbc6f66261833616391a4e59cb2b3d7
|
2019-01-13 14:12:09 +00:00
|
|
|
|
2020-07-22 16:45:13 +00:00
|
|
|
JS8CALL_VERSION=2.2.0
|
|
|
|
JS8CALL_DIR=js8call
|
|
|
|
JS8CALL_TGZ=js8call-${JS8CALL_VERSION}.tgz
|
2020-04-15 21:20:17 +00:00
|
|
|
wget http://files.js8call.com/${JS8CALL_VERSION}/${JS8CALL_TGZ}
|
2020-04-16 20:01:51 +00:00
|
|
|
tar xfz ${JS8CALL_TGZ}
|
2020-05-23 20:53:12 +00:00
|
|
|
# patch allows us to build against the packaged hamlib
|
2020-05-23 16:06:46 +00:00
|
|
|
patch -Np1 -d ${JS8CALL_DIR} < /js8call-hamlib.patch
|
|
|
|
rm /js8call-hamlib.patch
|
2020-07-22 16:45:13 +00:00
|
|
|
CMAKE_ARGS="-D CMAKE_CXX_FLAGS=-DJS8_USE_HAMLIB_THREE" cmakebuild ${JS8CALL_DIR}
|
2020-04-15 21:20:17 +00:00
|
|
|
rm ${JS8CALL_TGZ}
|
|
|
|
|
2021-03-30 13:14:35 +00:00
|
|
|
WSJT_DIR=wsjtx-2.3.1
|
2019-07-13 19:35:57 +00:00
|
|
|
WSJT_TGZ=${WSJT_DIR}.tgz
|
2020-04-15 21:20:17 +00:00
|
|
|
wget http://physics.princeton.edu/pulsar/k1jt/${WSJT_TGZ}
|
2020-04-16 20:01:51 +00:00
|
|
|
tar xfz ${WSJT_TGZ}
|
2020-05-25 18:31:42 +00:00
|
|
|
patch -Np0 -d ${WSJT_DIR} < /wsjtx-hamlib.patch
|
|
|
|
mv /wsjtx.patch ${WSJT_DIR}
|
2020-04-15 21:20:17 +00:00
|
|
|
cmakebuild ${WSJT_DIR}
|
|
|
|
rm ${WSJT_TGZ}
|
2019-07-13 19:35:57 +00:00
|
|
|
|
2020-12-05 23:43:45 +00:00
|
|
|
git clone --depth 1 -b 1.6 https://github.com/wb2osz/direwolf.git
|
2019-08-23 20:21:30 +00:00
|
|
|
cd direwolf
|
2020-08-14 19:08:35 +00:00
|
|
|
# hamlib is present (necessary for the wsjt-x and js8call builds) and would be used, but there's no real need.
|
2020-12-06 00:44:14 +00:00
|
|
|
# this patch prevents direwolf from linking to it, and it can be stripped at the end of the script.
|
|
|
|
patch -Np1 < /direwolf-hamlib.patch
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make
|
2019-08-23 20:21:30 +00:00
|
|
|
make install
|
2020-12-06 00:44:14 +00:00
|
|
|
cd ../..
|
2019-08-23 20:21:30 +00:00
|
|
|
rm -rf direwolf
|
2020-09-11 22:21:46 +00:00
|
|
|
# strip lots of generic documentation that will never be read inside a docker container
|
|
|
|
rm /usr/local/share/doc/direwolf/*.pdf
|
|
|
|
# examples are pointless, too
|
|
|
|
rm -rf /usr/local/share/doc/direwolf/examples/
|
2019-08-23 20:21:30 +00:00
|
|
|
|
2020-07-29 19:44:10 +00:00
|
|
|
git clone https://github.com/drowe67/codec2.git
|
|
|
|
cd codec2
|
2020-10-04 19:02:46 +00:00
|
|
|
# latest commit from master as of 2020-10-04
|
|
|
|
git checkout 55d7bb8d1bddf881bdbfcb971a718b83e6344598
|
2020-07-29 19:44:10 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
install -m 0755 src/freedv_rx /usr/local/bin
|
|
|
|
cd ../..
|
|
|
|
rm -rf codec2
|
|
|
|
|
2020-09-04 19:20:27 +00:00
|
|
|
wget https://downloads.sourceforge.net/project/drm/dream/2.1.1/dream-2.1.1-svn808.tar.gz
|
|
|
|
tar xvfz dream-2.1.1-svn808.tar.gz
|
|
|
|
pushd dream
|
2020-09-04 22:40:36 +00:00
|
|
|
patch -Np0 < /dream.patch
|
2020-09-04 19:20:27 +00:00
|
|
|
qmake CONFIG+=console
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
popd
|
|
|
|
rm -rf dream
|
|
|
|
rm dream-2.1.1-svn808.tar.gz
|
|
|
|
|
2020-12-21 18:42:15 +00:00
|
|
|
git clone https://github.com/mobilinkd/m17-cxx-demod.git
|
2021-04-19 23:17:18 +00:00
|
|
|
# latest master as of 2021-04-20
|
|
|
|
cmakebuild m17-cxx-demod c1d954fd5e5c53d28a2524e99484f832f9dcb826
|
2020-12-08 18:43:50 +00:00
|
|
|
|
2020-12-03 23:39:05 +00:00
|
|
|
git clone https://github.com/hessu/aprs-symbols /usr/share/aprs-symbols
|
2020-12-03 23:12:51 +00:00
|
|
|
pushd /usr/share/aprs-symbols
|
2019-12-29 23:11:27 +00:00
|
|
|
git checkout 5c2abe2658ee4d2563f3c73b90c6f59124839802
|
2021-02-01 22:56:47 +00:00
|
|
|
# remove unused files (including git meta information)
|
|
|
|
rm -rf .git aprs-symbols.ai aprs-sym-export.js
|
2019-12-29 23:11:27 +00:00
|
|
|
popd
|
2019-09-25 21:40:17 +00:00
|
|
|
|
2020-05-23 16:06:46 +00:00
|
|
|
apt-get -y purge --autoremove $BUILD_PACKAGES
|
|
|
|
apt-get clean
|
|
|
|
rm -rf /var/lib/apt/lists/*
|