#!/usr/bin/make -f

%:
	dh $@ --with autotools_dev

override_dh_installchangelogs:
	dh_installchangelogs debian/CHANGELOG.upstream

override_dh_install:
	dh_install
	# We have to ask upstream if it is important for them that the binary is named clustalw2
	mv $(CURDIR)/debian/clustalw/usr/bin/clustalw2 $(CURDIR)/debian/clustalw/usr/bin/clustalw

	# That is a bit ugly and should be better investigated.
	rmdir $(CURDIR)/debian/clustalw/usr/share/aclocal/

get-upstream-changelog:
	# Get upstream changelog
	cd debian; wget -N --output-document=CHANGELOG.upstream http://www.clustal.org/download/current/CHANGELOG

