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

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 $@

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_makeshlibs:
	# For sf::GlResource::TransitentContextLock added in 2.4.1
	dh_makeshlibs -plibsfml-window2.4 -V'libsfml-window2.4 (>= 2.4.1~)'
	# For new symbols when compiled with GCC 7 (this version b-depends on GCC 7)
	dh_makeshlibs -plibsfml-system2.4 -V'libsfml-system2.4 (>= 2.4.2+dfsg-4~)'
	dh_makeshlibs --remaining-packages
