#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@ --buildsystem cmake

# CMAKE_PROJECT_whisper.cpp_INCLUDE to be removed when upstream is upgraded from v1.8.2
override_dh_auto_configure:
	dh_auto_configure -- \
	      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
	      -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_TARGET_MULTIARCH)" \
	      -DWHISPER_USE_SYSTEM_GGML=ON \
	      -DWHISPER_SDL2=ON \
	      -DCMAKE_PROJECT_whisper.cpp_INCLUDE=debian/cmake/debian-whisper.cpp.cmake \

# Disabled for now, needs data with uncertain license
override_dh_auto_test:
	:
