#!/usr/bin/make -f

%:
	dh $@

override_dh_install:
	dh_install
	find $(CURDIR)/debian/doublecmd-help-*/ -name '*.html' -o -name '*.css' | \
		xargs fromdos ;
	find $(CURDIR)/debian/doublecmd-help-*/ \( -name '*.html' -o -name '*.css' \) -exec \
		sed -i -e "s/..\/..\/pixmaps\/common/images/g" '{}' \;
	find $(CURDIR)/debian/doublecmd-help-*/ -name '*.html' -exec \
		sed -i -z -e "s/<div class=\"checker\">.*valid-html40.*<\/div>//g" '{}' \;
	find $(CURDIR)/debian/doublecmd-help-*/ -name '*.png' | \
		xargs optipng ;
