[Lunar-commits] <moonbase> sun-jre: improved build

Zbigniew Luszpinski zbiggy at lunar-linux.org
Sun Jul 18 22:30:34 CEST 2010


commit 0f7c41af5a3b005d5bcbd73fa5a48dd86f5e349d
Author: Zbigniew Luszpinski <zbiggy at lunar-linux.org>
Date:   Sun Jul 18 22:30:34 2010 +0200

    sun-jre: improved build
---
 compilers/sun-jre/BUILD        |   20 +++++++++++----
 compilers/sun-jre/BUILD.x86_64 |   50 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 6 deletions(-)

diff --git a/compilers/sun-jre/BUILD b/compilers/sun-jre/BUILD
index 3f6105f..02bf033 100644
--- a/compilers/sun-jre/BUILD
+++ b/compilers/sun-jre/BUILD
@@ -6,6 +6,7 @@
   # Clean up old java 1.6.0 service packs
   rm -rf /usr/lib/j[rd][ek]1.6.0_* &&
   rm -rf /usr/java &&
+  rm -f /usr/lib/libjvm.so &&
   mkdir -p /usr/java &&
 
   prepare_install  &&
@@ -27,13 +28,20 @@
   mkdir -p /opt/lunar/plugins &&
   rm -f /opt/lunar/plugins/{libjavaplugin_oji.so,libnpjp2.so} &&
 
-  if [ $NEWPLUGIN == 'y' ]; then
+  # Always use new plugin.
+  # Firefox 3, Seamonkey 2, Google chrome/inium use it
+  # KDE3/4 Konqueror and Opera always use Java directly so do not use any plugin
+  # if [ $NEWPLUGIN == 'y' ]; then
   ln -sf /usr/java/latest/lib/i386/libnpjp2.so \
-         /opt/lunar/plugins/
-  else
-  ln -sf /usr/java/latest/plugin/i386/ns7/libjavaplugin_oji.so \
-         /opt/lunar/plugins/
-  fi &&
+         /opt/lunar/plugins/ &&
+  # else
+  # We do not have firefox 1/2 or Seamonkey 1 anymore so no browser uses old plugin
+  # ln -sf /usr/java/latest/plugin/i386/ns7/libjavaplugin_oji.so \
+  #       /opt/lunar/plugins/
+  # fi &&
+
+  # This didn't get created, dead link. Do it this way.
+  ln -sf /usr/java/latest/lib/i386/server/libjvm.so /usr/lib/libjvm.so &&
 
   echo export JAVA_HOME=\"/usr/java/latest\" >> $SOURCE_DIRECTORY/sun-jre.rc &&
   echo export PATH=\"'$PATH':'$JAVA_HOME'/bin\" >> $SOURCE_DIRECTORY/sun-jre.rc &&
diff --git a/compilers/sun-jre/BUILD.x86_64 b/compilers/sun-jre/BUILD.x86_64
new file mode 100644
index 0000000..4eb314e
--- /dev/null
+++ b/compilers/sun-jre/BUILD.x86_64
@@ -0,0 +1,50 @@
+(
+
+  chmod +x $SOURCE &&
+  echo "yes" | MORE="20000000" ./$SOURCE &&
+
+  # Clean up old java 1.6.0 service packs
+  rm -rf /usr/lib/j[rd][ek]1.6.0_* &&
+  rm -rf /usr/java &&
+  rm -f /usr/lib/libjvm.so &&
+  mkdir -p /usr/java &&
+
+  prepare_install  &&
+
+  # This is default and recommended installation place for Java from Sun
+  cp -r $SOURCE_DIRECTORY/jre${FVERSION} /usr/java &&
+  # Sun's recommended symlinks:
+  # This one _always_ points on latest Java release
+  ln -sf /usr/java/jre${FVERSION} /usr/java/latest &&
+  # This one _always_ points on default Java.
+  # If not set manually by root it defaults to /usr/java/latest:
+  if [ ! -h /usr/java/default ]; then
+     ln -sf /usr/java/latest /usr/java/default
+  fi &&
+
+  # Some apps only search for java in /usr/lib
+  ln -sf /usr/java/jre${FVERSION} /usr/lib/jre${FVERSION} &&
+
+  mkdir -p /opt/lunar/plugins &&
+  rm -f /opt/lunar/plugins/{libjavaplugin_oji.so,libnpjp2.so} &&
+
+  # Always use new plugin.
+  # Firefox 3, Seamonkey 2, Google chrome/inium use it
+  # KDE3/4 Konqueror and Opera always use Java directly so do not use any plugin
+  # if [ $NEWPLUGIN == 'y' ]; then
+  ln -sf /usr/java/latest/lib/amd64/libnpjp2.so \
+         /opt/lunar/plugins/ &&
+  # else
+  # We do not have firefox 1/2 or Seamonkey 1 anymore so no browser uses old plugin
+  # ln -sf /usr/java/latest/plugin/amd64/ns7/libjavaplugin_oji.so \
+  #       /opt/lunar/plugins/
+  # fi &&
+
+  # This didn't get created, dead link. Do it this way.
+  ln -sf /usr/java/latest/lib/amd64/server/libjvm.so /usr/lib/libjvm.so &&
+
+  echo export JAVA_HOME=\"/usr/java/latest\" >> $SOURCE_DIRECTORY/sun-jre.rc &&
+  echo export PATH=\"'$PATH':'$JAVA_HOME'/bin\" >> $SOURCE_DIRECTORY/sun-jre.rc &&
+  install -m644 $SOURCE_DIRECTORY/sun-jre.rc /etc/profile.d/
+
+) > $C_FIFO 2>&1


More information about the Lunar-commits mailing list