#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1


DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
XP     = xsltproc -''-nonet -''-param man.charmap.use.subset "0"

debian/spyder.1: debian/manpage.xml
	$(XP) $(DB2MAN) $<

installman: spyder.1
	dh installman

override_dh_installdocs:
	dh_installdocs
	mkdir -p debian/spyder/usr/share/doc/spyder/html
	mkdir -p debian/tmp/html
	sphinx-build -b html -d debian/tmp/html doc/ debian/spyder/usr/share/doc/spyder/html
	rm debian/spyder/usr/share/doc/spyder/html/_static/jquery.js
	dh_link /usr/share/javascript/jquery/jquery.js \
                /usr/share/doc/spyder/html/_static/jquery.js
	dh_link /usr/share/doc/spyder/html /usr/share/pyshared/spyderlib/html

%:
	dh  $@
