#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
export DH_VERBOSE = 1

export PYBUILD_NAME=katello-host-tools
export PYBUILD_DISABLE=test
#export PYTHON=python3
export PYBUILD_SYSTEM=custom

export DESTDIR=${PWD}/debian/python3-katello-host-tools

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

override_dh_auto_install:
	# Remove stuff we don't need in debian
	cd src; rm -fr dnf_plugins rhsm-plugins yum-plugins zypper_plugins katello/agent
	cd src; DEB_PYTHON_INSTALL_LAYOUT=deb python3 setup.py install --root=${DESTDIR} --prefix=/usr
	rm -f "${DESTDIR}/usr/bin/katello-tracer-upload"

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3
