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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@


override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	./debian/tests/test-decode
endif
	dh_auto_test

override_dh_auto_install:
	dh_auto_install
	cd $(CURDIR)/debian/tmp/usr/bin/ && mv dec265 libde265-dec265
	if [ -e "$(CURDIR)/debian/tmp/usr/bin/sherlock265" ]; then \
		cd $(CURDIR)/debian/tmp/usr/bin/ && mv sherlock265 \
			libde265-sherlock265; \
	fi
