Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

341.1. cubicsdr-0.2.7

Software radio receiver with an OpenGL spectrum and waterfall, over SoapySDR and liquid-dsp

Version 0.2.7, release 1
Shelf sdr — SDR DSP libraries, GNU Radio and its blocks, receivers, decoders and signal analysis
Phase 44_apps (Applications), 352 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://cubicsdr.com/
Build time 1.4 SBU
Installed size 3.9 MiB in 27 files
Recipe ports/core/sdr/cubicsdr/kpkgbuild

About

CubicSDR is a software-defined radio receiver with an OpenGL spectrum and waterfall display. It tunes any receiver soapysdr has a module for, demodulates AM, FM, SSB and the other analogue modes with liquid-dsp, and plays the audio. Its interface is wxWidgets on GTK 3.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, wxwidgets, gtk3, mesa, libglvnd, liquid-dsp, soapysdr, hamlib, libpulse.

Required by: no port names it.

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 cubicsdr'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/sdr/cubicsdr.

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/cubicsdr
echo '790f851e08f1068081a8593dfd4a149c7414e7d70c1f5cafd287331df493b811  cubicsdr-0.2.7.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/cubicsdr
SRC=$SRC_ROOT/cubicsdr-0.2.7
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf cubicsdr-0.2.7.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:

cmake -B build -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DUSE_HAMLIB=ON \
	-DUSE_SYSTEM_RTAUDIO=OFF \
	-DUSE_AUDIO_PULSE=ON \
	-DUSE_AUDIO_JACK=OFF \
	-DUSE_AUDIO_ALSA=OFF \
	-DUSE_AUDIO_OSS=OFF \
	-DENABLE_DIGITAL_LAB=OFF \
	-DBUILD_DEB=OFF \
	-DBUNDLE_APP=OFF \
	-DCUSTOM_BUILD=OFF
ninja -C build
DESTDIR=$PKG ninja -C build install

install -Dm644 src/CubicSDR.png \
	"$PKG/usr/share/icons/hicolor/256x256/apps/CubicSDR.png"
cat > "$PKG/usr/share/applications/CubicSDR.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=CubicSDR
GenericName=Software Defined Radio
Comment=Receive and demodulate radio with a spectrum and waterfall display
Exec=CubicSDR
Terminal=false
Icon=CubicSDR
Categories=Science;HamRadio;DataVisualization;
Keywords=SDR;radio;receiver;waterfall;rtl-sdr;soapysdr;
StartupWMClass=CubicSDR
DESKTOP
chmod 644 "$PKG/usr/share/applications/CubicSDR.desktop"

test -x "$PKG/usr/bin/CubicSDR"
test -d "$PKG/usr/share/cubicsdr/fonts"

The switches, and why each is set:

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/cubicsdr, 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 cubicsdr-0.2.7-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/cubicsdr, and runs the triggers its paths call for.

Contents

Installed programs: CubicSDR.

Installed directories: /usr/share/cubicsdr, /usr/share/licenses/cubicsdr.

Notes

Upstream’s desktop entry names its icon by absolute path, which the panel does not resolve. build.sh installs src/CubicSDR.png into the hicolor theme and writes an entry that names it as CubicSDR. wxGTK leaves the program name as argv[0], so the Wayland app id and the X11 class are both CubicSDR, which the entry’s StartupWMClass names.

build.sh ends by checking that /usr/bin/CubicSDR is executable and that its font directory, /usr/share/cubicsdr/fonts, is in the package.