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

#export DH_VERBOSE=1
export DESTDIR=$(CURDIR)/debian/tmp
export gt_prefix=/usr

BITS:=$(shell dpkg-architecture | grep DEB_BUILD_ARCH_BITS | cut -f 2 -d'=')
ifeq ($(BITS),64)
  64BIT:=yes
else
  64BIT:=no
endif

%:
	dh $@ --parallel

override_dh_auto_clean:
	$(MAKE) cleanup

override_dh_auto_build:
	dh_auto_build --parallel -- 64bit=$(64BIT) errorcheck=no

override_dh_auto_test:
	#dh_auto_test -- useshared=yes 64bit=$(64BIT) testthreads=5

override_dh_auto_install:
	dh_auto_install -- 64bit=$(64BIT) errorcheck=no prefix=$(DESTDIR)/usr

override_dh_strip:
	dh_strip --dbg-package=ltrsift-dbg

override_dh_installdocs:
	dh_installdocs --exclude=license.template
