#!/usr/bin/make -f

%:
	dh $@ -Smeson+ninja -Dlibvmaf -Blibvmaf/build --with quilt

# git describe --tags --long  --always
# libvmaf/include/vcs_version.h

override_dh_auto_configure:
	dh_auto_configure -- \
	-Dbuilt_in_models=true

#	exit 1

override_dh_auto_build:
	dh_auto_build -Smeson+ninja -Dlibvmaf
	dh_auto_build -Spybuild -Dpython

override_dh_auto_install:
	dh_auto_install \
	-O-Dlibvmaf -O-Smeson+ninja

	dh_auto_install \
	-O-Dpython -O-Spybuild

execute_after_dh_install:
	dh_installdirs -pvmaf usr/bin

	dh_python3 -ppython3-vmaf --requires=python/requirements.txt

	dh_numpy3 --strict -ppython3-vmaf

	find debian -name __pycache__ | xargs rm -rf

override_dh_clean:
	-rm -rf .pybuild
	-rm -rf python/vmaf.egg-info

	dh_clean python/src/vmaf.egg-info/* python/vmaf/core/*.so \
	third_party/libsvm/*.so* python/vmaf/core/adm_dwt2_cy.c \
	python/build/temp.linux-x86_64-cpython-311/vmaf/core/adm_dwt2_cy.o \
	matlab/STMAD_2011_MatlabCode/*. \
	matlab/strred/matlabPyrTools/MEX/corrDn.mexw32

override_dh_auto_test:
