#!/usr/bin/make -f

%:
	dh --with python2,autoreconf $@

override_dh_autoreconf:
	gtkdocize --copy
	dh_autoreconf
	intltoolize -c -f

override_dh_autoreconf_clean:
	rm -f gtk-doc.make
	rm -f po/Makefile.in.in
	rm -f m4/gtk-doc.m4 m4/intltool.m4
	dh_autoreconf_clean

override_dh_auto_clean:
	rm -f doc/reference/ethos-overrides.txt doc/reference/ethos-sections.txt
	rm -f doc/reference/ethos.types
	rm -f doc/reference/tmpl/ethos-*.sgml
	rm -f examples/vala/basic.c
	dh_auto_clean

override_dh_auto_configure:
	dh_auto_configure -- --enable-static --enable-gtk-doc

override_dh_makeshlibs:
	dh_makeshlibs -ppython-ethos -n
	dh_makeshlibs -plibethos-1.0-0 -V 'libethos-1.0-0 (>= 0.1.0)' -- -c4
	dh_makeshlibs --remaining-packages

override_dh_auto_install:
	find debian/$(cdbs_curpkg) -name '*.la' -exec rm {} \;
	dh_auto_install

override_dh_python2:
	dh_python2 --no-guessing-versions
