#!/usr/bin/make -f

export ROOT=$(CURDIR)

%:
	dh $@

override_dh_clean:
	dh_clean xhtml/*.xml
	dh_clean xhtml/*.3G
	dh_clean xhtml/*.tmp0
	dh_clean xhtml/index.html
	chmod +x xhtml/makeindex.pl

pkg_xml = opengl-4-html-doc
pkg_man = opengl-4-man-doc

override_dh_installdocs:
	dh_installdocs -p$(pkg_xml) xhtml/*.xml
	dh_installdocs -p$(pkg_xml) xhtml/*.html

override_dh_installman:
	# bad-so-link-within-manual-page
	sed -i -e 's/^.so man3G/.so man3/' xhtml/*.3G
	dh_installman -p$(pkg_man) xhtml/*.3G
	# force install of d/copyright:
	dh_installdocs -p$(pkg_man)

# no make install rule:
override_dh_auto_install:

override_dh_compress:
	dh_compress -X.xml

get-orig-source:
	./debian/get-orig-source
