forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
freecol-0.11.6-r1.ebuild
63 lines (47 loc) · 1.15 KB
/
freecol-0.11.6-r1.ebuild
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit desktop java-pkg-2 java-ant-2
DESCRIPTION="An open source clone of the game Colonization"
HOMEPAGE="http://www.freecol.org/"
SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
# Rightly or wrongly, jogg and jorbis are bundled within Cortado but we
# don't have packages for them anyway.
CP_DEPEND="
dev-java/commons-cli:1
dev-java/cortado:0
dev-java/miglayout:0
"
DEPEND=">=virtual/jdk-1.8
app-arch/unzip
${CP_DEPEND}"
RDEPEND=">=virtual/jre-1.8
${CP_DEPEND}"
S="${WORKDIR}/${PN}"
PATCHES=(
"${FILESDIR}"/commons-cli-1.3.patch
"${FILESDIR}"/${P}-gentoo.patch
)
JAVA_ANT_REWRITE_CLASSPATH=true
EANT_BUILD_TARGET=package
src_prepare() {
default
rm -v jars/* || die
java-pkg-2_src_prepare
}
src_install() {
local datadir=/usr/share/${PN}
java-pkg_dojar FreeCol.jar
java-pkg_dolauncher ${PN} \
--pwd ${datadir} \
--main net.sf.freecol.FreeCol \
--java_args -Xmx512M
insinto ${datadir}
doins -r data schema
doicon data/${PN}.png
make_desktop_entry ${PN} FreeCol
dodoc README
}