Files
guru/games-util/HeroicGamesLauncher-bin/HeroicGamesLauncher-bin-2.8.0.ebuild
Gonçalo Negrier Duarte 4a713cbdd9 games-util/HeroicGamesLauncher-bin: add gamescope useflag
* add desktop file to open with gamescope
 * launch heroic using gamescope (app and all games)

Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
2023-07-12 17:41:53 +01:00

41 lines
1.1 KiB
Bash

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop
SRC_URI="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases/download/v${PV}/heroic-${PV}.tar.xz"
DESCRIPTION="A Native GOG and Epic Games Launcher for Linux, Windows and Mac."
HOMEPAGE="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher"
LICENSE="GPL-3"
SLOT="0"
RDEPEND="gamescope? ( gui-wm/gamescope )"
KEYWORDS="~amd64"
S="${WORKDIR}/heroic-${PV}"
IUSE="gamescope"
src_install() {
mv "${S}" "${WORKDIR}/heroic"
insinto /opt
doins -r "${WORKDIR}/heroic"
insinto /opt/bin
doins "${FILESDIR}/heroic"
fperms +x /opt/heroic/heroic /opt/bin/heroic
#fix login error both EPIC and GOG
fperms +x /opt/heroic/resources/app.asar.unpacked/build/bin/linux/legendary \
/opt/heroic/resources/app.asar.unpacked/build/bin/linux/gogdl
domenu "${FILESDIR}/HeroicGamesLauncher.desktop"
newicon "${WORKDIR}/heroic/resources/app.asar.unpacked/build/icon.png" heroic.png
if use gamescope; then
#Start Heroic as gamescope window
domenu "${FILESDIR}/HeroicGamesLauncher-gamescope.desktop"
fi
}