#!/usr/bin/make -f
export DH_OPTIONS

export REPACK_SH=$(CURDIR)/debian/repack.sh
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

ifeq ($(DEB_HOST_ARCH),armhf)
	confflags += --disable-optimize
endif

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

override_dh_auto_configure:
	dh_auto_configure -- --enable-static=no $(confflags)

override_dh_auto_test:
	dh_auto_test || true
	
override_dh_strip:
	dh_strip --dbg-package=mp4v2-dbg

override_dh_installchangelogs:
	dh_installchangelogs -plibmp4v2-2 doc/ReleaseNotes.txt
	dh_installchangelogs --remaining-packages

override_dh_installdocs:
	dh_installdocs --link-doc=libmp4v2-2

get-orig-source:
	uscan --force-download
