#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1
export MPLCONFIGDIR=$(CURDIR)

archtriplet := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

LDFLAGS += -Wl,--as-needed
%:
	dh $@ --with autoreconf,gir --dbg-package=libhkl-dbg

override_dh_auto_configure:
	dh_auto_configure -- --enable-gtk-doc --enable-hkl3d --disable-static --htmldir=/usr/share/doc/libhkl-doc

override_dh_auto_install:
	dh_auto_install
	# wheezy gobject-introspection does not support multiarch path
	# so un-multiarch the gir repository
	mv $(CURDIR)/debian/tmp/usr/lib/$(archtriplet)/girepository-1.0 \
	   $(CURDIR)/debian/tmp/usr/lib

override_dh_install:
	dh_install --fail-missing -Xlibhkl.la

get-orig-source:
	uscan --verbose --force-download

.PHONY: get-orig-source
