#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -D tcliis
	dh_auto_configure -D tksao

override_dh_auto_build:
	dh_auto_build -D tcliis
	dh_auto_build -D tksao
	chmod ugo+x ds9/ds9
	perl -w debian/generate-man > ds9/ds9.1

override_dh_auto_test:
ifeq ($(filter $(DEB_BUILD_OPTIONS),nocheck),)
	DS9_HOME=ds9 \
	TCLLIBPATH="tksao tcliis" \
	xvfb-run --server-args="-screen 0 1024x768x24" \
	./ds9/ds9 -quit
endif

override_dh_installchangelogs:
	dh_installchangelogs ds9/doc/release/r7.6.html
