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

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

PKGDIR=$(CURDIR)/debian/git-extras/

override_dh_auto_clean:
	dh_clean
	# autogenerated files
	$(RM) $(CURDIR)/man/*.1 $(CURDIR)/man/*.html
	# test files
	$(RM) -r $(CURDIR)/.pytest_cache/

override_dh_auto_build:
	dh_auto_build -- docs

override_dh_auto_install:
	dh_auto_install -- PREFIX=/usr SYSCONFDIR=/usr/share
	mkdir -p $(PKGDIR)/usr/share/zsh/vendor-completions/
	install -m0644 -p $(CURDIR)/etc/git-extras-completion.zsh \
		$(PKGDIR)/usr/share/zsh/vendor-completions/_git-extras
	rm $(PKGDIR)/usr/bin/git-gh-pages

%:
	dh $@

.PHONY: override_dh_auto_clean override_dh_auto_build \
	override_dh_auto_install
