341.3. satdump-1.2.2
Receive, demodulate and decode weather and science satellites into images and products
| Version | 1.2.2, release 1 |
| Shelf | sdr — SDR DSP libraries, GNU Radio and its blocks, receivers, decoders and signal analysis |
| Phase | 44_apps (Applications), 354 of 422 in build order |
| Licence | GPL-3.0-or-later |
| Homepage | https://www.satdump.org/ |
| Build time | 17.3 SBU |
| Installed size | 80.0 MiB in 882 files |
| Recipe | ports/core/sdr/satdump/kpkgbuild |
About
SatDump receives, demodulates and decodes the downlinks of weather and science satellites (NOAA and MetOp HRPT and APT, Meteor LRPT, GOES, FengYun, and many more) and turns them into images and calibrated products. It runs live from a radio or from a recording: satdump-ui is the OpenGL interface, drawn through GLFW and Dear ImGui, and satdump the command-line pipeline runner. Each satellite family, radio and audio sink is a plugin under /usr/lib/satdump/plugins.
Sources
satdump-1.2.2.tar.gz(34.2 MiB)
sha2562ab7c6126e426ad79972b274cc380c0bb04c9e755d746d67f3af92c1dd569209
upstream: https://github.com/SatDump/SatDump/archive/refs/tags/1.2.2.tar.gz
archive copy: sources-4/sdr--satdump-1.2.2.tar.gz
Dependencies
Depends on: cmake, ninja, pkgconf, libvolk, fftw, libpng, zstd, nng, jemalloc, curl, libtiff, hdf5, glfw, mesa, libglvnd, libusb, airspy, hackrf, bladerf, rtl-sdr, airspyhf, limesuite, libiio, libad9361, uhd, portaudio, ocl-icd, opencl-headers, imagemagick.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
satdump-app-id.patch— sets GLFW’sGLFW_WAYLAND_APP_IDandGLFW_X11_CLASS_NAMEhints tosatdumpbefore both window creations insrc-ui/main.cpp, the first and the OpenGL 2.1 fallback. Unless asked, GLFW gives a window no Wayland app id and an X11 class of its title, which carries the version; the desktop entry’sStartupWMClassnamessatdump.satdump-calibration-constants.patch— turns the macrosc1,c2ande_numofcalibration.hintoconstexpr doubleconstants.volk_common.hof libvolk, included after it, names its own localsc1andc2, and the macros turn those declarations into numbers; a local may shadow a constant.satdump-ctime.patch— includes<ctime>insrc-core/common/calibration.h, which declares a function taking atime_t; neither<map>nor<math.h>is required to declare it.satdump-dvb-generic.patch— the DVB plugin compiles its decoders with-msse4.1and, on a CPU without SSE4.1, declines to load, so DVB-S and DVB-S2 would be missing on a baseline x86-64 machine. No flag avoids that short of dropping SSE4.1 for thesimd_sse41plugin as well, since the one cache variable ofFindSSE41serves both. The patch adds a second build of the same sources without the flag,libdvb_support_generic, which registers the DVB modules only on a CPU the SSE4.1 build refuses.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install satdump'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/sdr/satdump.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/sdr/satdump
echo '2ab7c6126e426ad79972b274cc380c0bb04c9e755d746d67f3af92c1dd569209 satdump-1.2.2.tar.gz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/satdump
SRC=$SRC_ROOT/satdump-1.2.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf satdump-1.2.2.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/satdump-app-id.patch"
patch -p1 -i "$PORT_SRC/satdump-dvb-generic.patch"
patch -p1 -i "$PORT_SRC/satdump-ctime.patch"
patch -p1 -i "$PORT_SRC/satdump-calibration-constants.patch"
export CXXFLAGS="$CXXFLAGS -Wno-template-body -DSOL_NO_LUA_HPP=1"
cmake -B build -G Ninja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_GUI=ON \
-DBUILD_GLES=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_TOOLS=OFF \
-DBUILD_ZIQ=ON \
-DBUILD_ZIQ2=OFF \
-DBUILD_OPENCL=ON \
-DBUILD_OPENMP=ON \
-DBUILD_DOCS=OFF \
-DENABLE_INSTALL=ON \
-DPLUGINS_ALL=ON \
-DPLUGIN_SCRIPTING=OFF \
-DPLUGIN_BOCHUM_SUPPORT=OFF \
-DPLUGIN_BITVIEW_APP=OFF \
-DPLUGIN_GVAR_EXTENDED=OFF \
-DPLUGIN_RTLSDR_SDR_SUPPORT=ON \
-DPLUGIN_AIRSPY_SDR_SUPPORT=ON \
-DPLUGIN_HACKRF_SDR_SUPPORT=ON \
-DPLUGIN_BLADERF_SDR_SUPPORT=ON \
-DPLUGIN_MIRISDR_SDR_SUPPORT=ON \
-DPLUGIN_RFNM_SDR_SUPPORT=ON \
-DPLUGIN_RTLTCP_SUPPORT=ON \
-DPLUGIN_SPYSERVER_SUPPORT=ON \
-DPLUGIN_SDRPP_SERVER_SUPPORT=ON \
-DPLUGIN_NET_SOURCE_SDR_SUPPORT=ON \
-DPLUGIN_REMOTE_SDR_SUPPORT=ON \
-DPLUGIN_AIRSPYHF_SDR_SUPPORT=ON \
-DPLUGIN_LIMESDR_SDR_SUPPORT=ON \
-DPLUGIN_PLUTOSDR_SDR_SUPPORT=ON \
-DPLUGIN_USRP_SDR_SUPPORT=ON \
-DPLUGIN_SDRPLAY_SDR_SUPPORT=OFF \
-DPLUGIN_AARONIA_SDR_SUPPORT=OFF \
-DPLUGIN_SOAPY_SDR_SUPPORT=OFF \
-DPLUGIN_SDDC_SDR_SUPPORT=OFF \
-DPLUGIN_RTAUDIO_SDR_SUPPORT=OFF \
-DPLUGIN_PORTAUDIO_SINK=ON \
-DPLUGIN_RTAUDIO_SINK=OFF \
-DPLUGIN_AAUDIO_SINK=OFF \
-DCMAKE_DISABLE_FIND_PACKAGE_Armadillo=ON
ninja -C build
DESTDIR=$PKG ninja -C build install
for s in 48 64 128 256; do
install -d "$PKG/usr/share/icons/hicolor/${s}x${s}/apps"
magick icon.png -resize ${s}x${s} \
"$PKG/usr/share/icons/hicolor/${s}x${s}/apps/satdump.png"
done
cat > "$PKG/usr/share/applications/satdump.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=SatDump
GenericName=Satellite Decoder
Comment=Receive and decode weather and science satellites into images
Exec=satdump-ui
Terminal=false
Icon=satdump
Categories=Science;HamRadio;
Keywords=satellite;SDR;weather;NOAA;Meteor;LRPT;HRPT;APT;GOES;decoder;
StartupWMClass=satdump
DESKTOP
chmod 644 "$PKG/usr/share/applications/satdump.desktop"
test -x "$PKG/usr/bin/satdump-ui"
test -x "$PKG/usr/bin/satdump"
for p in rtlsdr_sdr_support hackrf_sdr_support airspyhf_sdr_support \
limesdr_sdr_support plutosdr_sdr_support usrp_sdr_support \
portaudio_audio_sink meteor_support dvb_support dvb_support_generic; do
test -f "$PKG/usr/lib/satdump/plugins/lib$p.so"
done
The switches, and why each is set:
CXXFLAGS="$CXXFLAGS -Wno-template-body -DSOL_NO_LUA_HPP=1"— two fixes for the bundled sol2, the C++ binding of the Lua that SatDump compiles in. sol2 has a template member that names a member its class does not have; GCC checks template bodies that are never instantiated and rejects it unless-Wtemplate-bodyis off. And SatDump puts the headers of its bundled Lua first on the include path, but sol2 includes<lua.hpp>, which the bundle lacks, so the system lua’s copy is found and pulls in the system release’slua.h, which sol2 rejects.SOL_NO_LUA_HPPmakes sol2 includelua.h,lualib.handlauxlib.hitself, all three from the bundle.-DBUILD_GUI=ON,-DBUILD_GLES=OFF— Buildsatdump-ui, on desktop OpenGL rather than OpenGL ES.-DBUILD_TOOLS=OFF— No developer tool programs; upstream’s default.-DBUILD_ZIQ=ON,-DBUILD_ZIQ2=OFF— Read and write SatDump’s compressed ZIQ baseband format, with zstd; not the work-in-progress ZIQ2.-DBUILD_OPENCL=ON,-DBUILD_OPENMP=ON— GPU acceleration through OpenCL, linked against the ocl-icd loader, and OpenMP on the CPU. When the loader finds no OpenCL device, SatDump runs the accelerated steps on the CPU instead.-DBUILD_DOCS=OFF— No Doxygen documentation.-DENABLE_INSTALL=ON— Generate the install target; upstream’s default.-DPLUGINS_ALL=ON— Build every satellite decoder plugin.-DPLUGIN_SCRIPTING=OFF,-DPLUGIN_BOCHUM_SUPPORT=OFF,-DPLUGIN_BITVIEW_APP=OFF,-DPLUGIN_GVAR_EXTENDED=OFF— Leave out the experimental scripting plugin, the Bochum-specific plugin, the work-in-progress BitView application and the GVAR Extended plugin, none of whichPLUGINS_ALLcovers.-DPLUGIN_RTLSDR_SDR_SUPPORT=ON— and the other radio sources setON: RTL-SDR, Airspy, HackRF, bladeRF, MiriSDR and RFNM, Airspy HF+, LimeSDR, PlutoSDR (through libiio and libad9361) and USRP (through uhd), and the network sources: rtl_tcp, SpyServer, the SDR++ server, a raw network stream, and SatDump’s own remote source.-DPLUGIN_SDRPLAY_SDR_SUPPORT=OFF,-DPLUGIN_AARONIA_SDR_SUPPORT=OFF— SDRplay and Aaronia radios need vendor libraries that are not ports.-DPLUGIN_SOAPY_SDR_SUPPORT=OFF,-DPLUGIN_SDDC_SDR_SUPPORT=OFF,-DPLUGIN_RTAUDIO_SDR_SUPPORT=OFF— No SoapySDR source, which upstream marks “not recommended”, no SDDC (RX666, RX888) source, and no RtAudio input source; all three are upstream’s defaults.-DPLUGIN_PORTAUDIO_SINK=ON,-DPLUGIN_RTAUDIO_SINK=OFF,-DPLUGIN_AAUDIO_SINK=OFF— Audio leaves through portaudio, which PipeWire answers; AAudio is Android’s audio interface.-DCMAKE_DISABLE_FIND_PACKAGE_Armadillo=ON— Never look up Armadillo, whichsrc-coreuses when it finds it. Armadillo is not a port.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/satdump, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf satdump-1.2.2-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/satdump, and runs the triggers its paths call for.
Contents
Installed programs: satdump, satdump-ui, satdump_sdr_server.
Installed libraries: libsatdump_core.so, libsatdump_interface.so.
Installed directories: /usr/include/satdump, /usr/lib/satdump, /usr/share/licenses/satdump, /usr/share/satdump.
Notes
SatDump opens its plugins with dlopen and no RTLD_GLOBAL, so the two DVB builds’ symbols never bind to each other.
The drivers of RTL-SDR, Airspy, HackRF, bladeRF, Airspy HF+ and LimeSDR come from their ports; the MiriSDR and RFNM sources carry their own drivers over libusb. A radio source’s plugin is built only when find_library finds its library, and otherwise skipped with only a message, so a switch set ON does not by itself guarantee the plugin; the check at the end of build.sh does.
Upstream’s desktop entry names its icon by absolute path and its window class by the title. build.sh scales the large icon.png logo to 48, 64, 128 and 256 pixels with ImageMagick and writes an entry of its own. It ends by checking that both programs and a list of plugins (the RTL-SDR, HackRF, Airspy HF+, LimeSDR, PlutoSDR and USRP sources, the PortAudio sink, the Meteor decoder and both DVB builds) are in the package.