#!/usr/bin/make -f

# Make sure lintian does not complain about missing hardenings.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export PYBUILD_NAME = tlsh

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- -DTLSH_SHARED_LIBRARY=1

execute_after_dh_auto_build:
	dh_auto_build --sourcedirectory=py_ext --buildsystem=pybuild

execute_after_dh_auto_install: debian/tlsh_unittest.1
	dh_auto_install --sourcedirectory=py_ext --buildsystem=pybuild

override_dh_python3:
	dh_python3 -O--sourcedirectory=py_ext -O--buildsystem=pybuild

debian/tlsh_unittest.1: debian/tlsh_unittest.1.rst
	rst2man $< $@
