#!/usr/bin/make -f

export PYBUILD_NAME=qtile
include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/buildflags.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export PYTHONPATH=$(CURDIR)/debian/python3-qtile
export SETUPTOOLS_SCM_PRETEND_VERSION=$(DEB_VERSION_UPSTREAM)
export PYBUILD_TEST_ARGS=-k 'not test_migrations and not test_exitcode and not test_qtile_cmd \
	 and not test_cmd_help_subcommand and not test_cmd_help_param and not test_hook'

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_installman:
	sphinx-build -C -D project=Qtile -b man docs/ debian/tmp/man
	rm -rf $(CURDIR)/debian/tmp/man/.doctrees/
	dh_installman

override_dh_install:
	dh_install
	mkdir -p $(CURDIR)/debian/qtile/usr/bin/
	mv $(CURDIR)/debian/python3-qtile/usr/bin/qtile $(CURDIR)/debian/qtile/usr/bin/
