Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

net.contentobjects.jnotify: Add jnotify recipe

Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
  • Loading branch information...
commit b252b88e030acbaf75d0c862aab332a8021ac941 1 parent 0794d34
Stefan Schmidt Stefan-Schmidt authored
Showing with 61 additions and 0 deletions.
  1. +61 −0 recipes-misc/net.contentobjects.jnotify_0.91.bb
61 recipes-misc/net.contentobjects.jnotify_0.91.bb
View
@@ -0,0 +1,61 @@
+DESCRIPTION = "JNotify library with OSGi extensions."
+
+SRCREV = "12121"
+
+SRC_URI = "svn://bugcamp.net/bug/trunk;module=${PN};proto=svn"
+
+DEPENDS = "fastjar-native virtual/java-initial openjdk-6"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://lgpl.txt;md5=0a6bd609a83bac83314921489173b1d3"
+
+inherit bug-java-library
+
+PACKAGES = ${PN}
+S = "${WORKDIR}/${PN}"
+# INHIBIT_PACKAGE_STRIP=1
+PR="r0"
+
+addtask jar_package after do_compile before do_install
+
+do_compile() {
+ mkdir -p build
+ oe_makeclasspath cp -s ${DEPENDS} ${EXTRA_CP}
+ cp=$cp:${WORKDIR}/files/osgi.jar
+
+ echo "--- JAVAC CLASSPATH ---------------"
+ echo $cp | awk 'BEGIN {FS=":"} {split($0,a,":"); for (i=1; i<=NF; i++) print a[i]; }'
+ echo "-------------------------"
+
+ javac -sourcepath . -cp $cp -d build `find . -name \*.java`
+}
+
+do_jni_compile() {
+ cd ${S}/src/c/Release
+ oe_runmake all
+}
+
+do_jni_install() {
+ install -d ${D}${JNI_LIB_DIR}
+ install ${S}/src/c/Release/libjnotify.so ${D}${JNI_LIB_DIR}
+}
+
+do_jar_package() {
+ # mkdir META-INF
+ echo 'Manifest-Version: 1.0' > META-INF/MANIFEST.MF
+ echo 'Bundle-Vendor: Bug Labs, Inc.' >> META-INF/MANIFEST.MF
+ echo 'Bundle-Author: Omry Yadan (http://jnotify.sourceforge.net/)' >> META-INF/MANIFEST.MF
+ echo 'Bundle-Name: net.contentobjects.jnotify' >> META-INF/MANIFEST.MF
+ echo 'Bundle-License: LGPL' >> META-INF/MANIFEST.MF
+ echo 'Bundle-SymbolicName: net.contentobjects.jnotify' >> META-INF/MANIFEST.MF
+ echo 'Bundle-Version: ${DISTRO_VERSION}.${PR}' >> META-INF/MANIFEST.MF
+ echo 'Bundle-BuildDate: ${DATETIME}' >> META-INF/MANIFEST.MF
+ echo 'Export-Package: net.contentobjects.jnotify' >> META-INF/MANIFEST.MF
+
+ fastjar -0 -m META-INF/MANIFEST.MF -C build -c -f ${JARFILENAME} .
+}
+
+FILES_${PN} += "/usr/share/java/${PN}.jar"
+FILES_${PN} += "/usr/share/java/${P}.jar"
+FILES_${PN} += "/usr/lib/jni/libjnotify.so"
+FILES_${PN} += "${JNI_LIB_DIR}/${PN}.so"
Please sign in to comment.
Something went wrong with that request. Please try again.