summaryrefslogtreecommitdiff
blob: 24c34828a4b889201cf64ef726ed77c901c5d059 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/jcommander/jcommander-1.30.ebuild,v 1.1 2012/12/31 02:37:45 flameeyes Exp $

EAPI=4

inherit eutils java-pkg-2 java-pkg-simple

GITHUB_USER="cbeust"

DESCRIPTION="Command line parsing framework for Java"
HOMEPAGE="https://github.com/cbeust/jcommander"
SRC_URI="https://github.com/${GITHUB_USER}/${PN}/tarball/${P} -> ${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

# test? ( dev-java/testng )
DEPEND="${CDEPEND}
	>=virtual/jdk-1.6"

RDEPEND="${CDEPEND}
	>=virtual/jre-1.6"

JAVA_SRC_DIR="src/main"

S="${WORKDIR}"/${P}

# until testng is in main tree
RESTRICT=test

src_unpack() {
	unpack ${A}
	mv ${GITHUB_USER}-${PN}-* ${P} || die
	rm "${P}"/pom.xml || die
}

src_test() {
	JAVA_SRC_DIR="src/test" \
		JAVA_CLASSPATH_EXTRA="${PN}.jar" \
		PN="${PN}-test" \
		java-pkg-simple_src_compile
}

src_install() {
	java-pkg-simple_src_install
	dodoc README.markdown CHANGELOG
}