#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

# Skip all tests but the only really important for Debian & linux
TEST_FILES = t/01compile.t t/agent/tools/linux.t \
	$(shell echo t/tasks/inventory/linux/*.t t/tasks/inventory/linux/*/*.t)

# By default, set COMMENTS with converted source timestamp in UTC
DEB_FIA_COMMENTS ?= Built by Debian,Source time: $(shell date -u +'%F %R' -d @$(SOURCE_DATE_EPOCH))

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- PREFIX=/usr SYSCONFDIR=/etc/fusioninventory LOCALSTATEDIR=/var/lib/fusioninventory-agent VERSION=$(DEB_VERSION_UPSTREAM_REVISION) COMMENTS="$(DEB_FIA_COMMENTS)"

override_dh_auto_test:
	dh_auto_test -- TEST_FILES="$(TEST_FILES)"

override_dh_auto_build:
	dh_auto_build
	perl debian/refresh-install-files
