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

EAPI="7"
KEYWORDS="amd64 arm64"
RESTRICT="mirror"

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

DESCRIPTION="msbuild eselect module"
HOMEPAGE="https://github.com/ArsenShnurkov/shnurise"

# GITHUB_ACCOUNT="ArsenShnurkov"
GITHUB_PROJECTNAME="eselect-modules"
EGIT_COMMIT="bff06be7887ab2fb8a496bad9282b54ee9e3821c"
SRC_URI="https://github.com/ArsenShnurkov/${GITHUB_PROJECTNAME}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
	"

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

RDEPEND="
	app-admin/eselect
	"

IUSE=""

src_unpack() {
	mkdir -p "${WORKDIR}"
	tar xvf "${WORKDIR}/../distdir/${P}.tar.gz" -C "${WORKDIR}"
	mv "${GITHUB_PROJECTNAME}-${EGIT_COMMIT}" "${P}"
}

src_install() {
	cd "${P}"
	insinto /usr/share/eselect/modules
	newins "${S}/msbuild.eselect" msbuild.eselect || die
}
