Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net.contentobjects.jnotify: Add jnotify recipe
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
- Loading branch information
1 parent
0794d34
commit b252b88
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |