#!/usr/bin/make -f
# -*- makefile -*-

PKD = $(abspath $(dir $(MAKEFILE_LIST)))
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

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

override_dh_auto_configure:
	dh_auto_configure -- -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) -DSFML_BUILD_DOC=ON -DSFML_INSTALL_PKGCONFIG_FILES=ON

override_dh_auto_build:
	dh_auto_build -- all doc

override_dh_strip:
	dh_strip --dbg-package=libsfml2.3-dbg

.PHONY: get-orig-source
## http://wiki.debian.org/onlyjob/get-orig-source
get-orig-source:
	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --repack --compression=xz --download-current-version $(PKD)
