#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_configure-indep:
override_dh_auto_build-indep:
override_dh_auto_test-indep:
override_dh_auto_install-indep:
	echo "Do not anything when just creating doc package"

override_dh_install-arch:
	dh_install -a
	d-shlibmove --commit \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
                    --movedev debian/tmp/usr/include usr \
                    debian/tmp/usr/lib/*/*.so
	find debian -name "lib*.la" -delete

override_dh_auto_test-arch:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	make -j1 check VERBOSE=1
endif
