--- moblin-panel-internet-3.5.3.0.orig/debian/prerm
+++ moblin-panel-internet-3.5.3.0/debian/prerm
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then
+    update-alternatives --remove moblin-panel-internet /usr/lib/moblin-panel-internet/moblin-panel-internet.ff
+fi
+
+##DEBHELPER##
--- moblin-panel-internet-3.5.3.0.orig/debian/changelog
+++ moblin-panel-internet-3.5.3.0/debian/changelog
@@ -0,0 +1,5 @@
+moblin-panel-internet (3.5.3.0-0ubuntu0moblin1) karmic; urgency=low
+
+  * Initial Release
+
+ -- Michael Terry <michael.terry@canonical.com>  Tue, 27 Oct 2009 10:33:20 +0100
--- moblin-panel-internet-3.5.3.0.orig/debian/control
+++ moblin-panel-internet-3.5.3.0/debian/control
@@ -0,0 +1,22 @@
+Source: moblin-panel-internet
+Section: web
+Priority: optional
+Maintainer: OEM Custom Solutions Engineering Group <solutions-group@lists.canonical.com>
+Build-Depends: debhelper (>= 7.0.50),
+               quilt,
+               zip,
+               libmhs-dev,
+               libnbtk-dev,
+               clutter-mozembed-dev,
+               libgtk2.0-dev,
+               libmoblin-panel-dev,
+               libclutter-1.0-dev,
+               gnome-common
+Standards-Version: 3.8.3
+Homepage: http://www.moblin.org/
+
+Package: moblin-panel-internet
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, moblin-internet-browser
+Description: The Moblin Web Browsing panel
+ The Moblin Web Browsing panel.
--- moblin-panel-internet-3.5.3.0.orig/debian/compat
+++ moblin-panel-internet-3.5.3.0/debian/compat
@@ -0,0 +1 @@
+7
--- moblin-panel-internet-3.5.3.0.orig/debian/install
+++ moblin-panel-internet-3.5.3.0/debian/install
@@ -0,0 +1,3 @@
+/usr/lib/moblin-panel-internet/moblin-panel-internet.ff
+/usr/share/dbus-1/services/org.moblin.UX.Shell.Panels.internet.service.ff
+/usr/share/moblin-web-browser/netpanel
--- moblin-panel-internet-3.5.3.0.orig/debian/copyright
+++ moblin-panel-internet-3.5.3.0/debian/copyright
@@ -0,0 +1,29 @@
+This package was debianized by Michael Terry <michael.terry@canonical.com> on
+Tue, 27 Oct 2009 10:33:20 +0100
+
+It was downloaded from:
+http://www.moblin.org/
+
+Copyright:
+
+   © 2009 Intel
+
+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., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
--- moblin-panel-internet-3.5.3.0.orig/debian/README.source
+++ moblin-panel-internet-3.5.3.0/debian/README.source
@@ -0,0 +1,57 @@
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To configure quilt to use debian/patches instead of patches, you want
+either to export QUILT_PATCHES=debian/patches in your environment
+or use this snippet in your ~/.quiltrc:
+
+    for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
+        if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
+                export QUILT_PATCHES=debian/patches
+        fi
+    done
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+    quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+    quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches.  Then, for every file that will be modified by this patch,
+run:
+
+    quilt add <file>
+
+before editing those files.  You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly.  After editing the files, run:
+
+    quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+    quilt import -P <patch> /path/to/patch
+    quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches.  The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+    quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.
--- moblin-panel-internet-3.5.3.0.orig/debian/rules
+++ moblin-panel-internet-3.5.3.0/debian/rules
@@ -0,0 +1,15 @@
+#!/usr/bin/make -f
+%:
+	dh --with quilt $@
+
+override_dh_auto_configure:
+	NOCONFIGURE=1 ./autogen.sh
+	dh_auto_configure -- --disable-browser --enable-netpanel-for-mwb3
+
+override_dh_auto_test:
+	# Skip, due to errors about patched .pc files not in POTFILES.in
+
+override_dh_auto_install:
+	dh_auto_install -Pdebian/tmp
+	mv debian/tmp/usr/lib/moblin-panel-internet/moblin-panel-internet debian/tmp/usr/lib/moblin-panel-internet/moblin-panel-internet.ff
+	mv debian/tmp/usr/share/dbus-1/services/org.moblin.UX.Shell.Panels.internet.service debian/tmp/usr/share/dbus-1/services/org.moblin.UX.Shell.Panels.internet.service.ff
--- moblin-panel-internet-3.5.3.0.orig/debian/postinst
+++ moblin-panel-internet-3.5.3.0/debian/postinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
+	update-alternatives --install /usr/lib/moblin-panel-internet/moblin-panel-internet \
+		moblin-panel-internet /usr/lib/moblin-panel-internet/moblin-panel-internet.ff 1000 \
+		--slave /usr/share/dbus-1/services/org.moblin.UX.Shell.Panels.internet.service \
+		org.moblin.UX.Shell.Panels.internet.service /usr/share/dbus-1/services/org.moblin.UX.Shell.Panels.internet.service.ff
+fi
+
+##DEBHELPER##
--- moblin-panel-internet-3.5.3.0.orig/debian/patches/series
+++ moblin-panel-internet-3.5.3.0/debian/patches/series
@@ -0,0 +1,2 @@
+netpanel-to-support-mwb3.patch
+change-moz-dir.patch
--- moblin-panel-internet-3.5.3.0.orig/debian/patches/netpanel-to-support-mwb3.patch
+++ moblin-panel-internet-3.5.3.0/debian/patches/netpanel-to-support-mwb3.patch
@@ -0,0 +1,87 @@
+ Patch to integate netpanel with MWB3/Firefox. 
+
+ To build netpanel for mwb3, add the following configuration opitons:
+ --enable-netpanel-for-mwb3 --disable-browser
+
+ configure.ac                       |    8 ++++++++
+ netpanel/moblin-netbook-netpanel.c |   26 +++++++++++++++++++++++---
+ 2 files changed, 31 insertions(+), 3 deletions(-)
+
+Index: moblin-panel-internet-3.5.3.0/configure.ac
+===================================================================
+--- moblin-panel-internet-3.5.3.0.orig/configure.ac	2009-10-14 23:03:10.000000000 +0200
++++ moblin-panel-internet-3.5.3.0/configure.ac	2009-10-27 10:43:58.000000000 +0100
+@@ -41,6 +41,14 @@
+                         build_netpanel=yes)
+ AM_CONDITIONAL([BUILD_NETPANEL], [test "x$build_netpanel" = xyes])
+ 
++AC_ARG_ENABLE(netpanel-for-mwb3,[Build the netpanel application for moblin-web-browser-3],
++                        build_netpanel_for_mwb3="$enableval",
++                        build_netpanel_for_mwb3=yes)
++AM_CONDITIONAL([BUILD_NETPANEL], [test "x$build_netpanel_for_mwb3" = xyes])
++if test "x$build_netpanel_for_mwb3" = "xyes"; then
++AC_DEFINE([NETPANEL_FOR_MWB3], [], [Enables mwb3 support for netpanel])
++fi
++
+ dnl Add additional rules to po/Makefile to extract the strings from the
+ dnl Javascript sources
+ AC_CONFIG_COMMANDS_PRE([
+Index: moblin-panel-internet-3.5.3.0/netpanel/moblin-netbook-netpanel.c
+===================================================================
+--- moblin-panel-internet-3.5.3.0.orig/netpanel/moblin-netbook-netpanel.c	2009-10-14 23:03:10.000000000 +0200
++++ moblin-panel-internet-3.5.3.0/netpanel/moblin-netbook-netpanel.c	2009-10-27 10:43:58.000000000 +0100
+@@ -18,6 +18,10 @@
+  * 02111-1307, USA.
+  */
+ 
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include <dbus/dbus-glib.h>
+ #include <clutter-mozembed/clutter-mozembed.h>
+ #include <mhs/mhs.h>
+@@ -509,8 +513,13 @@
+       remaining = ptr + 1;
+     }
+ 
+-  exec = g_strdup_printf ("%s %s \"%s%s\"", "moblin-web-browser",
++  exec = g_strdup_printf ("%s %s \"%s%s\"", 
++                          "moblin-web-browser", 
++#if defined(NETPANEL_FOR_MWB3)
++                          "",
++#else
+                           user_initiated ? "-I" : "",
++#endif
+                           prefix, remaining);
+   g_free (prefix);
+ 
+@@ -826,7 +835,13 @@
+   int i;
+   MoblinNetbookNetpanelPrivate *priv = self->priv;
+ 
+-  session_file = g_build_filename (g_get_home_dir (), ".moblin-web-browser",
++  session_file = g_build_filename (g_get_home_dir (), 
++#if defined(NETPANEL_FOR_MWB3)
++                                   // hardcoded because it is so in Firefox/MWB3
++                                   ".mozilla/moblin-web-browser",
++#else
++                                   ".moblin-web-browser",
++#endif
+                                    "session", NULL);
+ 
+   if (!g_file_test (session_file, G_FILE_TEST_EXISTS))
+@@ -869,7 +884,12 @@
+               url = g_strdup (START_PAGE);
+             }
+ 
+-          button = add_thumbnail_to_scrollview (scrollview, url, title);
++          gchar *prev_url = g_strdup(url);
++          gchar *delim = g_strrstr(prev_url, "###");
++          if (delim)
++              *delim = '\0';
++          button = add_thumbnail_to_scrollview (scrollview, prev_url, title);
++          g_free(prev_url);
+ 
+           g_object_set_data (G_OBJECT (button), "url", url);
+           g_signal_connect (button, "clicked",
--- moblin-panel-internet-3.5.3.0.orig/debian/patches/change-moz-dir.patch
+++ moblin-panel-internet-3.5.3.0/debian/patches/change-moz-dir.patch
@@ -0,0 +1,13 @@
+Index: moblin-panel-internet-3.5.3.0/netpanel/moblin-netbook-netpanel.c
+===================================================================
+--- moblin-panel-internet-3.5.3.0.orig/netpanel/moblin-netbook-netpanel.c	2009-10-27 10:44:32.000000000 +0100
++++ moblin-panel-internet-3.5.3.0/netpanel/moblin-netbook-netpanel.c	2009-10-27 10:44:46.000000000 +0100
+@@ -838,7 +838,7 @@
+   session_file = g_build_filename (g_get_home_dir (), 
+ #if defined(NETPANEL_FOR_MWB3)
+                                    // hardcoded because it is so in Firefox/MWB3
+-                                   ".mozilla/moblin-web-browser",
++                                   ".mozilla/moblin-internet-browser",
+ #else
+                                    ".moblin-web-browser",
+ #endif
