#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DPKG_EXPORT_BUILDTOOLS = 1
include /usr/share/dpkg/buildtools.mk

include /usr/share/dpkg/architecture.mk

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
	HOST := --host=$(DEB_HOST_GNU_TYPE)
else
	HOST :=
endif

%:
	dh $@

override_dh_auto_clean:
	[ ! -f config.mk ] || dh_auto_clean

override_dh_auto_configure:
	./configure $(HOST) \
		--prefix=/usr \
		--bindir=/usr/games \
		--datadir=/usr/share/games \
		--mandir=/usr/share/man \
		--libdir=/usr/lib/x86_64-linux-gnu \
		--enable-verbose-build

override_dh_installchangelogs:
	dh_installchangelogs NEWS
