#!/usr/bin/make -f
#export DH_VERBOSE=1
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# Fix FTBFS on mips and mipsel with g++-4.9. See bug #755561
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
HOSTS := mips mipsel

ifneq (,$(findstring $(DEB_HOST_ARCH),$(HOSTS)))
	FLAG := CXX="g++-4.8"
else
	FLAG := ""
endif

%:
	dh $@ --parallel --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- \
		--bindir=/usr/games \
		$(FLAG)

override_dh_auto_build:
	convert -monitor -resize 32x32 $(CURDIR)/debian/berusky2.png $(CURDIR)/berusky2.xpm
	dh_auto_build

override_dh_installchangelogs:
	dh_installchangelogs NEWS
