1 # Inherit this bbclass for each java recipe that builds a Java library (jar file[s]).
3 # It automatically adds important build dependencies, defines JPN (Java Package Name)
4 # a package named ${JPN} whose contents are those of ${datadir}/java (the jar location).
6 # The JPN is basically lib${PN}-java but takes care of the fact that ${PN} already
7 # starts with "lib" and/or ends with "-java". In case the "lib" prefix is part of
8 # your package's normal name (e.g. liberator) the guessing is wrong and you have
13 def java_package_name(d):
19 pn = bb.data.getVar('PN', d, 1)
20 if not pn.startswith("lib"):
23 if not pn.endswith("-java"):
26 return pre + pn + post
28 JPN ?= "${@java_package_name(d)}"
30 DEPENDS_prepend = "virtual/javac-native fastjar-native "
34 PACKAGE_ARCH_${JPN} = "all"
36 FILES_${JPN} = "${datadir_java}"