#!/usr/bin/make -f

DEB_PYTHON_SYSTEM=pycentral
DEB_COMPRESS_EXCLUDE := .py

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

install/python-yaml::
	for i in $(cdbs_python_build_versions); do \
	  python$$i ./setup_with_libyaml.py install --root $(CURDIR)/debian/python-yaml; \
	done

install/python-yaml-dbg::
	for i in $(cdbs_python_build_versions); do \
	  python$$i-dbg ./setup_with_libyaml.py install --root $(CURDIR)/debian/python-yaml-dbg; \
	done
	find debian/python-yaml-dbg \
	  ! -type d ! -name '*_d.so' | xargs rm -f
	find debian/python-yaml-dbg -depth -empty -exec rmdir {} \;

binary-predeb/python-yaml-dbg::
	rm -rf debian/python-yaml-dbg/usr/share/doc/python-yaml-dbg
	ln -s python-yaml debian/python-yaml-dbg/usr/share/doc/python-yaml-dbg


clean::
	rm -rf build
