#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

%:
	dh $@ --buildsystem cargo --with bash-completion

override_dh_install:
	mkdir -p debian/exa/usr/share/fish/completions/ debian/exa/usr/share/zsh/vendor-completions/
	cp -f completions/completions.fish debian/exa/usr/share/fish/completions/exa.fish
	chmod -x debian/exa/usr/share/fish/completions/exa.fish
	cp -f completions/completions.zsh debian/exa/usr/share/zsh/vendor-completions/_exa
	dh_install

override_dh_installman:
	pandoc --standalone -f markdown -t man man/exa.1.md        > debian/exa.1
	pandoc --standalone -f markdown -t man man/exa_colors.5.md > debian/exa_colors.5
	dh_installman -O--buildsystem=cargo

override_dh_auto_test:
	dh_auto_test || true

override_dh_dwz:
	# Don't do anything. fails because of the
	# https://github.com/rust-lang/rust/issues/66118
