#!/usr/bin/make -f

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

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

export DEB_BUILD_MAINT_OPTIONS := hardening=+all

extra_flags = \
	--host="$(DEB_HOST_GNU_TYPE)" \
	--build="$(DEB_BUILD_GNU_TYPE)" \
	--prefix="/usr" \
	--mandir="/usr/share/man" \
	--infodir="/usr/share/info" \

override_dh_auto_configure:
	dh_auto_configure -- $(extra_flags)

override_dh_auto_install-arch:
	dh_auto_install -a -- DESTDIR=$(CURDIR)/debian/tmp
	find . -name '*.la' -print0 | xargs -0 rm -f

override_dh_strip:
	dh_strip --dbg-package=freeglut3-dbg
