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

EAPI=8

inherit desktop unpacker xdg

DESCRIPTION="Download, install, and play games from the Epic Games Store"
HOMEPAGE="https://store.epicgames.com"
SRC_URI="https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncher-x86_64.deb -> ${P}.deb"

LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="bindist mirror strip"

RDEPEND="
	dev-libs/libayatana-appindicator
	net-libs/webkit-gtk:4.1
	x11-libs/gtk+:3
"

S="${WORKDIR}"

src_unpack() {
	unpacker ${A}
}

src_install() {
	if [[ -d "${WORKDIR}/usr" ]]; then
		cp -r "${WORKDIR}/usr" "${D}/usr" || die
	fi
}