1 # Defines the commonly used target directories and provides a convenience
2 # function to install jar files.
4 # Jar location on target
5 datadir_java ?= ${datadir}/java
7 # JNI library location on target
8 libdir_jni ?= ${libdir}/jni
10 STAGING_DATADIR_JAVA ?= ${STAGING_DATADIR}/java
11 STAGING_LIBDIR_JNI ?= ${STAGING_LIBDIR}/jni
14 # Purpose: Install a jar file and create all the given symlinks to it.
16 # oe_jarinstall foo-1.3.jar foo.jar
17 # Installs foo-1.3.jar and creates symlink foo.jar.
19 # oe_jarinstall -s foo-1.3.jar foo.jar
20 # Installs foo-1.3.jar to staging and creates symlink foo.jar.
22 # oe_jarinstall -r foo-1.3.jar foo_1_3.jar foo.jar
23 # Installs foo_1_3.jar as foo-1.3.jar and creates a symlink to this.
25 dir=${D}${datadir_java}
27 while [ "$#" -gt 0 ]; do
30 dir=${STAGING_DATADIR_JAVA}
37 oefatal "oe_jarinstall: unknown option: $1"
47 destname=${destname:-`basename $jarname`}
51 install -m 0644 $jarname $dir/$destname
53 # Creates symlinks out of the remaining arguments.
54 while [ "$#" -gt 0 ]; do
55 if [ -e $dir/$1 ]; then
56 oewarn "file was in the way. removing:" $dir/$1
59 ln -s $destname $dir/$1