#!/usr/bin/make -f

ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS)))
        DEB_CONFIGURE_EXTRA_FLAGS += --with-debug
endif

%:
	dh $@

override_dh_clean:
	dh_clean
	find . -name 'Makefile.in' -delete
	rm -rf lib/Makefile configure lib/stamp-h1 lib/config.h src/config.h.in

override_dh_auto_configure:
	dh_auto_configure -- --with-curses-lib=/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`

override_dh_installchangelogs:
	dh_installchangelogs NEWS
