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

342.4. flrig-2.0.12

Transceiver control over CAT for amateur radio, and the rig server fldigi talks to

Version 2.0.12, release 1
Shelf hamradio — Amateur-radio operation: rig control, digital modes, logging, packet and APRS, propagation, and mesh radio
Phase 44_apps (Applications), 246 of 422 in build order
Licence GPL-3.0-or-later
Homepage https://www.w1hkj.org/
Build time 2.2 SBU
Installed size 9.2 MiB in 5 files
Recipe ports/core/hamradio/flrig/kpkgbuild

About

flrig controls an amateur radio transceiver over its CAT interface: frequency, mode, filters, power and PTT, from an FLTK window. It also serves the rig over XML-RPC, which is how fldigi and the other W1HKJ programs share one radio.

Sources

Dependencies

Depends on: pkgconf, fltk, libX11, libgpiod, imagemagick.

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

What kpkg does

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

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/hamradio/flrig
echo 'c16dc007b68e7be5dab363381085d0bc5c8842906116ecd9e16ee75c9d5accbf  flrig-2.0.12.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/flrig
SRC=$SRC_ROOT/flrig-2.0.12
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf flrig-2.0.12.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/no-error-h.patch"

./configure \
	--prefix=/usr \
	--libdir=/usr/lib \
	--sysconfdir=/etc
make
make DESTDIR=$PKG install

rm -f "$PKG/usr/share/applications/flrig.desktop"
s=$(magick identify -format %w "data/flrig.xpm")
install -d "$PKG/usr/share/icons/hicolor/${s}x${s}/apps"
magick "data/flrig.xpm" "$PKG/usr/share/icons/hicolor/${s}x${s}/apps/flrig.png"
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/flrig.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=flrig
GenericName=Amateur Radio Transceiver Control
Comment=Control a transceiver's frequency, mode, filters and power over CAT
Exec=flrig
Icon=flrig
Terminal=false
StartupWMClass=Flrig
Categories=Network;HamRadio;
Keywords=ham;radio;rig;cat;transceiver;control;
DESKTOP
chmod 644 "$PKG/usr/share/applications/flrig.desktop"

test -x "$PKG/usr/bin/flrig"

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

Contents

Installed programs: flrig.

Installed directories: /usr/share/licenses/flrig.

Notes

Upstream’s icon is an XPM, which the panel does not read, and its desktop entry carries no window class. build.sh converts the XPM to a hicolor PNG at its own size with ImageMagick and replaces the entry. FLTK takes the Wayland app id from the main window’s X class, which for flrig is Flrig, so that is the entry’s StartupWMClass.