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

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

DEB_PYTHON_INSTALL_ARGS_ALL += --install-layout=deb

install/python-cairo-dev::
	python setup.py install_data --install-dir=$(CURDIR)/debian/tmp/usr
	sphinx-build -bhtml doc build/html

build/python-cairo-dbg::
	set -e; \
	for i in $(cdbs_python_build_versions); do \
	  python$$i-dbg ./setup.py build; \
	done

install/python-cairo-dbg::
	for i in $(cdbs_python_build_versions); do \
	  python$$i-dbg ./setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp; \
	done

clean::
	-for i in $(cdbs_python_build_versions); do \
	  python$$i-dbg ./setup.py clean -a; \
	done
	rm -f $(CURDIR)/pycairo.pc $(CURDIR)/src/config.h
	rm -rf $(CURDIR)/build
