diff options
| author | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-01-18 14:21:33 +0000 |
|---|---|---|
| committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-01-18 14:21:33 +0000 |
| commit | 936f218c36509a98d9d587a7918f2a33d1441d91 (patch) | |
| tree | 9734ba29bc35b88181316a4535197c3121364d99 | |
| parent | 408fb34b733a87d181f2b2ef148b8fe61c8434a8 (diff) | |
| parent | 7569440e6587054a298f1417447750a3aff0afd9 (diff) | |
merge of 'a0f0a04325ed193844895cf9b74e8b1b48deac4e'
and 'e55bf39595a78df12d17e4b80e9ed474ad5a467d'
122 files changed, 5388 insertions, 948 deletions
diff --git a/classes/java-library.bbclass b/classes/java-library.bbclass new file mode 100644 index 0000000000..8aecfef1b9 --- /dev/null +++ b/classes/java-library.bbclass @@ -0,0 +1,37 @@ +# Inherit this bbclass for each java recipe that builds a Java library (jar file[s]). +# +# It automatically adds important build dependencies, defines JPN (Java Package Name) +# a package named ${JPN} whose contents are those of ${datadir}/java (the jar location). +# +# The JPN is basically lib${PN}-java but takes care of the fact that ${PN} already +# starts with "lib" and/or ends with "-java". In case the "lib" prefix is part of +# your package's normal name (e.g. liberator) the guessing is wrong and you have +# to set JPN manually! + +inherit java + +def java_package_name(d): + import bb; + + pre="" + post="" + + pn = bb.data.getVar('PN', d, 1) + if not pn.startswith("lib"): + pre='lib' + + if not pn.endswith("-java"): + post='-java' + + return pre + pn + post + +JPN ?= "${@java_package_name(d)}" + +DEPENDS_prepend = "virtual/javac-native fastjar-native " + +PACKAGES = "${JPN}" + +PACKAGE_ARCH_${JPN} = "all" + +FILES_${JPN} = "${datadir_java}" + |
