#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@  --with autoreconf

override_dh_auto_install:
	#Upstream prefix is usr/local so manually call make
	$(MAKE) DESTDIR=$$(pwd)/debian/abcmidi prefix=/usr install
	#Remove duplicate license information
	rm $(CURDIR)/debian/abcmidi/usr/share/doc/abcmidi/gpl.txt
	#Remove duplicate changelog file
	rm $(CURDIR)/debian/abcmidi/usr/share/doc/abcmidi/CHANGES
	#Remove superfluous VERSION file
	rm $(CURDIR)/debian/abcmidi/usr/share/doc/abcmidi/VERSION
	#Remove duplicate AUTHORS file
	rm $(CURDIR)/debian/abcmidi/usr/share/doc/abcmidi/AUTHORS

override_dh_installchangelogs:
	dh_installchangelogs doc/CHANGES

# This can be removed after stretch is released
override_dh_strip:
	dh_strip --ddeb-migration='abcmidi-dbg (<< 20160103-1~)'

get-orig-source:
	uscan --verbose --force-download --repack
