When the Python modules are symlinked from /usr/share/pyshared to
/usr/lib/pymodules/python2.5/, the symlink to MochiKit was lost and the web
fronted stopped working.
---
 debian/patches/02-usr-share-for-static.patch |   11 +++++++++++
 debian/patches/series                        |    1 +
 debian/rules                                 |   21 ++++++++++++++-------
 3 files changed, 26 insertions(+), 7 deletions(-)
 create mode 100644 debian/patches/02-usr-share-for-static.patch

diff --git a/debian/patches/02-usr-share-for-static.patch 
b/debian/patches/02-usr-share-for-static.patch
new file mode 100644
index 0000000..31bb431
--- /dev/null
+++ b/debian/patches/02-usr-share-for-static.patch
@@ -0,0 +1,11 @@
+--- a/openerp/commands.py
++++ b/openerp/commands.py
+@@ -80,7 +80,7 @@
+         
+     cherrypy.config.update(_global)
+     
+-    static_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 
'static')
++    static_dir = '/usr/share/openerp-web'
+     app_config.update({'/static': {
+         'tools.staticdir.on': True,
+         'tools.staticdir.dir': static_dir
diff --git a/debian/patches/series b/debian/patches/series
index 16bdb8d..902705b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 01-libjs-mochikit.patch
+02-usr-share-for-static.patch
diff --git a/debian/rules b/debian/rules
index 7de0483..129ba75 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,6 +27,13 @@ override_dh_auto_install:
        rm -rf debian/openerp-web/usr/doc
        rm -rf debian/openerp-web/usr/scripts
 
+override_dh_pysupport:
+       dh_pysupport
+
+       # overriding dh_pysupport, because after dh_auto_install there are two
+       # Python directories. After dh_pysupport there is only one.
+       mv debian/openerp-web/usr/share/pyshared/openerp/static 
debian/openerp-web/usr/share/openerp-web/
+
 override_dh_installchangelogs:
        dh_installchangelogs doc/ChangeLog
 
@@ -37,10 +44,10 @@ override_dh_fixperms:
        dh_fixperms
 
        # executable-not-elf-or-script
-       chmod -x 
debian/openerp-web/usr/share/pyshared/openerp/static/open-flash-chart.swf \
-                
debian/openerp-web/usr/share/pyshared/openerp/static/javascript/tabber/tabber_cookie.js
 \
-                
debian/openerp-web/usr/share/pyshared/openerp/static/javascript/tabber/tabber.js
 \
-                
debian/openerp-web/usr/share/pyshared/openerp/static/images/grdbig.png \
-                
debian/openerp-web/usr/share/pyshared/openerp/static/images/grdheader.gif \
-                
debian/openerp-web/usr/share/pyshared/openerp/static/images/openerp_big.png \
-                
debian/openerp-web/usr/share/pyshared/openerp/static/images/mainmenu_button.png
+       chmod -x debian/openerp-web/usr/share/openerp-web/open-flash-chart.swf \
+                
debian/openerp-web/usr/share/openerp-web/javascript/tabber/tabber_cookie.js \
+                
debian/openerp-web/usr/share/openerp-web/javascript/tabber/tabber.js \
+                debian/openerp-web/usr/share/openerp-web/images/grdbig.png \
+                debian/openerp-web/usr/share/openerp-web/images/grdheader.gif \
+                
debian/openerp-web/usr/share/openerp-web/images/openerp_big.png \
+                
debian/openerp-web/usr/share/openerp-web/images/mainmenu_button.png
-- 
1.6.5.rc2

_______________________________________________
open-object mailing list
open-object@lists.debian-maintainers.org
http://lists.debian-maintainers.org/listinfo/open-object

Reply via email to