#!/usr/bin/make -f

%:
	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:
	$(MAKE) prefix=$(CURDIR)/debian/cdcd/usr mandir=$(CURDIR)/debian/cdcd/usr/share/man infodir=$(CURDIR)/debian/cdcd/usr/share/info install

	install -D -m 0644 debian/local/bashrc debian/cdcd/etc/bash_completion.d/cdcd

	# Remove useless files
	rm -f debian/cdcd/usr/share/info/dir*

override_dh_strip:
	dh_strip --dbg-package=cdcd-dbg
