#!/usr/bin/make -f

PKG_ROOT         = debian/debian-policy/usr/share/doc/debian-policy
JAVASCRIPT_FILES = doctools.js jquery.js searchtools.js underscore.js

%:
	dh $@ --with sphinxdoc

# dh_sphinxdoc cannot cope with single-file HTML, so we have to relink the
# Javascript manually.
override_dh_install:
	dh_install
	set -e; for f in $(JAVASCRIPT_FILES); do	\
	    rm $(PKG_ROOT)/_static/$$f;			\
	    ln -s ../../../javascript/sphinxdoc/1.0/$$f	\
		$(PKG_ROOT)/_static/$$f;		\
	done
