# 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="Terminal browser for Micron pages over Reticulum/NomadNet"
HOMEPAGE="https://git.sr.ht/~rek2/Micron-Navigator"
EGIT_REPO_URI="https://git.sr.ht/~rek2/Micron-Navigator"

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

QA_FLAGS_IGNORED="usr/bin/micron-navigator"

src_unpack() {
	git-r3_src_unpack
	cargo_live_src_unpack
}

src_install() {
	cargo_src_install

	einstalldocs
}

pkg_postinst() {
	elog "micron-navigator is a browser and runs as your user: a Reticulum"
	elog "daemon (rnsd) must be running, e.g. systemctl --user start rnsd"
}