summaryrefslogtreecommitdiff
blob: 31d37965777c9133c89497ccb96111c597473926 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/triplea/triplea-0.8.2.1.ebuild,v 1.1 2006/10/18 00:53:37 nyhm Exp $

inherit eutils java-ant-2 java-pkg-2 versionator games

MY_PV=$(replace_all_version_separators _)
DESCRIPTION="An open source clone of the popular Axis and Allies boardgame"
HOMEPAGE="http://triplea.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${PN}_${MY_PV}_source_code_only.zip"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE=""

RDEPEND=">=virtual/jre-1.5
	=dev-java/jgoodies-looks-1.3*"
DEPEND="${RDEPEND}
	>=virtual/jdk-1.5
	dev-java/ant
	app-arch/unzip"

S=${WORKDIR}/${PN}_${MY_PV}

src_unpack() {
	unpack ${A}
	cd "${S}"/lib

	rm *.jar
	java-pkg_jar-from jgoodies-looks-1.3 looks.jar looks-1.3.1.jar
}

src_compile() {
	eant || die
}

src_install() {
	games_make_wrapper ${PN} \
		'java -cp classes:$(java-config -p jgoodies-looks-1.3) \
			games.strategy.engine.framework.GameRunner' \
		"${GAMES_DATADIR}"/${PN}

	insinto "${GAMES_DATADIR}"/${PN}
	doins -r classes data games images maps || die "doins failed"

	newicon icons/triplea_icon.bmp ${PN}.bmp
	make_desktop_entry ${PN} TripleA /usr/share/pixmaps/${PN}.bmp

	dodoc changelog.txt
	dohtml -r doc/* readme.html
	prepgamesdirs
}