Author: paperwing
Date: 2012-02-23 13:33:19 -0800 (Thu, 23 Feb 2012)
New Revision: 28352

Added:
   csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/bnd.jar
   csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/deploy.sh
Modified:
   
csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/extract.sh
Log:
Updated scripts for repackaging JOGL along with its native libraries as OSGi 
bundles. Currently, this version attempts to accommodate JOGL's newly-added 
mechanism where it will attempt to find the correct native libraries inside its 
own jar files.

Added: 
csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/bnd.jar
===================================================================
(Binary files differ)


Property changes on: 
csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/bnd.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: 
csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/deploy.sh
===================================================================
--- 
csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/deploy.sh   
                            (rev 0)
+++ 
csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/deploy.sh   
    2012-02-23 21:33:19 UTC (rev 28352)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+source artifact.properties
+
+jogl_version='2.0-b'$jogl_build_number-`echo $jogl_build_id | sed s/'-'//g | 
cut -d'_' -f1`
+
+group_id=cytoscape-temp
+
+for i in bundles/*.jar
+do
+       echo mvn install:install-file -Dfile=$i -DgroupId=$group_id 
-DartifactId=`basename $i .jar` -Dversion=$jogl_version -Dpackaging=jar
+
+       mvn install:install-file -Dfile=$i -DgroupId=$group_id 
-DartifactId=`basename $i .jar` -Dversion=$jogl_version -Dpackaging=jar
+done
+

Modified: 
csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/extract.sh
===================================================================
--- 
csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/extract.sh  
    2012-02-23 02:03:31 UTC (rev 28351)
+++ 
csplugins/trunk/toronto/yuedong/paperwing-impl/misc/jogl-repackager/extract.sh  
    2012-02-23 21:33:19 UTC (rev 28352)
@@ -1,24 +1,64 @@
 #!/bin/bash
 
 mkdir -p extracted_jars
-mkdir -p extracted_natives
+mkdir -p extracted_native_jars
 
+mkdir -p combined_jars
+mkdir -p bundles
+
 # open archives
 for i in downloads/*.7z
 do
-        7z x -y -o'extract' $i
+       echo Extracting: $i
+        7z x -y -o'extract' $i >/dev/null
 done
 
-# move jars
-for i in `find extract | grep '\.jar$'`
+# create list of files for comparison
+# pushd extract; for i in *; do pushd $i; find . >files; popd; done; popd
+
+# move non native library jars
+for i in `find extract | grep '\.jar$' | grep -v natives`
 do
        mv $i extracted_jars/`basename $i`
 done
 
-# move native libraries
-for i in `find extract | grep '\.dll$\|\.so\|\.jnilib'`
+# extract jars
+for i in extracted_jars/*.jar
 do
-       mv $i extracted_natives/`basename $i`
+       echo Unzipping: $i
+       unzip -o $i -d extracted_jars/classes >/dev/null
 done
 
+# combine into single jar
+pushd extracted_jars/classes/
+jar cf jogl.jar *
+popd
+mv extracted_jars/classes/jogl.jar combined_jars/jogl.jar
 
+# repackage jar as OSGi bundle
+java -jar bnd.jar wrap combined_jars/jogl.jar
+
+# move it to bundles folder
+mv combined_jars/jogl.bar bundles/jogl.jar
+
+
+# move native jars
+for i in `find extract | grep '\.jar$' | grep natives`
+do
+       mv $i extracted_native_jars/`basename $i`
+done
+
+# add to single jar
+pushd extracted_native_jars
+jar cf jogl-natives.jar *
+popd
+mv extracted_native_jars/jogl-natives.jar combined_jars/jogl-natives.jar
+
+# generate properties file for combined natives jar
+echo "Fragment-Host=jogl" >combined_jars/jogl-natives.jar.properties
+
+# repackage jar as OSGi bundle
+java -jar bnd.jar wrap -properties combined_jars/jogl-natives.jar.properties 
combined_jars/jogl-natives.jar
+
+# move it to bundles folder
+mv combined_jars/jogl-natives.bar bundles/jogl-natives.jar

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to