bug-java-library.bbclass: Add a class to install jar files without symlinks
PATCH 1/3 bug-java-library.bbclass: Add a class to install jar files without symlinks
Signed-off-by Stefan Schmidt <[email protected]>
--- classes/bug-java-library.bbclass | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) create mode 100644 classes/bug-java-library.bbclass
classes/bug-java-library.bbclass new file +17 -0
@@ -0,0 +1,17 @@ +# We do not want to have symlinks for jar files + +inherit java-library + +# File name of the libraries' main Jar file (no version in name) +JARFILENAME = "${BPN}.jar" + +# We do not want symlinks for jar files +ALTJARFILENAMES = "" + +java_install() { + oe_jarinstall ${JARFILENAME} +} + +java_stage() { + oe_jarinstall -s ${JARFILENAME} +}
Signature · 1 line
1.7.2.3
PATCH 2/3 bug-image.bbclass: Add class for bug images
Signed-off-by Stefan Schmidt <[email protected]>
--- classes/bug-image.bbclass | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) create mode 100644 classes/bug-image.bbclass
classes/bug-image.bbclass new file +54 -0
@@ -0,0 +1,54 @@ +# Available IMAGE_FEATURES: +# - apps-console-core +# - x11-base - X11 server + minimal desktop +# - x11-sato - OpenedHand Sato environment +# - dev-pkgs - development packages +# - dbg-pkgs - debug packages + +DISTRO_TASKS += '\ + ${@base_contains("IMAGE_FEATURES", "apps-console-core", "task-poky-apps-console", "",d)} \ + ${@base_contains("IMAGE_FEATURES", ["apps-console-core", "dbg-pkgs"], "task-poky-apps-console-dbg", "",d)} \ + ${@base_contains("IMAGE_FEATURES", ["apps-console-core", "dev-pkgs"], "task-poky-apps-console-dev", "",d)} \ + \ + ${@base_contains("IMAGE_FEATURES", "x11-base", "task-poky-x11-base", "",d)} \ + ${@base_contains("IMAGE_FEATURES", ["x11-base", "dbg-pkgs"], "task-poky-x11-base-dbg", "",d)} \ + ${@base_contains("IMAGE_FEATURES", ["x11-base", "dev-pkgs"], "task-poky-x11-base-dev", "",d)} \ + \ + ${@base_contains("IMAGE_FEATURES", "x11-sato", "task-poky-x11-sato", "",d)} \ + ${@base_contains("IMAGE_FEATURES", ["x11-sato", "dbg-pkgs"], "task-poky-x11-sato-dbg", "",d)} \ + ${@base_contains("IMAGE_FEATURES", ["x11-sato", "dev-pkgs"], "task-poky-x11-sato-dev", "",d)} \ + ' + +IMAGE_INSTALL ?= "${DISTRO_TASKS}" + +X11_IMAGE_FEATURES = "x11-base" +SATO_IMAGE_FEATURES = "${X11_IMAGE_FEATURES} apps-x11-sato" + +inherit image + +ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_buildinfo" + +rootfs_update_buildinfo () { + echo "BUG Linux Build Information" > ${IMAGE_ROOTFS}/etc/buildinfo + echo "Version: 2.0.2" >> ${IMAGE_ROOTFS}/etc/buildinfo + echo "Build Host: `uname -a`" >> ${IMAGE_ROOTFS}/etc/buildinfo + echo "Build User: `whoami`" >> ${IMAGE_ROOTFS}/etc/buildinfo + echo "Build Time: `date -u`" >> ${IMAGE_ROOTFS}/etc/buildinfo + echo "Revision: ${METADATA_REVISION}" >> ${IMAGE_ROOTFS}/etc/buildinfo + + # Alias stuff that normally should belong into the bashrc or similar + echo "alias ipkg='opkg'" >>${IMAGE_ROOTFS}/etc/profile + echo "alias ll='ls -al'" >>${IMAGE_ROOTFS}/etc/profile + + # Bandaid for RI1413 + echo "vm.min_free_kbytes = 4096" >> ${IMAGE_ROOTFS}/etc/sysctl.conf + + # We don't want persistent net rules as we would like to be able using + # the same rootfs in other bugs. + rm ${IMAGE_ROOTFS}/lib/udev/write_net_rules + + curdir=$PWD + cd ${IMAGE_ROOTFS}/usr/lib/ + ln -sf libbluetooth.so.3 libbluetooth.so + cd $curdir +}
Signature · 1 line
1.7.2.3
PATCH 3/3 jni-library.bbclass: Add helper class for jni libraries
In reply to Stefan SchmidtSigned-off-by Stefan Schmidt <[email protected]>
--- classes/jni-library.bbclass | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) create mode 100644 classes/jni-library.bbclass
classes/jni-library.bbclass new file +54 -0
@@ -0,0 +1,54 @@ +# we need javah +DEPENDS += "openjdk-langtools-native zip-native" + +JNI_LIB_DIR = "/usr/lib/jni" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +EXTRA_OEMAKE +=" \ + JAVAH_OUT=${D}${JNI_LIB_DIR} \ + LIB_DIR=${D}${JNI_LIB_DIR} \ + JAVAH_CLASSPATH=${S}/build --debug \ + COMMON_CLASSPATH=${STAGING_LIBDIR}/com.buglabs.bug.jni.common.jar \ + STAGING_BUG_INCDIR=${STAGING_INCDIR}/bug \ + BUG_LINUX_SRC=${STAGING_KERNEL_DIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + CLASSPATH_INCDIR=${STAGING_INCDIR}/classpath \ + ROOTFS_BUG=${STAGING_LIBDIR}/../../ \ +" + +addtask jni_compile after do_compile before do_install +do_jni_compile() { + cd ${S}/src/c + oe_runmake jni +} + +addtask jni_install after do_install before do_package +do_jni_install() { + install -d ${D}${JNI_LIB_DIR} + cd ${S}/src/c + oe_runmake libs +} + +addtask jni_update_jar after do_jni_install before do_package +do_jni_update_jar(){ + cd ${S}/src/c/ + install -d lib/ + cp *.so lib/ + zip -u ${D}${datadir_java}/${JARFILENAME} lib/*.so +} + +addtask jni_staging after do_jni_install before do_package +do_jni_staging() { + if test -e ${S}/src/c/*.so; then + install -d ${STAGING_LIBDIR}/bug + cp -r ${S}/src/c/*.so ${STAGING_LIBDIR}/bug + cp -r ${S}/src/c/*.so ${STAGING_LIBDIR}/ + fi + + if test -e ${S}/src/c/include/*.h; then + install -d ${STAGING_INCDIR}/bug + cp -r ${S}/src/c/include/*.h ${STAGING_INCDIR}/bug + cp -r ${S}/src/c/include/*.h ${STAGING_INCDIR}/ + fi +}
Signature · 1 line
1.7.2.3