summaryrefslogtreecommitdiffstats
path: root/deployment
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-09 03:05:17 +0100
committerSven Gothel <[email protected]>2010-11-09 03:05:17 +0100
commitb3e89bfa55389cae974c94afba6fb4ce118f75df (patch)
tree063f7d59cee39e3beeec7c17c74d10497d0fa8a5 /deployment
Provide deployment (jnlp) and hudson build aggregation scripts
Diffstat (limited to 'deployment')
-rwxr-xr-xdeployment/all-deploy-webstarttest.sh57
-rwxr-xr-xdeployment/deploy-jar-sign.sh36
-rwxr-xr-xdeployment/deploy-jars-pack200.sh33
-rwxr-xr-xdeployment/deploy-jars-repack200.sh30
-rwxr-xr-xdeployment/deploy-jars-sign.sh47
-rwxr-xr-xdeployment/deploy-jars-webstarttest.sh50
-rwxr-xr-xdeployment/deploy-jars_external-webstarttest.sh26
-rwxr-xr-xdeployment/deploy-jnlp-webstarttest-filter.sh25
-rwxr-xr-xdeployment/deploy-jnlp-webstarttest.sh79
9 files changed, 383 insertions, 0 deletions
diff --git a/deployment/all-deploy-webstarttest.sh b/deployment/all-deploy-webstarttest.sh
new file mode 100755
index 0000000..e947c3f
--- /dev/null
+++ b/deployment/all-deploy-webstarttest.sh
@@ -0,0 +1,57 @@
+#! /bin/sh
+
+if [ ! -e scripts -o ! -e ../make ] ; then
+ echo start this script from JOGL/jogl/make
+ exit 1
+fi
+
+url=$1
+shift
+
+joglbuilddir=$1
+shift
+
+wsdir=$1
+shift
+
+if [ -z "$url" -o -z "$joglbuilddir" -o -z "$wsdir" ] ; then
+ echo Usage $0 codebase-url jogl-builddir webstartdir
+ echo Examples
+ echo sh $0 file:////usr/local/projects/JOGL/webstart ../build-x86_64 ../../webstart
+ echo sh $0 http://domain.org/jogl/webstart ../build-win32 ../../webstart
+ exit 1
+fi
+
+if [ ! -e $joglbuilddir ] ; then
+ echo $joglbuilddir does not exist
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+sh scripts/deploy-jars-webstarttest.sh $joglbuilddir $wsdir
+#
+# repack it .. so the signed jars can be pack200'ed
+# sh scripts/deploy-jars-repack200.sh $wsdir
+#
+# sign it
+# sh scripts/deploy-jars-sign.sh $wsdir KEY_STORE_FILE STORE_PASSWORD SOME_ARGUMENT
+#
+# pack200
+# sh scripts/deploy-jars-pack200.sh $wsdir
+#
+sh scripts/deploy-jnlp-webstarttest.sh $url $joglbuilddir $wsdir
+#
+# In case you don't sign it ..
+#
+# sh scripts/deploy-jnlp-webstarttest-filter.sh $wsdir
+#
+# Add to HOME/.java.policy
+#
+# grant codeBase "file:////usr/local/projects/JOGL/webstart/-" {
+# permission java.security.AllPermission;
+# };
+
diff --git a/deployment/deploy-jar-sign.sh b/deployment/deploy-jar-sign.sh
new file mode 100755
index 0000000..d6291c4
--- /dev/null
+++ b/deployment/deploy-jar-sign.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+jarfile=$1
+shift
+
+keystore=$1
+shift
+
+storepass=$1
+shift
+
+signarg=$1
+shift
+
+if [ -z "$jarfile" -o -z "$keystore" -o -z "$storepass" ] ; then
+ echo "usage $0 jarfile pkcs12-keystore storepass [signarg]"
+ exit 1
+fi
+
+if [ ! -e $jarfile ] ; then
+ echo $jarfile does not exist
+ exit 1
+fi
+
+if [ ! -e $keystore ] ; then
+ echo $keystore does not exist
+ exit 1
+fi
+
+THISDIR=`pwd`
+
+echo jarsigner -storetype pkcs12 -keystore $keystore $jarfile \"$signarg\"
+jarsigner -storetype pkcs12 -keystore $THISDIR/$keystore -storepass $storepass $jarfile "$signarg"
+
+cd $THISDIR
+
diff --git a/deployment/deploy-jars-pack200.sh b/deployment/deploy-jars-pack200.sh
new file mode 100755
index 0000000..471e8ab
--- /dev/null
+++ b/deployment/deploy-jars-pack200.sh
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+wsdir=$1
+shift
+
+if [ -z "$wsdir" ] ; then
+ echo usage $0 webstartdir
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+THISDIR=`pwd`
+
+cd $wsdir
+
+mkdir -p DLLS
+mv *natives*.jar DLLS/
+
+for i in *.jar ; do
+ echo pack200 -E9 $i.pack.gz $i
+ pack200 -E9 $i.pack.gz $i
+done
+
+mv DLLS/* .
+
+rm -rf DLLS
+
+cd $THISDIR
+
diff --git a/deployment/deploy-jars-repack200.sh b/deployment/deploy-jars-repack200.sh
new file mode 100755
index 0000000..1169d63
--- /dev/null
+++ b/deployment/deploy-jars-repack200.sh
@@ -0,0 +1,30 @@
+#! /bin/sh
+
+wsdir=$1
+shift
+
+if [ -z "$wsdir" ] ; then
+ echo usage $0 webstartdir
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+THISDIR=`pwd`
+
+cd $wsdir
+
+rm -rf orig-jars
+mkdir -p orig-jars
+
+for i in *.jar ; do
+ cp -a $i orig-jars
+ echo pack200 --repack $i
+ pack200 --repack $i
+done
+
+cd $THISDIR
+
diff --git a/deployment/deploy-jars-sign.sh b/deployment/deploy-jars-sign.sh
new file mode 100755
index 0000000..1a4421a
--- /dev/null
+++ b/deployment/deploy-jars-sign.sh
@@ -0,0 +1,47 @@
+#! /bin/sh
+
+wsdir=$1
+shift
+
+keystore=$1
+shift
+
+storepass=$1
+shift
+
+signarg=$1
+shift
+
+if [ -z "$wsdir" -o -z "$keystore" -o -z "$storepass" ] ; then
+ echo "usage $0 webstartdir pkcs12-keystore storepass [signarg]"
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+if [ ! -e $keystore ] ; then
+ echo $keystore does not exist
+ exit 1
+fi
+
+THISDIR=`pwd`
+
+cd $wsdir
+
+rm -rf demo-jars
+mkdir -p demo-jars
+mv jogl.test.jar jogl-demos*jar demo-jars/
+
+for i in *.jar ; do
+ echo jarsigner -storetype pkcs12 -keystore $keystore $i \"$signarg\"
+ jarsigner -storetype pkcs12 -keystore $THISDIR/$keystore -storepass $storepass $i "$signarg"
+done
+
+mv demo-jars/* .
+rm -rf demo-jars
+
+cd $THISDIR
+
diff --git a/deployment/deploy-jars-webstarttest.sh b/deployment/deploy-jars-webstarttest.sh
new file mode 100755
index 0000000..8a98f5d
--- /dev/null
+++ b/deployment/deploy-jars-webstarttest.sh
@@ -0,0 +1,50 @@
+#! /bin/sh
+
+joglbuilddir=$1
+shift
+
+wsdir=$1
+shift
+
+if [ -z "$joglbuilddir" -o -z "$wsdir" ] ; then
+ echo usage $0 jogl-builddir webstartdir
+ exit 1
+fi
+
+if [ ! -e $joglbuilddir ] ; then
+ echo $joglbuilddir does not exist
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+builddirbase=`basename $joglbuilddir`
+joglroot=`dirname $joglbuilddir`
+gluegenroot=$joglroot/../gluegen
+demosroot=$joglroot/../jogl-demos
+
+jnlpdir_gluegen=$gluegenroot/jnlp-files
+jnlpdir_jogl=$joglroot/jnlp-files
+jnlpdir_demos=$demosroot/jnlp-files
+
+if [ ! -e $jnlpdir_gluegen ] ; then
+ echo $jnlpdir_gluegen does not exist
+ exit 1
+fi
+
+if [ ! -e $jnlpdir_jogl ] ; then
+ echo $jnlpdir_jogl does not exist
+ exit 1
+fi
+
+if [ ! -e $jnlpdir_demos ] ; then
+ echo $jnlpdir_demos does not exist
+ exit 1
+fi
+
+cp -v $joglbuilddir/jar/*.jar $wsdir
+cp -v $demosroot/$builddirbase/*.jar $wsdir
+
diff --git a/deployment/deploy-jars_external-webstarttest.sh b/deployment/deploy-jars_external-webstarttest.sh
new file mode 100755
index 0000000..3fc1daa
--- /dev/null
+++ b/deployment/deploy-jars_external-webstarttest.sh
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+if [ ! -e scripts -o ! -e ../make ] ; then
+ echo start this script from JOGL/jogl/make
+ exit 1
+fi
+
+SOURCE=$1
+shift
+
+wsdir=$1
+shift
+
+if [ -z "$SOURCE" -o -z "$wsdir" ] ; then
+ echo usage $0 source webstartdir
+ echo source might be [email protected]:webstart/
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+echo scp -v $SOURCE*natives* $wsdir
+scp -v $SOURCE*natives* $wsdir
diff --git a/deployment/deploy-jnlp-webstarttest-filter.sh b/deployment/deploy-jnlp-webstarttest-filter.sh
new file mode 100755
index 0000000..77eda44
--- /dev/null
+++ b/deployment/deploy-jnlp-webstarttest-filter.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+wsdir=$1
+shift
+
+if [ -z "$wsdir" ] ; then
+ echo usage $0 webstartdir
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+cd $wsdir
+
+rm -rf orig-jnlp
+mkdir orig-jnlp
+
+for i in *.jnlp ; do
+ mv $i orig-jnlp
+ sed -e 's/<security>//g' -e 's/<\/security>//g' -e 's/<all-permissions\/>//g' orig-jnlp/$i > $i
+done
+
diff --git a/deployment/deploy-jnlp-webstarttest.sh b/deployment/deploy-jnlp-webstarttest.sh
new file mode 100755
index 0000000..8f3b0d2
--- /dev/null
+++ b/deployment/deploy-jnlp-webstarttest.sh
@@ -0,0 +1,79 @@
+#! /bin/sh
+
+url=$1
+shift
+
+joglbuilddir=$1
+shift
+
+wsdir=$1
+shift
+
+if [ -z "$url" -o -z "$joglbuilddir" -o -z "$wsdir" ] ; then
+ echo usage $0 codebase-url jogl-builddir webstartdir
+ echo Examples
+ echo sh $0 file:////usr/local/projects/JOGL/webstart ../build-x86_64 ../../webstart
+ echo sh $0 http://domain.org/jogl/webstart ../build-win32 ../../webstart
+ exit 1
+fi
+
+if [ ! -e $joglbuilddir ] ; then
+ echo $joglbuilddir does not exist
+ exit 1
+fi
+
+if [ ! -e $wsdir ] ; then
+ echo $wsdir does not exist
+ exit 1
+fi
+
+builddirbase=`basename $joglbuilddir`
+joglroot=`dirname $joglbuilddir`
+gluegenroot=$joglroot/../gluegen
+demosroot=$joglroot/../jogl-demos
+
+jnlpdir_gluegen=$gluegenroot/jnlp-files
+jnlpdir_jogl=$joglroot/jnlp-files
+jnlpdir_demos=$demosroot/jnlp-files
+
+if [ ! -e $jnlpdir_gluegen ] ; then
+ echo $jnlpdir_gluegen does not exist
+ exit 1
+fi
+
+if [ ! -e $jnlpdir_jogl ] ; then
+ echo $jnlpdir_jogl does not exist
+ exit 1
+fi
+
+if [ ! -e $jnlpdir_demos ] ; then
+ echo $jnlpdir_demos does not exist
+ exit 1
+fi
+
+cp -v $jnlpdir_demos/*.html $wsdir
+
+uri_esc=`echo $url | sed 's/\//\\\\\//g'`
+for j in $jnlpdir_gluegen/*.jnlp ; do
+ jb=`basename $j`
+ echo "processing $j to $wsdir/$jb"
+ sed "s/CODEBASE_TAG/$uri_esc/g" \
+ $j > $wsdir/$jb
+done
+
+for j in $jnlpdir_jogl/*.jnlp ; do
+ jb=`basename $j`
+ echo "processing $j to $wsdir/$jb"
+ sed -e "s/JOGL_CODEBASE_TAG/$uri_esc/g" \
+ -e "s/GLUEGEN_CODEBASE_TAG/$uri_esc/g" \
+ $j > $wsdir/$jb
+done
+
+for j in $jnlpdir_demos/*.jnlp ; do
+ jb=`basename $j`
+ echo "processing $j to $wsdir/$jb"
+ sed -e "s/DEMO_CODEBASE_TAG/$uri_esc/g" \
+ -e "s/JOGL_CODEBASE_TAG/$uri_esc/g" \
+ $j > $wsdir/$jb
+done
+