From: Steven Luo Date: Fri, 11 Dec 2009 00:33:31 +0000 (-0800) Subject: Initial commit of the Debian packaging for Diablo. X-Git-Tag: diablo-package-2.2-1~9 X-Git-Url: http://git.maemo.org/git/?p=browser-switch;a=commitdiff_plain;h=10bb9f19ad2ce6a5d3de98479de2a909481b1d84 Initial commit of the Debian packaging for Diablo. --- diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8d13bbf --- /dev/null +++ b/debian/changelog @@ -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 Wed, 09 Dec 2009 17:54:16 -0800 + +browser-proxy (2.0-1) extras-devel; urgency=low + + * Initial release. + + -- Steven Luo Wed, 2 Dec 2009 17:56:24 -0800 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..3f5b1a5 --- /dev/null +++ b/debian/control @@ -0,0 +1,23 @@ +Source: browser-proxy +Section: user/network +Priority: extra +Maintainer: Steven Luo +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: browser-proxy +Architecture: all +Depends: dbus, python2.5, python2.5-dbus, python2.5-gobject, tear, ${misc:Depends} +Conflicts: fennec-dbus-client +Description: allows any web browser to be used as the default + browser-proxy is a script which implements the osso-browser + D-Bus interface used by Maemo applications to launch a + browser. It can be used to make a browser other than MicroB + (e.g. Tear) the default browser. It can also launch MicroB + without having a large background process (browserd) running at + all times, saving memory when MicroB isn't in use. + . + browser-proxy currently supports launching Tear, MicroB, Fennec + (Mobile Firefox), and Midori, and can easily be extended to + support other browsers. +Homepage: http://browser-switch.garage.maemo.org/ diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..d24c7d4 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,33 @@ +This package was debianized by Steven Luo on +Wed, 2 Dec 2009 17:56:24 -0800. + +It was downloaded from http://xio.com/maemo/browser-proxy.txt. + +Upstream Authors: Steven Luo, xiojason of talk.maemo.org + +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 +and is licensed under the GNU GPL, version 2 or later. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..69602ab --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/dbus-1/services diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..18b7f8a --- /dev/null +++ b/debian/postrm @@ -0,0 +1,65 @@ +#!/bin/sh +# postrm script for browser-proxy +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# 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-proxy" | fgrep -v grep | awk '{ print $1 }'` + if [ ! -z "$proxy_pids" ]; then + kill $proxy_pids + fi +} + +case "$1" in + remove) + dpkg-divert --remove --package browser-proxy --rename \ + --divert /usr/bin/browser.tablet-browser-ui \ + /usr/bin/browser + dpkg-divert --remove --package browser-proxy --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-proxy to make sure that the default + # browser gets launched + kill_old_proxies + ;; + upgrade|disappear) + # Kill off any running browser-proxy 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 index 0000000..1d3171d --- /dev/null +++ b/debian/preinst @@ -0,0 +1,43 @@ +#!/bin/sh +# preinst script for browser-proxy +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# 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-proxy --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-proxy --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 index 0000000..82a69bf --- /dev/null +++ b/debian/rules @@ -0,0 +1,80 @@ +#!/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-proxy. + install -c -m 0755 browser-proxy debian/browser-proxy/usr/bin/browser-proxy + install -c -m 0644 com.nokia.osso_browser.service debian/browser-proxy/usr/share/dbus-1/services + install -c -m 0755 browser debian/browser-proxy/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