#!/usr/bin/make -f
DEB_COMPRESS_EXCLUDE= .js .inv

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

override_dh_auto_build:
	dh_auto_build --buildsystem=pybuild
	sphinx-build -bhtml docs debian/tmp-doc/html
	# to fix lintian: privacy-breach-generic
	sed -ir 's|src="https:[^"]*|src="|' debian/tmp-doc/html/index.html

override_dh_auto_clean:
	dh_auto_clean --buildsystem=pybuild
	rm -rf debian/tmp-doc

override_dh_install:
	dh_install
	rm -f $(CURDIR)/debian/python3-cairo/usr/lib/python3*/*-packages/cairo/_cairo.cpython-*dm-*.so

override_dh_strip:
	dh_strip -ppython-cairo  --dbg-package=python-cairo-dbg
	dh_strip -ppython3-cairo --dbg-package=python3-cairo-dbg
