summaryrefslogtreecommitdiff
blob: 9ba50bd71d5789c682b533947ad81e571a4846f3 (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/dev-db/henplus/henplus-0.9.7.ebuild,v 1.1 2006/10/17 21:47:39 caster Exp $

inherit java-pkg-2 eutils

DESCRIPTION="Java-based multisession SQL shell for databases with JDBC support."
HOMEPAGE="http://${PN}.sf.net"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="doc source"

COMMON_DEPEND="=dev-java/commons-cli-1*
	dev-java/libreadline-java"
RDEPEND=">=virtual/jre-1.3
	${COMMON_DEPEND}"
DEPEND=">=virtual/jdk-1.3
	dev-java/ant-core
	source? ( app-arch/zip )
	${COMMON_DEPEND}"


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

	epatch "${FILESDIR}/${P}-build.xml.patch"

	cd lib
	rm -v *.jar build/*.jar
	java-pkg_jar-from commons-cli-1 commons-cli.jar
	java-pkg_jar-from libreadline-java libreadline-java.jar
}

src_compile() {
	eant jar $(use_doc)
}

src_install () {
	java-pkg_dojar "build/${PN}.jar"

	java-pkg_dolauncher ${PN} -pre "${FILESDIR}/${PN}.pre" \
		--main henplus.HenPlus

	dodoc README
	dohtml doc/HenPlus.html
	use doc && java-pkg_dojavadoc javadoc/api

	use source && java-pkg_dosrc "src/${PN}"
}