#!/usr/bin/make -f

#export DH_VERBOSE=1

UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')

# Verbose test output
export VERBOSE=1

%:
	dh $@ --with autoreconf,pkgkde_symbolshelper --parallel

override_dh_auto_build-arch:
	dh_auto_build --arch

override_dh_auto_build-indep:
	dh_auto_build --indep
	(cd cxx4 && doxygen)

override_dh_auto_test:
	dh_auto_test --max-parallel=1 || echo "Ignoring test failures"

override_dh_install:
	$(RM) debian/tmp/usr/lib/*/*.la
	dh_install --list-missing

override_dh_strip:
	dh_strip --dbg-package=libnetcdf-c++4-dbg

override_dh_makeshlibs:
	dh_makeshlibs -- -c0 -v$(UPSTREAM_VERSION)

