# Copyright 2026 ReK2 - Chris F.N. <rek2@hispagatos.org>
# https://rek2.hispagatos.org
# Distributed under the terms of the GNU General Public License v3

EAPI=8

# Upstream Cargo.toml uses edition = "2024"
RUST_MIN_VER="1.85.0"
CRATES=""

inherit cargo git-r3

DESCRIPTION="IRC-style chat client for the Reticulum mesh network (RRC)"
HOMEPAGE="https://git.sr.ht/~rek2/RRChat"
EGIT_REPO_URI="https://git.sr.ht/~rek2/RRChat"

LICENSE="GPL-3"
# Dependent crate licenses
LICENSE+="
	Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD BSD-1 BSD-2 Boost-1.0
	MIT MPL-2.0 Unlicense Unicode-3.0 ZLIB
"
SLOT="0"
KEYWORDS=""

QA_FLAGS_IGNORED="usr/bin/rrchat"

src_unpack() {
	git-r3_src_unpack
	cargo_live_src_unpack
}

src_install() {
	cargo_src_install

	einstalldocs
}

pkg_postinst() {
	elog "rrchat is a client: a Reticulum daemon must be running to connect."
	elog "Install dev-python/rns for rnsd, or use rns-server from the Rust rns-rs stack."
}