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

EAPI=8

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

inherit cargo git-r3

DESCRIPTION="Horizontal scrolling RSS news ticker for Wayland/Sway compositors"
HOMEPAGE="https://git.sr.ht/~rek2/rss-ticker"
EGIT_REPO_URI="https://git.sr.ht/~rek2/rss-ticker"

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

QA_FLAGS_IGNORED="usr/bin/rss-ticker"

src_unpack() {
	git-r3_src_unpack
	cargo_live_src_unpack
}

src_install() {
	cargo_src_install

	einstalldocs
}

pkg_postinst() {
	elog "rss-ticker auto-generates its config at ~/.config/rss-ticker/config.toml"
	elog "on first run; edit it to customize feeds, position, speed, etc."
}