#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS := hardening=+bindnow

%:
	dh $@ --with autoreconf

override_dh_autoreconf:
	[ -d m4 ] || mkdir m4
	dh_autoreconf --as-needed
	autopoint -f

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp

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

debian/install: debian/install.in
	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $< > $@

override_dh_install: debian/install
	dh_install

override_dh_makeshlibs:
# Do not try to make shlibs file.
# They're loadable modules, not to be linked against.

binary-indep:
# We have nothing to do.

