From e6faed1dbbc896ca2023e9b793348be3e452975d Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Sun, 10 Jan 2010 17:46:58 +0100 Subject: [PATCH] Make Debian package working on Ubuntu again. Debian supports symbolic links to xulrunner-stub which eases packaging a lot. Copying or hardlinking files from other packages is just dumb. But Ubuntu ships xulrunner without this feature so the previous debian/conkeror.bin didn't work on Ubuntu. This commit effectively reverts the commits db67ee42bfab73c1699a0303717fdc93e0731f01, 6475fd23bcd85d598b2f7b1a6800515c73b131c8 and f3e019855871300c1799f47d1174df03be48456e. Mike Hommey, I'm sorry to abandon the work you did to help me making use of the symlinking feature. Alexander Sack, thanks for confirming that Ubuntu doesn't have the symlinking feature. --- debian/changelog | 3 +++ debian/conkeror.bin | 62 ++++++++++++++++++++++++++++++++--------------------- debian/rules | 5 ----- 3 files changed, 41 insertions(+), 29 deletions(-) rewrite debian/conkeror.bin (66%) mode change 100755 => 100644 diff --git a/debian/changelog b/debian/changelog index 53589d5..1f62632 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ conkeror (0.9.1+git100110-1) unstable; urgency=low * New upstream snapshot + * Make package working on Ubuntu again by reverting debian/conkeror.bin + to not using xulrunner-stub symbolic links anymore since Ubuntu doesn't + support this feature. Meh. * Fix new Lintian 2.3.x warnings: - debhelper-but-no-misc-depends - obsolete-relation-form-in-source diff --git a/debian/conkeror.bin b/debian/conkeror.bin old mode 100755 new mode 100644 dissimilarity index 66% index 764363f..d839dca --- a/debian/conkeror.bin +++ b/debian/conkeror.bin @@ -1,24 +1,38 @@ -#!/bin/sh -# Wrapper around xulrunner-stub to start the xulrunner application conkeror -# Written by Axel Beckert for the Debian Project - -# Find an appropriate xulrunner-stub binary -XULRUNNER='' -for xr in /usr/share/conkeror/xulrunner-stub*; do - XRTMP=`readlink -m $xr` - if [ -n "$XRTMP" -a -x "$XRTMP" ]; then - XULRUNNER=$xr - fi -done - -if [ -z "$XULRUNNER" ]; then - echo "No xulrunner found. (Unsatisfied package dependencies?) Bailing out." 1>&2 - exit 1; -fi - -if [ "$*" = "--help" ]; then - errormsg="`exec $XULRUNNER \"$@\" 2>&1`" - echo "$errormsg" | sed -e "s:/[^ ]*/xulrunner-stub[^ ]*:$0:; /-\(width\|height\)/d" 1>&2 -else - exec $XULRUNNER "$@" -fi +#!/bin/sh +# Wrapper around xulrunner to start the xulrunner application conkeror +# Written by Axel Beckert for the Debian Project + +# Find an appropriate xulrunner binary +XULRUNNER='' +for xr in xulrunner-1.9 xulrunner xulrunner-1.9.1; do + XRTMP=`which $xr` + if [ -n "$XRTMP" -a -x "$XRTMP" ]; then + if expr `$XRTMP --gre-version | cut -d . -f 1,2` '>=' 1.9 > /dev/null; then + # xulrunner is version 1.9 or higher, take it + XULRUNNER=$XRTMP + break + else + # xulrunner is older than version 1.9, forget it + XRTMP=/usr/lib/$xr/xulrunner + if [ -x $XRTMP ]; then + if expr `$XRTMP --gre-version | cut -d . -f 1,2` '>=' 1.9 > /dev/null; then + # xulrunner is a 1.9 version, take it + XULRUNNER=$XRTMP + break + fi + fi + fi + fi +done + +if [ -z "$XULRUNNER" ]; then + echo "xulrunner version 1.9 required, but not found. Bailing out." 1>&2 + exit 1; +fi + +if [ "$*" = "--help" ]; then + errormsg="`exec $XULRUNNER /usr/share/conkeror/application.ini \"$@\" 2>&1`" + echo "$errormsg" | sed -e "s:/[^ ]*/xulrunner-bin:$0:; /-\(width\|height\)/d" 1>&2 +else + exec $XULRUNNER /usr/share/conkeror/application.ini "$@" +fi diff --git a/debian/rules b/debian/rules index 6d12993..eef8752 100755 --- a/debian/rules +++ b/debian/rules @@ -70,11 +70,6 @@ install-indep: > $(CURDIR)/debian/conkeror/usr/share/conkeror/components/application.js cp -p debian/conkeror.bin $(CURDIR)/debian/conkeror/usr/bin/conkeror cp -p debian/conkeror.desktop $(CURDIR)/debian/conkeror/usr/share/applications/ - # Supporting all currently known places of xulrunner-stub on - # debianoid systems - ln -vs ../../lib/xulrunner/xulrunner-stub $(CURDIR)/debian/conkeror/usr/share/conkeror/xulrunner-stub - ln -vs ../../lib/xulrunner-1.9/xulrunner-stub $(CURDIR)/debian/conkeror/usr/share/conkeror/xulrunner-stub-1.9 - ln -vs ../../lib/xulrunner-1.9.1/xulrunner-stub $(CURDIR)/debian/conkeror/usr/share/conkeror/xulrunner-stub-1.9.1 dh_install -i -- 2.11.4.GIT