get java-wrapper search for "java6"
[debian/jabref.git] / jabref.ebuild
1 #See also https://bugs.gentoo.org/show_bug.cgi?id=385751
2
3 #=========== jabref ebuild hacked from dmol's 2.8.1 ==============
4 # Copyright 1999-2012 Gentoo Foundation
5 # Distributed under the terms of the GNU General Public License v2
6 # $Header:  $
7
8 EAPI=4
9
10 WANT_ANT_TASKS="dev-java/jarbundler:0"
11 #docs aren't builded correctly?
12 JAVA_PKG_IUSE=""
13 inherit eutils java-pkg-2 java-ant-2
14
15 MY_PV="${PV/_beta/b}"
16
17 DESCRIPTION="GUI frontend for BibTeX, written in Java"
18 HOMEPAGE="http://jabref.sourceforge.net/"
19 SRC_URI="mirror://sourceforge/${PN}/JabRef-${MY_PV}-src.tar.bz2"
20
21 LICENSE="GPL-2"
22 SLOT="0"
23 KEYWORDS="~amd64 ~x86"
24 IUSE="mysql"
25
26 #do not include antlr-3, use shipped antlr-3.0b5.jar ?
27 #       >=dev-java/antlr-3.1.3:3[java]
28 CDEPEND="dev-java/spin:0
29         dev-java/glazedlists:1.8
30         dev-java/jempbox:1.7
31         dev-java/pdfbox:1.7
32         >=dev-java/antlr-2.7.3:0[java]
33         >=dev-java/jgoodies-forms-1.1.0:0
34         dev-java/jgoodies-looks:2.0
35         >=dev-java/microba-0.4.3:0
36         dev-java/commons-logging:0
37         dev-java/jpf:1.5
38         dev-java/jpfcodegen:0
39         dev-java/jgoodies-forms:0
40         mysql? ( dev-java/jdbc-mysql:0 )"
41
42 RDEPEND=">=virtual/jre-1.6
43         ${CDEPEND}"
44
45 DEPEND=">=virtual/jdk-1.6
46         ${CDEPEND}"
47
48 S="${WORKDIR}/${PN}-${MY_PV}"
49
50 JAVA_ANT_REWRITE_CLASSPATH="true"
51 #EANT_ANT_TASKS="jarbundler"
52 EANT_BUILD_TARGET="jars"
53 EANT_DOC_TARGET="docs"
54
55 #do not include antlr-3, use shipped antlr-3.0b5.jar
56 EANT_GENTOO_CLASSPATH="antlr,commons-logging,glazedlists-1.8,jempbox-1.7,jgoodies-forms,jgoodies-looks-2.0,jpf-1.5,microba,pdfbox-1.7,spin"
57 EANT_GENTOO_CLASSPATH_EXTRA="${S}/lib/antlr-3.0b5.jar"
58
59 src_install() {
60         java-pkg_newjar build/lib/JabRef-${MY_PV}.jar
61         java-pkg_dojar lib/antlr-3.0b5.jar
62         java-pkg_dojar lib/plugin/JPFCodeGenerator-rt.jar
63
64         #are not builded? Investigate why
65         #use doc && java-pkg_dojavadoc build/docs/API
66         dodoc src/txt/README
67
68         java-pkg_dolauncher ${PN} \
69                 --main net.sf.jabref.JabRef
70
71         dodir /usr/share/${PN}/lib/plugins
72         keepdir /usr/share/${PN}/lib/plugins
73
74         java-pkg_register-optional-dependency jdbc-mysql
75
76         newicon src/images/JabRef-icon-48.png JabRef-icon.png || die
77         make_desktop_entry ${PN} JabRef JabRef-icon Office
78         echo "MimeType=text/x-bibtex;" >> "${D}/usr/share/applications/${PN}-${PN}.desktop"
79 }