--- a/debian/rules Wed Jan 16 17:41:45 2013 +0100
+++ b/debian/rules Wed Jan 16 17:42:16 2013 +0100
@@ -18,6 +18,11 @@
# distributions and we don't want to block a new release of Cubicweb
# because of documentation issues.
-PYTHONPATH=$${PYTHONPATH:+$${PYTHONPATH}:}$(CURDIR)/debian/pythonpath $(MAKE) -C doc/book/en all
+ # squeeze has a broken combination of jquery and sphinx, fix it up so search works(ish)
+ if grep -q jQuery\\.className doc/html/_static/doctools.js && grep -q "jQuery JavaScript Library v1\.4\." doc/html/_static/jquery.js; then \
+ echo 'Patching doctools.js for jQuery 1.4 compat'; \
+ sed -i 's/jQuery\.className.has(node\.parentNode, className)/jQuery(node.parentNode).hasClass(className)/' doc/html/_static/doctools.js; \
+ fi
rm -rf debian/pythonpath
touch build-stamp