#!/usr/bin/make -f

# always build with -DNDEDUG to get rid of the asserts
export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG

%:
	dh $@

override_dh_auto_clean-indep:
	rm -rf docs

# build documentation if doxygen is available and remove the copy of jquery and
# replace it with the one from libjs-jquery
override_dh_auto_build-indep:
ifneq "$(wildcard /usr/bin/doxygen)" ""
	$(MAKE) docs
	rm -f docs/installdox
	rm docs/jquery.js
	ln -s /usr/share/javascript/jquery/jquery.js docs/jquery.js
endif

# no tests and install for indep
override_dh_auto_test-indep override_dh_auto_install-indep:

# The following override can be removed after stretch has been released.
override_dh_strip:
	dh_strip --ddeb-migration='libdiscid0-dbg (<< 0.6.1-5~)'
