# $Header: $

EAPI="7"

COMMIT="875f4162c91c7fc7bc450dccaf7b896a927fa42b"

PYTHON_COMPAT=( python3_{7,8,9,10} )
inherit python-r1

DESCRIPTION="Convert VMware .vmdk images, build .ovf and .ova"
HOMEPAGE="https://github.com/vmware/open-vmdk"

SRC_URI="https://github.com/vmware/open-vmdk/archive/${COMMIT}.zip -> ${P}.zip"
KEYWORDS="amd64 x86"

LICENSE="Apache-2.0"
SLOT="0"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="${PYTHON_DEPS}"
DEPEND=${RDEPEND}

S=${WORKDIR}/${PN}-${COMMIT}


src_install() {
        emake DESTDIR="${D}" install || die "install failed"

        newbin ovf/mkovf.py mkovf || die "newbin failed"
        python_replicate_script "${ED}"/usr/bin/mkovf || die "python_replicate_script failed"

        insinto /usr/share/${PN}
        doins ova/template*
}
