#!/usr/bin/make -f

export PYBUILD_NAME=sosreport

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

override_dh_install:
	# Move config file to the right location.
	mv debian/sosreport/usr/config/sos.conf debian/sosreport/etc/sos/sos.conf
	# Remove unnecessary unused dir.
	rm -rf debian/sosreport/usr/config

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	python3 -m unittest -v $(shell find tests/unittests -name "*_tests.py" -not -path "*policy_tests.py")
endif
