#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

DEB_COMPRESS_EXCLUDE := .bz2 .css .dcl .docbook -license .tag .sty .el

build-stamp:
	touch build-stamp

build: build-stamp
	make kdeb

install/ichthux-docs::
	# *.desktop files to make documents appear in khelpcenter
	dh_install khelpdesktop/ichthux/*.desktop usr/share/apps/khelpcenter/plugins/ichthux/
	# this is the .directory file for proper naming in khelpcenter.
	dh_install khelpdesktop/ichthux/.directory usr/share/apps/khelpcenter/plugins/ichthux/
	# now add a pinch of css
	dh_install build/common/ichthux-default.css usr/share/doc/kde/HTML/en/common/
	# and here goes the documentation.
	dh_install build/about-ichthux/C/* usr/share/doc/kde/HTML/en/ichthux/about-ichthux/
	dh_install build/release-notes/C/* usr/share/doc/kde/HTML/en/ichthux/release-notes/
	dh_install build/installguide/C/* usr/share/doc/kde/HTML/en/ichthux/installguide/
	dh_install build/images/* usr/share/doc/kde/HTML/en/images/
	sed -i "s/\.\.\/\.\.\//file:\/\/\/usr\/share\/doc\/kde\/HTML\/en\//" debian/ichthux-docs/usr/share/doc/kde/HTML/en/ichthux/about-ichthux/index.html

clean::
	# clean up
	make clean
	rm -f build-stamp
	rm -rf debian/ichthux-docs
