[Title] Support library (directory type)
authorTaeyoung Son <taeyoung2.son@samsung.com>
Fri, 13 Sep 2013 10:54:46 +0000 (19:54 +0900)
committerTaeyoung Son <taeyoung2.son@samsung.com>
Fri, 13 Sep 2013 11:02:48 +0000 (20:02 +0900)
[Desc.]
[Issue]

Change-Id: I881cfb2dca956a008bf973dfd5e86a5cf6fcb1fc

build.xml
org.tizen.cli/doc/install/bin_/common.sh
package/build.linux

index b6d4830..3ddd50d 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -14,6 +14,7 @@
                </copy>
                <javac srcdir="${build}" encoding="utf-8" debug="true" verbose="false">
                        <classpath>
+                <dirset dir="${lib}" />
                                <fileset dir="${lib}" />
                                <fileset dir="${nativelib}" />
                        </classpath>
index 43ee99a..98f685b 100755 (executable)
@@ -7,15 +7,13 @@ cd $PRE
 DIR_LIB=$DIR_HOME/lib
 DIR_CONFIG=$DIR_HOME/conf
 
-JARS=`find $DIR_LIB -name "*.jar"`
-
-JAR=""
-for JAR_FILE in $JARS; do
-       JAR=$JAR:$JAR_FILE
+LIBS=`find $DIR_LIB -maxdepth 1`
+LIB=""
+for LIB in $LIBS; do
+       CLASSPATH=$CLASSPATH:$LIB
 done
 
-CLASSPATH=$DIR_CONFIG:$JAR
-
+CLASSPATH=$DIR_CONFIG:$CLASSPATH
 OPT_LOGGING="-Dlog4j.configuration=log4j.xml"
 OPT_DIR_HOME="-Dcli.home=$CLI_HOME"
 OPT_PRG_NAME="-Dcli.name=$SCRIPT"
index 0ea39d5..0b666b0 100755 (executable)
@@ -46,8 +46,16 @@ native_build() {
     for SRC in ${INCLUDING_LIB_SRC_LIST}
     do
         TARGET=`find $ROOTDIR -name "${SRC}" | head -1`
-       cp ${TARGET} ${NATIVE_LIB}
-        jar -xvf ${TARGET} lib
+        case "${TARGET}" in
+            *.jar)
+                cp ${TARGET} ${NATIVE_LIB}
+                jar -xvf ${TARGET} lib
+                ;;
+            *)
+                cp -rf ${TARGET} ${NATIVE_LIB}
+                find -name '*.jar' -exec cp {} ${NATIVE_LIB} \;
+                ;;
+        esac
     done
 }
 build() 
@@ -83,8 +91,16 @@ build()
     for SRC in ${INCLUDING_LIB_SRC_LIST}
     do
         TARGET=`find $ROOTDIR -name "${SRC}" | head -1`
-       cp ${TARGET} $LIB
-        jar -xvf ${TARGET} lib
+        case "${TARGET}" in
+            *.jar)
+                cp ${TARGET} ${LIB}
+                jar -xvf ${TARGET} lib
+                ;;
+            *)
+                cp -rf ${TARGET} ${LIB}
+                find -name '*.jar' -exec cp {} ${LIB} \;
+                ;;
+        esac
     done
 
        cp $PROJECT_HOME/lib/*.jar $LIB