#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

upstream_ver = $(shell dpkg-parsechangelog | sed -n -e's/Version: \(.*\)-[^-]*/\1/p')
%:
	dh $@ --with autoreconf

override_dh_autoreconf:
	echo $(upstream_ver) > VERSION
	dh_autoreconf -- ./autogen.sh

override_dh_install:
	rm -f debian/tmp/usr/lib/*/*.la
	# These are examples, we don't want to ship them.
	rm -f debian/tmp/usr/lib/*/libautohbw*
	rm -f debian/tmp/usr/lib/*/libnumakind*
	# docs get installed otherwise
	rm -f debian/tmp/usr/share/doc/memkind/*
	dh_install --fail-missing

# tests require a numa-enabled host, so we can't run these at build-time.
override_dh_auto_test:
