#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure --                                        \
		-DLLVM_CONFIG_EXECUTABLE=/usr/bin/llvm-config-14    \
		-DINSTALL_PYTHON_VIRTUALENV=OFF                     \
		-DPYTHON_VENV_EXECUTABLE=/usr/bin/python3           \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo

# Skip tests for now
override_dh_auto_test:

override_dh_auto_install:
	dh_auto_install
	cd obj-$(DEB_HOST_GNU_TYPE)/analyzer/python && python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
