tags 495514 +patch
thanks

patch is attatched.

note: while I have written a changlog entry explaining the changes I am not a dd so I cannot upload the package
diff -ur azureus-3.1.1.0/debian/bin/azureus azureus-3.1.1.0.new/debian/bin/azureus
--- azureus-3.1.1.0/debian/bin/azureus	2008-08-19 00:02:34.000000000 +0100
+++ azureus-3.1.1.0.new/debian/bin/azureus	2008-08-18 23:50:17.000000000 +0100
@@ -1,5 +1,85 @@
-#!/bin/sh
-JAVA='java -Xmx1024M'
+#!/bin/bash
+JAVA=`readlink /etc/alternatives/java`
+JAVA_HOME="${JAVA_HOME:="${JAVA%/*/*/*}"}"
+echo "$JAVA_HOME"
+
+
+#we need to check the JRE exists, is sun based and is not headless
+#checking for $JAVA_HOME/jre/bin/policytool will kill all theese birds with 
+#one stone
+
+ACCEPTABLE=1
+
+if [[ -e "$JAVA_HOME/jre/bin/policytool"  ]] 
+then
+  echo this jre passed the installed/sun based/not headless test
+else
+  ACCEPTABLE=0
+  echo this jre failed the installed/sun based/not headless test
+fi
+
+ARCH=`dpkg --print-installation-architecture`
+#32 bit jre's on amd64 installations will fail to load SWT
+if [[ ARCH -eq amd64 ]]
+then
+  if objdump -f $JAVA_HOME/jre/bin/java | grep elf32-i386 >/dev/null
+  then
+    echo this jre failed the amd64 system needs 64 bit jre for swt to load test
+    ACCEPTABLE=0;
+  else
+    echo this jre passed the amd64 system needs 64 bit jre for swt to load test
+  fi
+  
+fi
+
+if [[ $ACCEPTABLE -eq 0 ]]
+then
+  if [[ -e /usr/lib/jvm/java-6-openjdk/jre/bin/policytool ]]
+  then
+    JAVA_HOME=/usr/lib/jvm/java-6-openjdk
+    ACCEPTABLE=1
+  fi
+fi
+
+if [[ $ACCEPTABLE -eq 0 ]]
+then
+  if [[ -e /usr/lib/jvm/java-6-cacao/jre/bin/policytool ]]
+  then
+    JAVA_HOME=/usr/lib/jvm/java-6-cacao
+    ACCEPTABLE=1
+  fi
+fi
+
+if [[ $ACCEPTABLE -eq 0 ]]
+then
+  if [[ -e /usr/lib/jvm/java-6-sun/jre/bin/policytool ]]
+  then
+    JAVA_HOME=/usr/lib/jvm/java-6-sun
+    ACCEPTABLE=1
+  fi
+fi
+
+if [[ $ACCEPTABLE -eq 0 ]]
+then
+  if [[ -e /usr/lib/jvm/java-1.5.0-sun/jre/bin/policytool ]]
+  then
+    JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
+    ACCEPTABLE=1
+  fi
+fi
+
+
+if [[ $ACCEPTABLE -eq 0 ]]
+then
+  echo no acceptable jre could be found, this should never happen unless
+  echo dependencies are broken
+  exit 1
+fi
+
+echo $JAVA_HOME
+
+export JAVA_HOME
+JAVA="$JAVA_HOME/jre/bin/java -Xmx1024M"
 . /usr/share/java-config/libswt-3.4-java
 exec $JAVA -Djava.library.path=/usr/lib/jni:/usr/lib \
 	-classpath /usr/share/java/Azureus2.jar:$JARS \
diff -ur azureus-3.1.1.0/debian/changelog azureus-3.1.1.0.new/debian/changelog
--- azureus-3.1.1.0/debian/changelog	2008-08-19 00:02:34.000000000 +0100
+++ azureus-3.1.1.0.new/debian/changelog	2008-08-18 23:43:05.000000000 +0100
@@ -1,3 +1,13 @@
+azureus (3.1.1.0-3.1) unreleased; urgency=medium
+
+  * fixups to stop azureus using gcj (which it doesn't work with) 
+    * don't bother generating a package with useless gij native code
+    * make startup script select a suitable runtime
+    * change depdencies
+    * Closes: 495514
+
+ -- Peter Green <[EMAIL PROTECTED]>  Mon, 18 Aug 2008 23:33:00 -0100
+
 azureus (3.1.1.0-3) unstable; urgency=medium
 
   * Remove the four non-latin characters in DateParserRegex.java.
diff -ur azureus-3.1.1.0/debian/control azureus-3.1.1.0.new/debian/control
--- azureus-3.1.1.0/debian/control	2008-08-19 00:02:34.000000000 +0100
+++ azureus-3.1.1.0.new/debian/control	2008-08-18 23:32:27.000000000 +0100
@@ -9,8 +9,7 @@
 
 Package: azureus
 Architecture: all
-Depends: java-gcj-compat | java-virtual-machine,
- java-gcj-compat | java2-runtime, libcommons-cli-java,
+Depends: openjdk-6-jre | cacao-oj6-jre | sun-java6-jre | sun-java5-jre, binutils, libcommons-cli-java,
  liblog4j1.2-java, libswt-gtk-3.4-java
 Suggests: vuze, azureus-gcj
 Description: BitTorrent client
@@ -21,13 +20,6 @@
  access to numerous pieces of information about your torrents. Azureus
  now features an embedded tracker easily set up and ready to use.
 
-Package: azureus-gcj
-Architecture: any
-Depends: azureus (>= ${source:Version}), azureus (<< ${source:Version}.1~),
- ${misc:Depends}, ${shlibs:Depends}
-Description: native binary of Azureus
- This package contains a native binary of Azureus built using GCJ.
-
 Package: vuze
 Architecture: all
 Depends: azureus, libswt-cairo-gtk-3.4-jni, libswt-gnome-gtk-3.4-jni,
diff -ur azureus-3.1.1.0/debian/rules azureus-3.1.1.0.new/debian/rules
--- azureus-3.1.1.0/debian/rules	2008-08-19 00:02:34.000000000 +0100
+++ azureus-3.1.1.0.new/debian/rules	2008-08-18 22:47:48.000000000 +0100
@@ -40,7 +40,9 @@
 
 include /usr/share/gcj/debian_defaults
 
-binary-arch: build
+binary-arch:
+
+binary-arch-old: build
 	dh_clean -k 
 	dh_install -a
 	dh_installchangelogs -a

Reply via email to