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

341.5. urh-2.10.0

Record, demodulate, decode and replay wireless protocols

Version 2.10.0, release 1
Shelf sdr — SDR DSP libraries, GNU Radio and its blocks, receivers, decoders and signal analysis
Phase 44_apps (Applications), 356 of 422 in build order
Licence GPL-3.0-only
Homepage https://github.com/jopohl/urh
Build time 6.1 SBU
Installed size 13.6 MiB in 648 files
Recipe ports/core/sdr/urh/kpkgbuild

About

Universal Radio Hacker (URH) records, demodulates, decodes and replays wireless protocols: it captures a signal from a software-defined radio or a file, turns it into bits, and helps work out the protocol inside them. It is a Python program on PyQt6 (python3-pyqt6), with Cython extensions for its signal processing and one native extension per radio family, built against that radio’s own library: airspy, bladerf, hackrf, rtl-sdr, limesuite, libiio for the PlutoSDR and uhd for USRP radios.

Sources

Dependencies

Depends on: python3, python3-setuptools, python3-pip, python3-cython, numpy, python3-psutil, python3-pyqt6, qt6-qtwayland, airspy, bladerf, hackrf, rtl-sdr, limesuite, libiio, uhd, librsvg.

Required by: no port names it.

Patches

build.sh applies these; kpkg applies nothing by itself.

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

What kpkg does

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

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/urh
echo '95bf54f9234dd2570ec9706bb632c3df4f24517f52b5ae6ccacd7194f960ff21  urh-2.10.0.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/urh
SRC=$SRC_ROOT/urh-2.10.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf urh-2.10.0.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/app-id.patch"

python3 setup.py \
	--with-airspy --with-bladerf --with-hackrf --with-rtlsdr \
	--with-limesdr --with-plutosdr --with-usrp --without-sdrplay \
	bdist_wheel -d dist
python3 -m pip install --ignore-installed --no-deps --no-index --no-build-isolation \
	--root="$PKG" --prefix=/usr dist/urh-*.whl

for s in 48 64 128 256; do
	install -d "$PKG/usr/share/icons/hicolor/${s}x${s}/apps"
	rsvg-convert -w $s -h $s data/icons/appicon.svg \
		-o "$PKG/usr/share/icons/hicolor/${s}x${s}/apps/urh.png"
done
install -Dm644 data/icons/appicon.png \
	"$PKG/usr/share/icons/hicolor/512x512/apps/urh.png"
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/urh.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Universal Radio Hacker
GenericName=Wireless Protocol Analyser
Comment=Record, demodulate, decode and replay wireless protocols
Exec=urh
Terminal=false
Icon=urh
Categories=HamRadio;Network;Qt;
Keywords=SDR;radio;protocol;demodulation;reverse;IoT;433;
StartupWMClass=urh
DESKTOP
chmod 644 "$PKG/usr/share/applications/urh.desktop"

test -x "$PKG/usr/bin/urh"
for d in airspy bladerf hackrf rtlsdr limesdr plutosdr usrp; do
	test -n "$(find "$PKG"/usr/lib/python3*/site-packages/urh/dev/native/lib -name "$d.*.so")"
done

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

Contents

Installed programs: urh, urh_cli.

Installed directories: /usr/lib/python3.14/site-packages/urh, /usr/lib/python3.14/site-packages/urh-2.10.0.dist-info, /usr/share/licenses/urh.

Notes

The wheel is installed with pip --no-deps --no-index --no-build-isolation, so pip neither reaches the network nor resolves anything: every Python dependency is a port in depends. The last lines of build.sh check that each of the seven radio extensions (airspy, bladerf, hackrf, rtlsdr, limesdr, plutosdr, usrp) landed under urh/dev/native/lib in site-packages, so the build fails instead of packaging a URH that cannot open one of those radios.

Upstream installs no desktop entry or PNG icons. build.sh writes urh.desktop and rasterises data/icons/appicon.svg to 48, 64, 128 and 256 pixel PNGs with rsvg-convert from librsvg, beside upstream’s 512 pixel appicon.png.