#!/usr/bin/make -f
%:
	dh $@

override_dh_auto_configure:
	ln -sf /usr/share/misc/config.sub
	ln -sf /usr/share/misc/config.guess
	ln -sf /usr/share/libtool/config/ltmain.sh
	autoconf
	dh_auto_configure -- --with-aa-driver=yes --with-pthread=yes --enable-portable-binary

override_dh_clean:
	dh_clean
	[ ! -d src/lib ] || rmdir src/lib

UPSTREAM_VERSION := 3.5
get-orig-source:
	wget http://qa.debian.org/watch/sf.php/xaos/xaos-$(UPSTREAM_VERSION).tar.gz
	tar xfz xaos-$(UPSTREAM_VERSION).tar.gz
	$(RM) xaos-$(UPSTREAM_VERSION).tar.gz
	find xaos-$(UPSTREAM_VERSION) -name .svn -exec $(RM) -r {} +
	mv xaos-$(UPSTREAM_VERSION) xaos-$(UPSTREAM_VERSION)+ds1
	tar c xaos-$(UPSTREAM_VERSION)+ds1 | gzip -c9 >xaos_$(UPSTREAM_VERSION)+ds1.orig.tar.gz
	$(RM) -r xaos-$(UPSTREAM_VERSION)+ds1
