#!/usr/bin/make -f

%:
	dh $@

override_dh_compress:
	dh_compress -Xexamples

PKG_VER := $(shell dpkg-parsechangelog | egrep '^Version:' | sed 's/^Version: \(.\+\)-[^-]\+$$/\1/')
MOD_VER := $(shell perl -Ilib -MApp::KGB -e'print $$App::KGB::VERSION')
override_dh_auto_test:
	LANG=bg_BG.utf8 LC_ALL=bg_BG.utf8 dh_auto_test
	[ "$(PKG_VER)" = "$(MOD_VER)" ] \
	    || ( echo "Package version ($(PKG_VER)) doesn't match module version ($(MOD_VER))"; exit 1 )

override_dh_install:
	dh_install --fail-missing
