Name: herdr Version: 0.9.5 Release: 1%{?dist} Summary: Terminal workspace manager for coding agents # The binary statically links Rust crates and vendored Ghostty code; their # individual licenses still need to be audited before redistribution. License: Apache-2.0 AND MIT URL: https://github.com/herdrdev/herdr Source0: https://github.com/herdrdev/herdr/archive/refs/tags/v%{version}.tar.gz # Generated by prepare-sources.sh from Cargo.lock and upstream Zig hashes. Source1: %{name}-%{version}-deps.tar.gz Patch0: 0001-zig-baseline-cpu.patch ExclusiveArch: x86_64 aarch64 BuildRequires: cargo >= 1.96.1 BuildRequires: cargo-rpm-macros BuildRequires: rust >= 1.96.1 # Upstream's vendored libghostty-vt requires this Zig release. BuildRequires: zig = 0.16.0 BuildRequires: gcc BuildRequires: cmake BuildRequires: ninja-build BuildRequires: python3 %description Herdr is a terminal workspace manager that keeps terminal sessions running in a background server and provides a workspace for coding agents. %prep %autosetup -n %{name}-%{version} -a 1 -p1 cp vendor/libghostty-vt/LICENSE LICENSE-GHOSTTY %build %set_build_flags # Dependencies are fetched while creating the SRPM, not during compilation. export CARGO_HOME="$PWD/.cargo-home" export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" export LIBGHOSTTY_VT_SIMD=false cargo build --release --locked --offline --jobs %{_smp_build_ncpus} %install install -Dpm 0755 target/release/herdr %{buildroot}%{_bindir}/herdr install -d %{buildroot}%{_datadir}/bash-completion/completions \ %{buildroot}%{_datadir}/fish/vendor_completions.d \ %{buildroot}%{_datadir}/zsh/site-functions target/release/herdr completion bash > %{buildroot}%{_datadir}/bash-completion/completions/herdr target/release/herdr completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/herdr.fish target/release/herdr completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_herdr %check target/release/herdr --version ( tmp=$(mktemp -d) export HOME="$tmp" XDG_CONFIG_HOME="$tmp/config" XDG_STATE_HOME="$tmp/state" export HERDR_CONFIG_PATH="$tmp/config.toml" HERDR_SOCKET_PATH="$tmp/herdr.sock" target/release/herdr server >"$tmp/server.log" 2>&1 & pid=$! trap 'kill "$pid" 2>/dev/null || :; wait "$pid" 2>/dev/null || :; rm -rf "$tmp"' EXIT ready=false for attempt in $(seq 1 10); do if target/release/herdr status server | grep -q 'status: running'; then ready=true break fi sleep 1 done "$ready" target/release/herdr workspace create --label rpm-test --no-focus > "$tmp/workspace.json" target/release/herdr workspace list > "$tmp/workspaces.json" python3 - "$tmp/workspace.json" "$tmp/workspaces.json" <<'PY' import json import sys with open(sys.argv[1]) as f: workspace = json.load(f)['result']['workspace'] with open(sys.argv[2]) as f: workspaces = json.load(f)['result']['workspaces'] assert workspace['label'] == 'rpm-test' assert workspace['workspace_id'] in [item['workspace_id'] for item in workspaces] PY ) %files %license LICENSE LICENSE-GHOSTTY %doc README.md %{_bindir}/herdr %{_datadir}/bash-completion/completions/herdr %{_datadir}/fish/vendor_completions.d/herdr.fish %{_datadir}/zsh/site-functions/_herdr %changelog * Fri Nov 13 2026 Zeldris <80939130+zeldrisho@users.noreply.github.com> - 0.9.5-1 - Initial package