blob: 411a9bcea116d4a4ac96ddf8db54d5013f9d60a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# 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"
}
|