#!/usr/bin/make -f

# Disable tests which are not working
# for cross builds at the moment
# Although we override dh_auto_test we
# set this ENV to silence some warnings
export DEB_BUILD_OPTIONS=nocheck

#export DH_VERBOSE=1

export WINDOW_SYSTEM=lws-generic
export BUILD=release
export TARGET_PRODUCT=j722s_linux

# DISCIMAGE is here the target for the package creation
export DISCIMAGE=debian/tmp/

override_dh_auto_build:
	# Because everything is prebuilt just let
	# dh_auto_install call the install target

override_dh_strip:
	# Do not strip, everything is prebuilt

override_dh_dwz:
	# Do not run dwz, everything is prebuilt

override_dh_shlibdeps:
	# Skip shlibdeps, we satisfy dependencies manually

# Override the default dh_builddeb target to use xz compression (otherwise when using Ubuntu for packaging .zst will be used which isn't supported in bullseye)
override_dh_builddeb:
	dh_builddeb -- -Zxz

%:
	dh $@
