diff --git a/MANIFEST.in b/MANIFEST.in
index cd389fa98526e3a6fbc01a1a2e7e84216ba7b4fe_TUFOSUZFU1QuaW4=..6f326f9908bd375725287b703693d68901b0d4e5_TUFOSUZFU1QuaW4= 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,5 @@
 include *.py
-
+recursive-include data *.xsl
 recursive-include views *.py
 recursive-include i18n *.pot *.po
 recursive-include migration *.sql *.py depends.map
diff --git a/__pkginfo__.py b/__pkginfo__.py
index cd389fa98526e3a6fbc01a1a2e7e84216ba7b4fe_X19wa2dpbmZvX18ucHk=..6f326f9908bd375725287b703693d68901b0d4e5_X19wa2dpbmZvX18ucHk= 100644
--- a/__pkginfo__.py
+++ b/__pkginfo__.py
@@ -4,7 +4,7 @@
 modname = 'fresh'
 distname = 'cubicweb-fresh'
 
-numversion = (0, 5, 0)
+numversion = (0, 5, 1)
 version = '.'.join(str(num) for num in numversion)
 
 license = 'LGPL'
@@ -47,9 +47,9 @@
 from os.path import join, isdir
 
 #from cubicweb.devtools.pkginfo import get_distutils_datafiles
-TEMPLATES_DIR = join('share', 'cubicweb', 'cubes')
-THIS_TEMPLATE_DIR = join(TEMPLATES_DIR, 'fresh')
+CUBES_DIR = join('share', 'cubicweb', 'cubes')
+THIS_CUBE_DIR = join(CUBES_DIR, modname)
 
 def listdir(dirpath):
     return [join(dirpath, fname) for fname in _listdir(dirpath)
             if fname[0] != '.' and not fname.endswith('.pyc')
@@ -52,6 +52,7 @@
 
 def listdir(dirpath):
     return [join(dirpath, fname) for fname in _listdir(dirpath)
             if fname[0] != '.' and not fname.endswith('.pyc')
-            and not fname.endswith('~')]
+            and not fname.endswith('~')
+            and not isdir(join(dirpath, fname))]
 
@@ -57,3 +58,4 @@
 
+from glob import glob
 try:
     data_files = [
@@ -58,7 +60,5 @@
 try:
     data_files = [
-        [THIS_TEMPLATE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
-        [join(THIS_TEMPLATE_DIR, 'i18n'),  listdir('i18n')],
-        [join(THIS_TEMPLATE_DIR, 'views'), listdir('views')],
-        [join(THIS_TEMPLATE_DIR, 'migration'), listdir('migration')],
+        # common files
+        [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
         ]
@@ -64,4 +64,10 @@
         ]
+    # check for possible extended cube layout
+    for dirname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration', 'wdoc'):
+        if isdir(dirname):
+            data_files.append([join(THIS_CUBE_DIR, dirname), listdir(dirname)])
+    # Note: here, you'll need to add subdirectories if you want
+    # them to be included in the debian package
 except OSError:
     # we are in an installed directory
     pass
diff --git a/debian/changelog b/debian/changelog
index cd389fa98526e3a6fbc01a1a2e7e84216ba7b4fe_ZGViaWFuL2NoYW5nZWxvZw==..6f326f9908bd375725287b703693d68901b0d4e5_ZGViaWFuL2NoYW5nZWxvZw== 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cubicweb-fresh (0.5.1-1) unstable; urgency=low
+
+  * new upstream release
+
+ -- Sylvain Thénault <sylvain.thenault@logilab.fr>  Thu, 15 Apr 2010 16:30:03 +0200
+
 cubicweb-fresh (0.5.0-1) unstable; urgency=low
 
   * new upstream release