Files
guru/games-strategy/unciv-bin/unciv-bin-4.15.2.ebuild
Filip Kobierski 1973ba0faf games-strategy/unciv-bin: bump to 4.15.2
Signed-off-by: Filip Kobierski <fkobi@pm.me>
2025-01-12 13:46:33 +01:00

34 lines
1004 B
Bash

# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop java-pkg-2
DESCRIPTION="Turn-based historical strategy game, a remake of Civ V"
HOMEPAGE="https://github.com/yairm210/Unciv"
SRC_URI="https://github.com/yairm210/Unciv/releases/download/${PV}/Unciv.jar -> ${P}.jar"
S="${WORKDIR}"
LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="-* ~amd64" # the jar also should work on arm{,64} but I am unable to test that
RDEPEND=">=virtual/jre-11:*" # could be more
BDEPEND="app-arch/unzip"
declare -r IMG_PATH="ExtraImages/Icon.png"
src_unpack() {
cp "${DISTDIR}/${P}.jar" "${WORKDIR}"
unzip ${P}.jar ${IMG_PATH} || die "Extracting icon failed"
}
src_install() {
java-pkg_newjar "${P}.jar"
java-pkg_dolauncher "${PN}" --jar "${PN}.jar"
newicon --size 32 ${IMG_PATH} unciv.png || die "Installing icon failed"
# this desktop file is better than upstream's
make_desktop_entry "${PN}" Unciv-bin unciv "Game;StrategyGame" "Terminal=false"
}