#!/usr/bin/make -f

export DH_VERBOSE=1

export DEB_BUILD_DATE="$(shell dpkg-parsechangelog --show-field=date)"

export DEB_CFLAGS_MAINT_APPEND=$(shell dpkg-buildflags --get CPPFLAGS) -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-format-truncation -Wno-unused-function -DBUILD_DATE=\"$(DEB_BUILD_DATE)\"

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_install-arch:
	cp obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)/ezquake ezquake
	dh_auto_install

override_dh_clean:
	rm -rf opengl minizip vstudio-libs mingw32-libs misc/vstudio misc/install
	dh_clean
