#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
BUILDDIR := $(CURDIR)/debian/tmp

%:
	dh $@ --no-parallel

override_dh_auto_clean:
	dh_auto_clean
	rm -f src/version.texinfo

override_dh_auto_build:
	dh_auto_build -- -Wall PREFIX=/usr NE_GLOBAL_DIR=/usr/share/ne LIBS=-ltinfo

override_dh_auto_install:
	dh_auto_install -- DESTDIR=$(BUILDDIR) PREFIX=/usr
	# upstream does not ship ne.info.gz maximally compressed, so
	# uncompress it here and let dh_compress later do the job right
	gunzip $(BUILDDIR)/usr/share/info/ne.info*.gz
