#!/usr/bin/make -f

export DH_VERBOSE=1
git_checkout = $(shell if [ -d .git ]; then echo true ; else echo false ; fi)


%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -Dinstall-plugin-metainfo=true -Dwith-lua=lua53

override_dh_installchangelogs:
	dh_installchangelogs debian/changelog.txt

override_dh_missing:
	dh_missing --fail-missing


udoc:
ifeq ($(git_checkout),true)
	wget https://github.com/hexchat/documentation/raw/master/changelog.rst -O debian/changelog.txt
	wget https://github.com/hexchat/documentation/raw/master/plugins.rst -O debian/plugins.txt
else
	$(error you are running this outside of a git checkout; this is not what the maintainer expects)
endif
