]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/classpath/cp-tools_0.00-cvs20020812.bb
Add support for building java apps and libraries
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / classpath / cp-tools_0.00-cvs20020812.bb
1 # cp-tools 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 tools (javah, javap, etc.)"
6 HOMEPAGE = "http://www.gnu.org/software/classpath/cp-tools/"
7 LICENSE = "GPLv2"
8 PRIORITY = "optional"
9 MAINTAINER = "Rene Wagner <rw@handhelds.org>"
10 SECTION = "utils"
11
12 inherit java
13
14 FIXEDCVSDATE = "${@bb.data.getVar('PV', d, 1).split('cvs')[-1]}"
15 SRC_URI = "cvs://anoncvs@savannah.gnu.org/cvsroot/classpath;module=cp-tools;method=ext;date=${FIXEDCVSDATE}"
16 S = "${WORKDIR}/cp-tools"
17
18 # bypassing the original build system. only compiling pure java code.
19 do_configure () {
20         true
21 }
22
23 do_compile () {
24         echo $JAVAC `find . -name '*.java' | grep -v tools/rmi`
25         $JAVAC -cp . `find . -name '*.java'`
26         echo $JAR cfm ../cp-tools.jar `find . -name '*.class'`
27         $JAR cfm ../cp-tools.jar `find . -name '*.class'`
28 }
29
30 do_install () {
31         install -d ${D}${datadir}
32         install -d ${D}${datadir}/java
33
34         install -m 0644 cp-tools.jar ${D}${datadir}/java/cp-tools-${PV}.jar
35         (cd ${D}${datadir}/java && ln -sf cp-tools-${PV}.jar cp-tools.jar)
36
37         install -d ${D}${bindir}
38         for i in javah javap serialver; do
39                 sed -e 's:java:java -cp ${datadir}/java/cp-tools.jar:' bin/$i > bin/$i-cp
40                 install -m 0755 bin/$i-cp ${D}${bindir}/$i-cp
41         done
42 }
43
44 pkg_portinst () {
45         for i in javah javap serialver; do
46                 update-alternatives --install ${bindir}/$i $i ${bindir}/$i-cp 350
47         done
48 }
49
50 pkg_postrm_append () {
51         for i in javah javap serialver; do
52                 update-alternatives --remove $i ${bindir}/$i-cp
53         done
54 }
55