# Copyright 2026 Nadeŭka <me+oss@nadevko.cc>
# Distributed under the terms of the GNU General Public License v2
EAPI=9

inherit optfeature

DESCRIPTION='Script to scan $HOME for XDG base directories spec violations and provide fixes'
HOMEPAGE=https://github.com/b3nj5m1n/xdg-ninja
SRC_URI="https://github.com/b3nj5m1n/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE=MIT
SLOT=0
KEYWORDS=amd64

RDEPEND='
	app-misc/jq
	sys-apps/findutils
	sys-apps/sed
'

PATCHES=( "${FILESDIR}" )

src_install() {
	emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
	einstalldocs
}

pkg_postinst() {
	optfeature 'Syntax highlight' app-misc/glow sys-apps/bat dev-python/pygments app-text/highlight
}