#!/usr/bin/make -f

export PYDEB_SUGGESTS_EXTRAS=test

%:
	dh $@ --with pydeb --with python2

include /usr/share/python/python.mk

override_dh_auto_build:
	rm -rf src/zope/html/ckeditor
	rm -rf src/zope/html/fckeditor
	dh_auto_build

override_dh_auto_install:
	dh_auto_install
	for py in $(shell pyversions -vr debian/control); do \
	    mkdir -p debian/python-zope.html$(call py_libdir_sh, $$py)/zope/html/ckeditor/3.6.1 ;\
	    mkdir -p debian/python-zope.html$(call py_libdir_sh, $$py)/zope/html/fckeditor/2.6.6 ;\
	    ln -s /usr/share/javascript/ckeditor debian/python-zope.html$(call py_libdir_sh, $$py)/zope/html/ckeditor/3.6.1/ckeditor ;\
	    ln -s /usr/share/fckeditor debian/python-zope.html$(call py_libdir_sh, $$py)/zope/html/fckeditor/2.6.6/fckeditor ;\
	done
