#!/usr/bin/make -f

%:
	dh $@ --buildsystem R

override_dh_installdocs:
	dh_installdocs
	# instead of fixing MathJax via quilt patch files using sed after installation
	# this prevents the need to adapt the quilt patch when upstream changes the files
	for html in `find debian -name "*.html"` ; do \
	    sed -i 's#\([[:space:]]src="\)https*://cdn\..*/mathjax/.*/MathJax.js\(?config=TeX.*L">\)#\1file:///usr/share/javascript/mathjax/MathJax.js\2#' $${html} ; \
	done
