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