#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=-fixfilepath

# Local Lintian after dpkg-buildpackage (uses debian/lintianrc). For sbuild, see debian/README.sbuild
# and debian/sbuild.suryaos.conf (set SBUILD_CONFIG to that file).
.PHONY: run-lintian
run-lintian:
	@if ! ls ../*.changes >/dev/null 2>&1; then \
		echo "run-lintian: no ../*.changes — run dpkg-buildpackage from this directory first." >&2; \
		exit 1; \
	fi; \
	export LINTIAN_CFG="$(CURDIR)/debian/lintianrc"; \
	for c in ../*.changes; do lintian "$$c"; done; \
	if ls ../*.dsc >/dev/null 2>&1; then for d in ../*.dsc; do lintian "$$d"; done; fi

%:
	dh $@

override_dh_auto_test:
	xvfb-run -a dh_auto_test
