#!/usr/bin/make -f
# debian/rules for asunder.

VERSION=$(shell head -1 debian/changelog | cut -f2 -d" " | tr -d \(\) | cut -f1 -d"-")
get-orig-source:
	#wget http://www.littlesvr.ca/asunder/releases/asunder-2.0.tar.bz2
	mkdir -p asunder-$(VERSION)
	tar --exclude=debian --exclude=\*~ --exclude=\.hg --exclude=\.pc \
		--exclude=asunder-$(VERSION) --exclude=accounts.txt -cf - . \
		| ( cd asunder-$(VERSION) && tar xf - )
	tar -czf ../asunder_$(VERSION).orig.tar.gz asunder-$(VERSION)
	$(RM) -r asunder-$(VERSION)

%:
	dh ${@}

override_dh_auto_clean:
	dh_auto_clean
	rm -f config.guess config.sub

override_dh_auto_configure:
	cp -f /usr/share/misc/config.guess .
	cp -f /usr/share/misc/config.sub .
	dh_auto_configure

override_dh_auto_install:
	dh_auto_install
	mv debian/asunder/usr/share/pixmaps debian/asunder/usr/share/icons
