#!/usr/bin/make -f

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

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

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-ui --with-readline

override_dh_auto_build:
	dh_auto_build
	pod2man --utf8 debian/ispellaff2myspell \
		> debian/ispellaff2myspell.1

override_dh_clean:
	dh_clean debian/ispellaff2myspell.1

override_dh_installexamples:
	dh_installexamples src/tools/example.cxx

override_dh_makeshlibs:
	# add strict dependency if we use private headers
	dh_makeshlibs -plibhunspell-1.7-0 -V'libhunspell-1.7-0 (>= $(DEB_VERSION_UPSTREAM)), libhunspell-1.7-0 (<< $(DEB_VERSION_UPSTREAM).1~)'
	# back out the .shlibs/move to the correct package. It just being
	# there in private-de seems to work, it doesn't need to be in libhunspell-1.7-0
	# proper
	mkdir -p debian/libhunspell-private-dev/DEBIAN/
	mv debian/libhunspell-1.7-0/DEBIAN/shlibs \
		debian/libhunspell-private-dev/DEBIAN/shlibs
	# and now for "real" ibhunspell-1.7-0 which should be compaible
	# enough to not require a version
	dh_makeshlibs -plibhunspell-1.7-0 -VNone
