#!/usr/bin/make -f

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

# collect architecture dependent symbols in the first upload
# http://lists.debian.org/debian-mentors/2011/06/msg00392.html
# export DPKG_GENSYMBOLS_CHECK_LEVEL=0

export DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed"

%:
	dh $@ --sourcedirectory=cmake --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -Scmake -- -Dkst_install_prefix=/usr -Dkst_verbose=ON -Dkst_rpath=OFF

override_dh_auto_build:
	xsltproc -o docbook/kst/tutorial/ /usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunk.xsl docbook/kst/tutorial/tutorial.docbook
	dh_auto_build -Scmake

override_dh_auto_clean:
	find docbook/kst/tutorial/ -name '*.html' -exec rm {} \;
	dh_auto_clean -Scmake
