#!/usr/bin/make -f

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

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.rst

override_dh_auto_build:
	dh_auto_build
	pandoc -f rst -t markdown README.rst | sed \
	    -e 's:adamzap/landslide:ionelmc/python-darkslide:g' \
	    -e '/Demo/,/produces/ {s/landslide/darkslide/g; s/Landslide/Darkslide/g}' \
	    -e '/Requirements/,$$ {s/\([^[]\)landslide/\1darkslide/g; s/Landslide/Darkslide/g}' \
	    > README.md

get-orig-source:
	uscan --force-download --rename

.PHONY: override_dh_installchangelogs override_dh_auto_build get-orig-source
