#!/usr/bin/make -f

#export DH_VERBOSE = 1

export PYBUILD_NAME=lief
export HOME=$(CURDIR)/debian/home

%:
	dh $@

override_dh_auto_build:
	mkdir -p $(HOME)
	dh_auto_build
	dh_auto_build --buildsystem=pybuild --sourcedirectory=api/python

override_dh_auto_configure:
	# we should try to build with the system libs
	# https://lief-project.github.io/doc/latest/compilation.html#third-party
	dh_auto_configure -- \
		-DFETCHCONTENT_FULLY_DISCONNECTED=OFF \
		-DDEB_HOST_MULTIARCH=$(DEB_HOST_MULTIARCH) \
		-DLIEF_PYTHON_API=ON \
		-DLIEF_LOGGING=ON \
		-DLIEF_ENABLE_JSON=ON \
		-DBUILD_SHARED_LIBS=ON \
		-DCMAKE_BUILD_TYPE=Release

execute_after_dh_auto_install:
	dh_auto_install --buildsystem=pybuild --sourcedirectory=api/python
