#!/usr/bin/make -f
export PYBUILD_NAME = bme280

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

execute_after_dh_auto_clean:
	rm -rf *bme280.egg-info
	rm -rf doc/_build

execute_before_dh_installdocs:
	cd $(CURDIR)/doc && make html
	find $(CURDIR)/doc/_build/ -type f -print0 | xargs -0 sed -i 's/https:\/\/coveralls.io//g'
	find $(CURDIR)/doc/_build/ -type f -print0 | xargs -0 sed -i 's/https:\/\/img.shields.io//g'
	find $(CURDIR)/doc/_build/ -type f -print0 | xargs -0 sed -i 's/https:\/\/raw.githubusercontent//g'
	find $(CURDIR)/doc/_build/ -type f -print0 | xargs -0 sed -i 's/https:\/\/travis-ci\.org//g'
