[Debian-islamic-commits] [SCM] Packaging for Zekr branch, master, updated. 0eeb7ec520be0621fd38861db9bedc1ccd24a91d

Mehdi Dogguy mehdi at debian.org
Sun Dec 27 22:22:09 UTC 2009


The following commit has been merged in the master branch:
commit 0eeb7ec520be0621fd38861db9bedc1ccd24a91d
Author: Mehdi Dogguy <mehdi at debian.org>
Date:   Sun Dec 27 23:20:01 2009 +0100

    Alternative code to detect xulrunner's location in zekr.sh

diff --git a/debian/changelog b/debian/changelog
index f8520a5..de0837e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,7 @@ zekr (0.7.5~beta2+dfsg-1~3.gbp16ee3d) UNRELEASED; urgency=low
   * A watch file has been added in 0.7.1-3~ppa5 (Closes: #561732).
   * All relations to ttf-bitstream-vera have been removed (Closes: #461299).
   * “msttcorefonts” is not suggested anymore (Closes: #490031).
+  * Alternative code to detect xulrunner's location in zekr.sh
 
  -- Mehdi Dogguy <mehdi at debian.org>  Sun, 27 Dec 2009 22:14:42 +0100
 
diff --git a/debian/zekr.sh b/debian/zekr.sh
index fb95621..bbbe8df 100644
--- a/debian/zekr.sh
+++ b/debian/zekr.sh
@@ -44,9 +44,6 @@ arg=$*
             zenity --warning \
               --title="ttf-me-quran is not installed." \
               --text="Uthman-Taha experimental theme cannot be used.\nInstall ttf-me-quran to enable Uthman-Taha theme."
-#            if [ "$MEQRN" -eq 0 ]; then
-#                firefox -new-window "www.zekr.org/meqrn"
-#            fi
  
         fi
         if [ "$MEQRN" -eq 0 ]; then
@@ -65,51 +62,6 @@ arg=$*
 
 fi
 
-#MOZILLA_FIVE_HOME=${MOZILLA_FIVE_HOME%*/}
-#if false && [ -n "$MOZILLA_FIVE_HOME" -a -e $MOZILLA_FIVE_HOME/libxpcom.so ]; then
-#   :
-#elif [ -e /usr/lib/xulrunner-1.9.0.3/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9.0.3
-#elif [ -e /usr/lib/firefox/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/firefox
-#elif [ -e /usr/lib/xulrunner/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner
-#elif [ -e /usr/lib/xulrunner-1.9/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9
-#elif [ -e /usr/lib/xulrunner-1.9b3/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9b3
-#elif [ -e /usr/lib/xulrunner-1.9b4/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9b4
-#elif [ -e /usr/lib/xulrunner-1.9b5/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9b5
-#elif [ -e /usr/lib/xulrunner-1.9b6/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9b6
-#elif [ -e /usr/lib/xulrunner-1.9b7/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9b7
-#elif [ -e /usr/lib/xulrunner-1.9b8/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9b8
-#elif [ -e /usr/lib/seamonkey/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/seamonkey/libxpcom.so
-#elif [ -e /usr/lib/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/libxpcom.so
-#elif [ -e /usr/lib/iceape/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/iceape
-#elif [ -e /usr/lib/mozilla-firefox/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
-#elif [ -e /usr/lib/mozilla/libxpcom.so ]; then
-#    export MOZILLA_FIVE_HOME=/usr/lib/mozilla
-#else
-#    echo "Integrated browser support not working"
-#    echo "This Zekr build doesn't have support for the integrated browser."
-#    echo "This is possibly a bug!"
-#    echo "Please report this incident via http://zekr.org/contact.html"
-#
-##    zenity --error \
-##        --title="Integrated browser support not working" \
-##        --text="This Zekr build doesn't have support for the integrated browser."
-##    [ $? -eq 0 ] || exit 1
-#fi
-
 # using eclipse's method for setting ZEKR_JAVA_HOME
 # If the user has not set ZEKR_JAVA_HOME, cycle through our list of compatible VM's
 # and pick the first one that exists.
@@ -144,13 +96,37 @@ if [ -n "${ZEKR_JAVA_HOME}" -a -z "${ZEKR_JAVA_CMD}" ]; then
     ZEKR_JAVA_CMD="$ZEKR_JAVA_HOME/bin/java"
 fi
 
-#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME
+# Detection of xulrunner
+XULRUNNER_PATH=""
+if [ -x /usr/bin/xulrunner ]; then
+    XULRUNNER_PATH=`xulrunner --find-gre $(xulrunner --gre-version 2>/dev/null) 2>/dev/null`
+    XULRUNNER_PATH=`dirname $XULRUNNER_PATH`
+else
+    for xulrunner in `ls -1 /usr/bin/xulrunner-* 2>/dev/null | sort -r`; do
+        XULRUNNER_PATH=`$xulrunner --find-gre $($xulrunner --gre-version 2>/dev/null) 2>/dev/null`
+        if [ ! -z "$XULRUNNER_PATH" -a -f "$XULRUNNER_PATH" ]; then
+            XULRUNNER_PATH=`dirname $XULRUNNER_PATH`
+            break
+        fi
+    done
+fi
+if [ -z "$XULRUNNER_PATH" ]; then
+    echo "Integrated browser support not working"
+    echo "This Zekr build doesn't have support for the integrated browser."
+    echo "This is possibly a bug!"
+    echo "Please report this incident via http://zekr.org/contact.html"
+
+    zenity --error \
+        --title="Integrated browser support not working" \
+        --text="This Zekr build doesn't have support for the integrated browser."
+    exit 1
+fi
 
 run () {
 MAIN_CLASS=net.sf.zekr.ZekrMain
 JRE_OPT=-Djava.library.path=/usr/lib/jni/
 CLASS_PATH=/usr/share/java/log4j-1.2.jar:/usr/share/java/swt.jar:/usr/share/java/commons-collections3.jar:/usr/share/java/commons-codec.jar:/usr/share/java/commons-configuration.jar:/usr/share/java/commons-lang.jar:/usr/share/java/commons-io.jar:/usr/share/java/commons-logging.jar:/usr/share/java/velocity.jar:/usr/share/java/lucene-highlighter.jar:/usr/share/java/lucene-core.jar:/usr/share/java/lucene-snowball.jar:/usr/share/java/jl.jar:/usr/share/java/basicplayer.jar:/usr/share/java/tritonus_share.jar:/usr/share/java/jorbis.jar:/usr/share/java/jogg.jar:/usr/share/java/jspeex.jar:/usr/share/java/mp3spi.jar:/usr/share/java/vorbisspi.jar:dist/zekr.jar:
-VM_ARGS="-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-$(xulrunner --gre-version) -Xms10m -Xmx80m"
+VM_ARGS="-Dorg.eclipse.swt.browser.XULRunnerPath=$XULRUNNER_PATH -Xms10m -Xmx80m"
 
 "$ZEKR_JAVA_CMD" $VM_ARGS -cp "$CLASS_PATH" $JRE_OPT $MAIN_CLASS $APP_ARGS $*
 }

-- 
Packaging for Zekr



More information about the Debian-islamic-commits mailing list