Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/Extensions/Install.py
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/Extensions/Install.py	(revision 2639)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/Extensions/Install.py	(revision 2639)
@@ -0,0 +1,17 @@
+import logging
+from Products.CMFCore.utils import getToolByName
+
+logger = logging.getLogger('quintagroup.blog.star')
+
+def uninstall(portal, reinstall=False):
+    """ Uninstall this product.
+
+        This external method is need, because portal_quickinstaller doens't know
+        what GenericProfile profile to apply when uninstalling a product.
+    """
+    setup_tool = getToolByName(portal, 'portal_setup')
+    if reinstall:
+        return "Ran all reinstall steps."
+    else:
+        setup_tool.runAllImportStepsFromProfile('profile-quintagroup.blog.star:uninstall')
+        return "Ran all uninstall steps."
Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/browser/__init__.py
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/browser/__init__.py	(revision 2639)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/browser/__init__.py	(revision 2639)
@@ -0,0 +1,1 @@
+#
Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/browser/configure.zcml
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/browser/configure.zcml	(revision 2639)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/browser/configure.zcml	(revision 2639)
@@ -0,0 +1,5 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    i18n_domain="quintagroup.blog.star">
+
+</configure>
Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/browser/interfaces.py
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/browser/interfaces.py	(revision 2639)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/browser/interfaces.py	(revision 2639)
@@ -0,0 +1,5 @@
+from plone.theme.interfaces import IDefaultPloneLayer
+
+class IThemeSpecific(IDefaultPloneLayer):
+    """Marker interface that defines a Zope 3 browser layer.
+    """
Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/configure.zcml
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/configure.zcml	(revision 2638)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/configure.zcml	(revision 2639)
@@ -2,7 +2,28 @@
     xmlns="http://namespaces.zope.org/zope"
     xmlns:five="http://namespaces.zope.org/five"
+    xmlns:genericsetup="http://namespaces.zope.org/genericsetup" 
     i18n_domain="quintagroup.blog.star">
+
+  <include package="collective.blog.star" />
 
   <five:registerPackage package="." initialize=".initialize" />
 
+  <include package=".browser" />
+
+  <genericsetup:registerProfile
+     name="default"
+     title="Quintagroup blog.star customization"
+     directory="profiles/default"
+     description="Generic setup for Quintagroup blogging"
+     provides="Products.GenericSetup.interfaces.EXTENSION"
+     />
+
+  <genericsetup:registerProfile
+     name="uninstall"
+     title="Uninstall Quintagroup blog.star customization"
+     directory="profiles/uninstall"
+     description="Uninstall Quintagroup blogging"
+     provides="Products.GenericSetup.interfaces.EXTENSION"
+     />
+
 </configure>
Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/default/browserlayer.xml
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/default/browserlayer.xml	(revision 2639)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/default/browserlayer.xml	(revision 2639)
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<layers>
+   <layer name="quintagroup.blog.star"
+          interface="quintagroup.blog.star.browser.interfaces.IQBlogStarLayer"/>
+</layers>
Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/default/metadata.xml
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/default/metadata.xml	(revision 2639)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/default/metadata.xml	(revision 2639)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<metadata>
+  <version>0.1</version>
+</metadata>
Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/uninstall/import_steps.xml
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/uninstall/import_steps.xml	(revision 2639)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/uninstall/import_steps.xml	(revision 2639)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<import-steps>
+ <import-step id="uninstall_quintagroup_blog_star" version="20100708-01"
+              handler="quintagroup.blog.star.setuphandlers.uninstall"
+              title="Uninstall Quintagroup blog.star customizations">
+  Uninstall Quintagroup blog.star customizations
+ </import-step>
+</import-steps>
Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/uninstall/metadata.xml
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/uninstall/metadata.xml	(revision 2639)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/uninstall/metadata.xml	(revision 2639)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<metadata>
+  <version>0.1</version>
+</metadata>
Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/uninstall/quintagroup.blog.star_uninstall.txt
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/uninstall/quintagroup.blog.star_uninstall.txt	(revision 2639)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/profiles/uninstall/quintagroup.blog.star_uninstall.txt	(revision 2639)
@@ -0,0 +1,1 @@
+#
Index: /quintagroup.blog.star/trunk/quintagroup/blog/star/setuphandlers.py
===================================================================
--- /quintagroup.blog.star/trunk/quintagroup/blog/star/setuphandlers.py	(revision 2639)
+++ /quintagroup.blog.star/trunk/quintagroup/blog/star/setuphandlers.py	(revision 2639)
@@ -0,0 +1,28 @@
+import logging
+
+from zope.component import getSiteManager
+from plone.browserlayer.utils import unregister_layer
+from plone.browserlayer.interfaces import ILocalBrowserLayerType
+
+from Products.CMFCore.utils import getToolByName
+
+logger = logging.getLogger('quintagroup.blog.star')
+
+def removeBrowserLayer(site):
+    """ Remove browser layer.
+    """
+    name="quintagroup.blog.star"
+    site = getSiteManager(site)
+    registeredLayers = [r.name for r in site.registeredUtilities()
+                        if r.provided == ILocalBrowserLayerType]
+    if name in registeredLayers:
+        unregister_layer(name, site_manager=site)
+        logger.log(logging.INFO, "Unregistered \"%s\" browser layer." % name)
+
+def uninstall(context):
+    """ Do customized uninstallation.
+    """
+    if context.readDataFile('quintagroup.blog.star_uninstall.txt') is None:
+        return
+    site = context.getSite()
+    removeBrowserLayer(site)
