Installing service payloads

  1. download — prebuilt archive
  2. build — compile from source
    1. MMDVMHost build dependencies

A service that declares an [install] block can be fetched with hamctl install <id>. Two methods, both generic across services. The download URL / git repo comes only from the trusted manifest; external commands run as argument vectors (no shell).

download — prebuilt archive

Fetch and unpack a prebuilt per-architecture archive (used by AFRN):

[install]
url = "https://example.org/Client.Linux-{arch}.r7920.tgz"  # {arch} = amd64/aarch64/…
dest = "../.."                 # unpack dir, relative to the manifest (default ".")
format = "tgz"                 # tgz | zip (inferred from the URL when omitted)
arches = ["amd64", "aarch64"]  # published arches; bounds --arch

Downloads use curl/wget and unpack with tar/unzip. The --arch value is validated and must be one of arches:

hamctl install afrn            # host arch
hamctl install afrn --arch aarch64

build — compile from source

For upstreams that ship source only (the Pi-Star/MMDVM stack), clone a git repo and compile on the device. Only relevant on non-Pi-Star boxes — a Pi-Star image already has the binaries and /etc config.

[install]
method = "build"
repo = "https://github.com/g4klx/MMDVMHost"
ref = "master"                 # optional tag/branch/commit
build = [["make", "-j2"]]      # argv per step, run in the clone (or `subdir`)
requires = ["git", "g++", "make"]                   # preflight: commands
requires_files = ["/usr/include/nlohmann/json.hpp"] # preflight: dev libs/headers
deps_hint = "sudo apt-get install -y build-essential git nlohmann-json3-dev libmosquitto-dev"
  [[install.artifacts]]        # built file → install path ({root}/{arch} ok)
  from = "MMDVM-Host"          # the Makefile's output name
  to = "/usr/local/bin/MMDVMHost"
  [[install.sample_config]]    # seeded only if the destination is absent
  from = "MMDVM-Host.ini"
  to = "{root}/mmdvmhost"

Build dependencies are preflight-checked, never auto-installed — missing commands (requires) or dev libraries (requires_files, since headers aren’t commands) abort fast with deps_hint, before any clone or compile. The build streams its output live, and sample_config never clobbers an existing config.

hamctl install mmdvmhost       # preflight → git clone → make → install + seed config

MMDVMHost build dependencies

Current MMDVMHost (g4klx/MMDVMHost) needs a C++ toolchain plus the nlohmann-json and libmosquitto development libraries. On Debian / Raspberry Pi OS / Armbian:

sudo apt-get update
sudo apt-get install -y build-essential git nlohmann-json3-dev libmosquitto-dev
Dependency apt package Why
C++ toolchain build-essential g++, make to compile
Git git clone the source
nlohmann-json nlohmann-json3-dev <nlohmann/json.hpp> (JSON config)
libmosquitto libmosquitto-dev <mosquitto.h> (MQTT support)

If any are missing, hamctl install mmdvmhost stops immediately and prints this exact apt-get line — nothing is built until the dependencies are present. The compiled binary is installed to /usr/local/bin/MMDVMHost and a default config is seeded to {root}/mmdvmhost only if one isn’t already there.