# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit git-r3 autotools

DESCRIPTION="TUI and CLI wrappers for Gentoo system upgrades"
HOMEPAGE="https://gitlab.com/masterwolf/pupgrade"
EGIT_REPO_URI="https://gitlab.com/masterwolf/pupgrade.git"
EGIT_BRANCH="testing"
EGIT_COMMIT="fe15689a50d9a5f7b8a2e100df0d94f47084c559"

S="${WORKDIR}/${P}/source"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""

IUSE="chrooter"

RDEPEND="
dev-util/dialog
app-shells/bash
chrooter? ( app-admin/chrooter )
app-portage/eix
"

DEPEND="${RDEPEND}"

src_prepare() {
eautoreconf
default
}

src_compile() {

emake
}

src_install() {
dobin pupgrade
newbin "${WORKDIR}/${P}/bash/tuipupgrade" "tuipupgrade"

}