#!/usr/bin/make -f

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

%:
	dh $@ --buildsystem=cmake --parallel --list-missing

override_dh_strip:
	dh_strip -a --dbg-package=libapiextractor-dbg

override_dh_auto_configure:
	dh_auto_configure -- -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH)

override_dh_auto_test:
	dh_auto_test -a

override_dh_auto_build:
	dh_auto_build -a
	dh_auto_build -i -- doc

override_dh_auto_install:
	dh_auto_install -a

override_dh_installdocs:
	dh_installdocs
ifneq (,$(filter apiextractor-doc, $(shell dh_listpackages)))
	dh_sphinxdoc -papiextractor-doc
endif
