Browse files

classes: Bring over bug classes for image and java library.

Based on the buglabs-sw3.0 branch.

Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
  • Loading branch information...
1 parent cf9e2d4 commit f95d8eed4cdbc1ccc3bed99df728b35ba7fe0894 @Stefan-Schmidt Stefan-Schmidt committed Nov 25, 2011
Showing with 48 additions and 0 deletions.
  1. +32 −0 classes/bug-image.bbclass
  2. +16 −0 classes/bug-java-library.bbclass
View
32 classes/bug-image.bbclass
@@ -0,0 +1,32 @@
+#set these variables to defaults if not already set
+#BUILD_URL ?= ""
+BUG_RELEASE_VERSION ?= "0.0"
+BUILD_NUMBER ?= `date '+%m%d%y%H%M'`
+
+IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${BUG_RELEASE_VERSION}"
+
+inherit image
+
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_buildinfo"
+
+rootfs_update_buildinfo () {
+ echo "BUG Linux Build Information" > ${IMAGE_ROOTFS}/etc/buildinfo
+ echo "Version: ${BUG_RELEASE_VERSION}.${BUILD_NUMBER}" >> ${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 "Build Source: ${BUILD_URL}" >> ${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
+
+ curdir=$PWD
+ cd ${IMAGE_ROOTFS}/usr/lib/
+ ln -sf libbluetooth.so.3 libbluetooth.so
+ cd $curdir
+}
View
16 classes/bug-java-library.bbclass
@@ -0,0 +1,16 @@
+# 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}
+}

0 comments on commit f95d8ee

Please sign in to comment.