#!/usr/bin/make -f

# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME = bloodyAD
export DH_VIRTUALENV_INSTALL_ROOT = /usr/share/

PYTHON_VERSION := $(shell python3 -c "import sys; v = sys.version_info; print(f'{v.major}.{v.minor}')")
PYTHON_NEXT_VERSION := $(shell python3 -c "import sys; v = sys.version_info; print(f'{v.major}.{v.minor + 1}')")

%:
	dh $@ --with python-virtualenv

override_dh_auto_test:
	# Skip tests

# Package needs a rebuild when a new python3 version becomes the default
override_dh_gencontrol:
	dh_gencontrol -- -Vpython3:Depends="python3 (>= $(PYTHON_VERSION)), python3 (<< $(PYTHON_NEXT_VERSION))"

# Don't let dh touch shared libraries, cf. howtos.rst
override_dh_dwz:

override_dh_strip:
	dh_strip --exclude=/site-packages/

override_dh_shlibdeps:
	dh_shlibdeps --exclude=/site-packages/
