#!/usr/bin/make -f

export DH_VERBOSE=1
export DH_ALWAYS_EXCLUDE=__pycache__
# exclude internet tests
export PYBUILD_TEST_ARGS=-e test_play_video -e test_download_videos -e test_update_all -e test_add_channel_duplicate -e test_add_and_get_channels
export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/ytcc/ --install-scripts=/usr/share/ytcc/

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

debian/ytcc.1:
	mkdir $(CURDIR)/tmp-home
	HOME=$(CURDIR)/tmp-home help2man --name 'Youtube channel checker' --no-info ./ytcc.py > $@

override_dh_auto_install: debian/ytcc.1
	dh_auto_install
	mv debian/ytcc/usr/share/ytcc/ytcc/ytcc \
	   debian/ytcc/usr/share/ytcc/ytcc.py
