#!/usr/bin/make -f

%:
	dh $@ --with quilt

execute_before_dh_auto_build: copyright dtd2vim.1 vimplate.1

execute_after_dh_install-indep:
	# Rename to match the name specified in g:colors_name
	mv debian/vim-scripts/usr/share/vim-scripts/color_sampler_pack/colors/Mustang.vim debian/vim-scripts/usr/share/vim-scripts/color_sampler_pack/colors/mustang.vim
	# This is provided by vim-solarized
	rm debian/vim-scripts/usr/share/vim-scripts/color_sampler_pack/colors/solarized.vim
	dh_vim-addon

.PHONY: copyright
copyright:
	perl debian/vim-scripts.pl $@ > debian/copyright
.PHONY: doc
doc:
	perl debian/vim-scripts.pl $@
.PHONY: maintainer
maintainer: copyright doc

dtd2vim.1: debian/dtd2vim.xml
	xsltproc --nonet /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl $<
vimplate.1: vimplate/bin/vimplate
	pod2man $< $@
