#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS := hardening=+all
export DEB_LDFLAGS_MAINT_APPEND := -Wl,-z,defs

%:
	dh $@ -Bbuild-debian

# Examples and tools not built because they require various private
#  symbols from libaom.so which we filter out.
# Tests disabled because they require network access to download test
#  data.
# Setting GIT_EXECUTABLE to some invalid file prevents the version
#  being taken from git if we're on a Debian packaging git branch.
override_dh_auto_configure:
	dh_auto_configure -- \
		-DBUILD_SHARED_LIBS=1 \
		-DENABLE_TESTS=0 \
		-DGIT_EXECUTABLE=/nonexistant-binary \
		-DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \

# Do not compress html changelog which breaks documentation
override_dh_compress:
	dh_compress -Xchangelog.html
