#!/usr/bin/make -f

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

docdir=debian/funnelweb-doc/usr/share/doc/funnelweb-doc

%:
	dh $@

override_dh_auto_build:
	fw 0fw.fw
	(cd tutorial && fw 0fw_tut.fw)
	(cd reference && fw 0fw_ref.fw)
	(cd developer && fw 0fw_dev.fw)

override_dh_auto_clean:
	rm -f build-stamp *.lis */*.lis

override_dh_auto_install:
	install -d ${docdir}
	cp -a debian/index.html ${docdir}
	for i in tutorial developer reference; do \
		install -d ${docdir}/$$i; \
		cp -a $$i/*.html $$i/binary ${docdir}/$$i/; \
	done
	# annoying and even corrupted
	find ${docdir} -name background.gif -delete

override_dh_compress:
	dh_compress -X.shtml -X.cgi -X.txt

# keep this because of directory name
.PHONY: binary
binary:
	dh $@
