#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
export DH_VERBOSE = 1

include /usr/share/dpkg/architecture.mk

export DOWNLOAD_DATA=false
ifeq ($(DEB_HOST_ARCH),armel)
	export CFLAGS_SCANNER_EXTRA="--with-cflags-scanner-extra=-marm"
else ifeq ($(DEB_HOST_ARCH),armhf)
	export CFLAGS_SCANNER_EXTRA="--with-cflags-scanner-extra=-marm"
endif

%:
	dh $@


override_dh_auto_configure:
	dh_auto_configure -- --datadir=$(CURDIR)
	mkdir -p $(CURDIR)/libpostal
	cp -r debian/libpostal_data/* $(CURDIR)/libpostal

override_dh_missing:
	dh_missing -Xlibpostal.a -Xlibpostal.la
