#!/usr/bin/make -f

export DEB_BUILD_HARDENING=1

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

DEB_CONFIGURE_EXTRA_FLAGS := \
	--prefix /usr \
	--prefix-lib /usr/lib/$(DEB_HOST_MULTIARCH)/

%:
	dh $@

override_dh_auto_clean:
	[ ! -f Makefile.conf ] || $(MAKE) distclean

override_dh_auto_configure:
	./configure $(DEB_CONFIGURE_EXTRA_FLAGS)

override_dh_install:
	mkdir -p $(CURDIR)/debian/tmp/etc/bash_completion.d
	cp -f bash_completion $(CURDIR)/debian/tmp/etc/bash_completion.d/muroar
	dh_install

override_dh_strip:
	dh_strip --dbg-package=libmuroar0-dbg
