#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_PYTHON_INSTALL_LAYOUT = deb

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-python3 \
		--without-tools

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	LC_ALL=C LANG= LANGUAGE= PYTHONPATH=src/python/ LD_LIBRARY_PATH=src/.libs/ ./tests/libbytesize_unittest.sh
endif

execute_before_dh_install:
	find debian/tmp -name '*.la' -print -delete
