]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/classpath/classpath_0.90.bb
Add support for building java apps and libraries
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / classpath / classpath_0.90.bb
1 # classpath OE build file
2 # Copyright (C) 2006, Rene Wagner. All Rights Reserved
3 # Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
4
5 DESCRIPTION = "GNU Classpath standard Java libraries"
6 HOMEPAGE = "http://www.gnu.org/software/classpath/"
7 LICENSE = "Classpath"
8 PRIORITY = "optional"
9 MAINTAINER = "Rene Wagner <rw@handhelds.org>"
10 SECTION = "libs"
11 PR = "r1"
12
13 DEPENDS = "glib-2.0 gtk+ libart-lgpl pango xtst jikes-native zip-native"
14 RDEPENDS_${PN} = "${PN}-common (>= ${PV})"
15 RDEPENDS_jikes-${PN} = "${PN} jikes"
16
17 SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz \
18            file://disable-automake-checks.patch;patch=1 \
19            file://jikes-classpath.sh"
20
21 inherit autotools
22
23 EXTRA_OECONF = "--with-jikes --disable-alsa"
24
25 PACKAGES += " ${PN}-common ${PN}-examples jikes-${PN}"
26
27 FILES_${PN} = "${libdir}/${PN}"
28 FILES_${PN}-common = "${datadir}/${PN}/glibj.zip"
29 FILES_${PN}-examples = "${datadir}/${PN}/examples"
30 FILES_jikes-${PN} = "${bindir}"
31
32 do_stage() {
33         # stage JNI headers
34         install -d ${STAGING_INCDIR}/classpath
35         install -m 0644 include/jni* ${STAGING_INCDIR}/classpath/
36         
37         # stage glibj.zip (containing all class files)
38         install -d ${STAGING_DATADIR}/classpath
39         install -m 0644 lib/glibj.zip ${STAGING_DATADIR}/classpath/
40
41         # stage jikes-classpath wrapper script
42         install -d ${STAGING_BINDIR}
43         # just to get the permissions right
44         install -m 0755 ${WORKDIR}/jikes-classpath.sh ${STAGING_BINDIR}/jikes-classpath
45         sed -e "s:DATADIR:${STAGING_DATADIR}:" ${WORKDIR}/jikes-classpath.sh > ${STAGING_BINDIR}/jikes-classpath
46 }
47
48 do_install() {
49         autotools_do_install
50         mv ${D}${libdir}/security ${D}${libdir}/${PN}
51
52         # install jikes-classpath wrapper script
53         install -d ${D}${bindir}
54         # just to get the permissions right
55         install -m 0755 ${WORKDIR}/jikes-classpath.sh ${D}${bindir}/jikes-classpath
56         sed -e "s:DATADIR:${datadir}:" ${WORKDIR}/jikes-classpath.sh > ${D}${bindir}/jikes-classpath
57 }
58
59 pkg_postinst_jikes-${PN} () {
60         update-alternatives --install ${bindir}/javac javac ${bindir}/jikes-${PN} 10
61 }
62
63 pkg_postrm_jikes-${PN} () {
64         update-alternatives --remove javac ${bindir}/jikes-${PN}
65 }