#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	# Upstream's make_release writes version.txt; a git snapshot has none.
	dpkg-parsechangelog -SVersion | sed 's/-[^-]*$$//' > version.txt
	# The configure script is so old that it fails with the options
	# that dh_auto_configure feeds it...
	./configure --prefix=/usr --mandir=/usr/share/man

override_dh_auto_test:
	# The test suite depends on the English way to sort characters (it
	# fails with LC_ALL=C or C.UTF-8). Its check target runs clean in
	# parallel with the tests, so it is not parallel-safe.
	LC_ALL=en_US.UTF-8 dh_auto_test --no-parallel

override_dh_installchangelogs:
	dh_installchangelogs NEWS
