#!/usr/bin/make -f

export PYBUILD_NAME=podcastparser
export PYBUILD_VERBOSE=1
export DH_VERBOSE=1


LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")

%:
	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild

override_dh_installdocs:
	(cd doc ; SPHINXOPTS="-D today=\"$(BUILD_DATE)\"" $(MAKE) html)
	(cd doc ; SPHINXOPTS="-D today=\"$(BUILD_DATE)\"" $(MAKE) man)
	dh_installdocs
