Merge commit 'v2.2' into diablo-package
authorSteven Luo <steven+maemo@steven676.net>
Mon, 14 Dec 2009 11:22:29 +0000 (03:22 -0800)
committerSteven Luo <steven+maemo@steven676.net>
Mon, 14 Dec 2009 11:22:29 +0000 (03:22 -0800)
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/postrm [new file with mode: 0644]
debian/preinst [new file with mode: 0644]
debian/rules [new file with mode: 0755]

diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..8d13bbf
--- /dev/null
@@ -0,0 +1,32 @@
+browser-proxy (2.1-1) extras-devel; urgency=low
+
+  * New "upstream" release.
+  * Upstream changes:
+    - I'm now the upstream maintainer.
+    - License is clarified (GPLv2+).
+    - Use a config file ($HOME/.config/browser-proxy) for settings, if it
+      exists.
+    - Add support for launching Fennec and Midori out of the box.
+    - Introduce a config option default_browser for selecting the default
+      browser.
+    - Add support for launching an arbitrary browser using the
+      other_browser_cmd config option.
+    - Run maemo-invoker directly instead of /usr/bin/browser to avoid a loop
+      when /usr/bin/browser is a wrapper invoking browser-proxy.
+    - Add a new, private D-Bus method for a /usr/bin/browser wrapper to use.
+  * Packaging changes:
+    - Ship a /usr/bin/browser wrapper script which ensures that launching
+      MicroB with /usr/bin/browser works when browser-proxy is installed.
+    - Update copyright to reflect licensing changes.
+    - Conflict with Mozilla's fennec-dbus-proxy (see Mozilla Bugzilla
+      #499904); both provide the com.nokia.osso_browser service and the two
+      probably shouldn't be co-installed.
+
+ -- Steven Luo <steven+maemo@steven676.net>  Wed, 09 Dec 2009 17:54:16 -0800
+
+browser-proxy (2.0-1) extras-devel; urgency=low
+
+  * Initial release. 
+
+ -- Steven Luo <steven+maemo@steven676.net>  Wed,  2 Dec 2009 17:56:24 -0800
+
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..ecf422d
--- /dev/null
@@ -0,0 +1,23 @@
+Source: browser-switchboard
+Section: user/network
+Priority: extra
+Maintainer: Steven Luo <steven+maemo@steven676.net>
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.7.2
+
+Package: browser-switchboard
+Architecture: all
+Depends: dbus, python2.5, python2.5-dbus, python2.5-gobject, tablet-browser-ui, ${misc:Depends}
+Recommends: tear | fennec | midori
+Provides: browser-proxy
+Replaces: browser-proxy
+Conflicts: browser-proxy, fennec-dbus-client
+Description: allows any web browser to be used as the default
+ Browser Switchboard is a program which allows you to choose
+ which browser to use as the default browser.  It supports
+ MicroB, Tear, Fennec/Mobile Firefox, and Midori out of the box,
+ and can easily be extended to support other browsers.  It can
+ also launch MicroB without having a large background process
+ (browserd) running at all times, saving memory when MicroB 
+ isn't in use.
+Homepage: http://browser-switch.garage.maemo.org/
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..0c55033
--- /dev/null
@@ -0,0 +1,33 @@
+This package was debianized by Steven Luo <steven+maemo@steven676.net> on
+Wed,  2 Dec 2009 17:56:24 -0800.
+
+It was downloaded from https://garage.maemo.org/frs/?group_id=1159 .
+
+Upstream Authors: Steven Luo, Jason Simpson
+
+Copyright:
+
+# Copyright (C) 2009 Jason Simpson
+# Copyright (C) 2009 Steven Luo
+
+License:
+
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# On Maemo systems, a copy of the GPL can be found in
+# /usr/share/common-licenses/GPL .
+
+The Debian packaging is copyright 2009 Steven Luo <steven+maemo@steven676.net>
+and is licensed under the GNU GPL, version 2 or later.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..69602ab
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/dbus-1/services
diff --git a/debian/postrm b/debian/postrm
new file mode 100644 (file)
index 0000000..72d9b3f
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+# postrm script for browser-switchboard
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+kill_old_proxies() {
+       # This would be so much nicer with pgrep/pkill ...
+       proxy_pids=`busybox ps | fgrep "python /usr/bin/browser-switchboard" | fgrep -v grep | awk '{ print $1 }'`
+       if [ ! -z "$proxy_pids" ]; then
+               kill $proxy_pids
+       fi
+}
+
+case "$1" in
+    remove)
+       dpkg-divert --remove --package browser-switchboard --rename \
+           --divert /usr/bin/browser.tablet-browser-ui \
+           /usr/bin/browser
+       dpkg-divert --remove --package browser-switchboard --rename \
+           --divert /usr/share/dbus-1/services/com.nokia.osso_browser.tablet-browser-ui \
+           /usr/share/dbus-1/services/com.nokia.osso_browser.service
+       # Try to make dbus-daemon pick up the change in services file
+       kill -HUP `pidof dbus-daemon`
+
+       # Kill off any running browser-switchboard to make sure that the
+       # default browser gets launched
+       kill_old_proxies
+       ;;
+    upgrade|disappear)
+       # Kill off any running browser-switchboard to make sure that the new
+       # version gets launched the next time a D-Bus request is made
+       kill_old_proxies
+       ;;
+    purge|failed-upgrade|abort-install|abort-upgrade)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/preinst b/debian/preinst
new file mode 100644 (file)
index 0000000..9194c2f
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+# preinst script for browser-switchboard
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+       dpkg-divert --add --package browser-switchboard --rename \
+           --divert /usr/share/dbus-1/services/com.nokia.osso_browser.tablet-browser-ui \
+           /usr/share/dbus-1/services/com.nokia.osso_browser.service
+       dpkg-divert --add --package browser-switchboard --rename \
+           --divert /usr/bin/browser.tablet-browser-ui \
+           /usr/bin/browser
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..f6d060c
--- /dev/null
@@ -0,0 +1,81 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+configure: configure-stamp
+configure-stamp:
+       touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+       dh_testdir
+
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into
+       # debian/browser-switchboard.
+       install -c -m 0755 browser-switchboard debian/browser-switchboard/usr/bin/browser-switchboard
+       install -c -m 0644 com.nokia.osso_browser.service debian/browser-switchboard/usr/share/dbus-1/services
+       install -c -m 0755 browser debian/browser-switchboard/usr/bin/browser
+
+
+binary-indep: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+       dh_installdocs
+       dh_installexamples
+#      dh_install
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+#      dh_installman
+#      dh_link
+#      dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_perl
+#      dh_makeshlibs
+       dh_installdeb
+#      dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary-arch: build install
+# arch: all package, nothing to do here
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure