#!/usr/bin/make -f
#export DH_VERBOSE = 1

include /usr/share/dpkg/architecture.mk

export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_install:
	dh_install
	set -e ; \
	for pl in `grep -Rl '#!/usr/bin/env[[:space:]]\+perl' debian/*/usr/*` ; do \
	    sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
	done

ifeq ($(DEB_HOST_ARCH),mipsel)
override_dh_dwz:
	: # Skip dh_dwz on mipsel, https://bugs.debian.org/972269
endif
